Race your own time against a ghost actor?

Game Editor comments and discussion.

Race your own time against a ghost actor?

Postby Sgt. Sparky » Tue Jan 02, 2007 9:25 pm

is there a wayRace your own time against a ghost actor?
where the main actor some how creates a path (my StickMan)
and when he finishes and starts over again he will have saved the path
and will create a slighly transparent actor that will fallow the path?
I know how to save and stuff, but how do I create the path in game?
is it possible with GE?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sun Jan 07, 2007 4:48 pm

I think it's impossible currently creating new paths in GE. You wanted to make an actor follow you after a time period? Or somekind of "review your route" ? :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Game A Gogo » Sun Jan 07, 2007 5:47 pm

well, it also depends on what type of race your making, like is it only a one way movement (constently right, like your stickman jumper) or multyple movement.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Sun Jan 07, 2007 10:52 pm

The Ghost Actor Is My StickMan(Ghost) :cry: In the new versoin (posted on page 1 of GameDemos(forum)StickManJumper!(topic)
has an actor you can race (it does not amtter if you lose)and you can get so far in front of the ghost actor that it will fall into the eraser and DIE! :twisted:
Ahem, well, and the eraser Erases! :D :D :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Tue Jan 09, 2007 2:25 pm

Can I try it as exe? I'm using GE 1.3.3 so I haven't tried your game yet.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Wed Jan 10, 2007 12:03 am

oh yes, :oops: sorry, did you try to try it? because I have a very old versoin of GE or maybe same as you, :D I cannot post the .exe cus' when i try it on my comp(to access it) it said : "ERROR could not open file, coculd not read so and so..." but I will post my newest Game: wich is a smaller file, Here Ya' Go!
Attachments
DodgeBallAsteroids.zip
Here is the .exe :D
(1.5 MiB) Downloaded 163 times
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Hedfone » Wed Jan 10, 2007 12:26 am

does it just go 4 infinite after the red fireballs?
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby Sgt. Sparky » Wed Jan 10, 2007 12:53 am

it goes infinite after 5 mins :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Hedfone » Wed Jan 10, 2007 1:27 am

ahh,
i got to 16:49 :D :P
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby Sgt. Sparky » Wed Jan 10, 2007 1:30 am

wah..... wow, My best is bout' 5:30... Wow, so your fingers get tired? after 4 mins there are so many fireballs it get really hard, but then the shields start to appear faster, did you ever collect em'? the little green dots?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Hedfone » Wed Jan 10, 2007 2:45 am

lol :lol: ,
after about 6 minutes, i was actually TRYING to hit the fireballs.
:D but nothin doin, i couldnt die.
even when you move, the green lights follow you, thus making it ridiculously easy to survive.

sorry if this comes out the wrong way, its not meant as an insult :(
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby Sgt. Sparky » Wed Jan 10, 2007 2:47 am

it is okay I ment it to be that way :D if the green dots did not fallow you you may die fast :D , that is after 3-4 mins :D unless you are the average person who is 100x better than me at my game :D I stink at it. :lol:
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu Jan 11, 2007 2:47 pm

Sgt. Sparky wrote:oh yes, :oops: sorry, did you try to try it? because I have a very old versoin of GE or maybe same as you, :D I cannot post the .exe cus' when i try it on my comp(to access it) it said : "ERROR could not open file, coculd not read so and so..." but I will post my newest Game: wich is a smaller file, Here Ya' Go!


I'll try your game as fast as possible! :D I just downloaded the newest GE's demo.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu Feb 15, 2007 10:47 pm

tekdino wrote:I think it's impossible currently creating new paths in GE. You wanted to make an actor follow you after a time period? Or somekind of "review your route" ? :D

Yup. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby DilloDude » Fri Feb 16, 2007 12:40 am

Here's a simple method that should work. You have a character that always runs in one direction. All you do is press and release a jump buton at the right time. You can add other keys, but for this example, I'll just use jump. The jump action is set up with a keyup and keydown event that changes a variable. The jump code is executed just by checking that variable (No other script on the events). This makes it simpler to do. You need an actor integer called 'time'. This will store the number of frames from the start. Create two arrays of long integers, one called 'rec', and one called 'read'. rec will be used to record the data you are currently playing. read will be used for the ghost actor to read from. You also need another actor integer called 'loc'. This will store the location in the array. You are using an actor variable calld 'jmp' to activate the jump key. A value of 1 means that the jump key is down, a value of 0 means it isn't. You'll also need another variable, 'stjmp', to store the initial position of the jump key. On your player's create actor, you need to initialize some vars:
Code: Select all
jmp = getKeyState()[KEY_SPACE];
stjmp = jmp;
loc = 0;
time = 0;

On your draw actor script, you need to increment time:
Code: Select all
time ++;

On your key down and key up events, add this script:
Code: Select all
rec[loc] = time;
loc ++;

This sets the next position in the rec array to the current time, and advances the array location. When the game ends, you need to copy the rec array into the read array. I think you'll have to go through each slot with a 'for' loop (or is there a faster way?)
Now you need a 'ghost' actor. Set it up the same as your player, except without the keydown/up events. The create actor script should be changed to:
Code: Select all
jmp = stjmp;
loc = 0;
time = 0;

On the draw actor script, you also need to add:
Code: Select all
if (time == read[loc])
{
    jmp = !jmp;
    loc ++;
}
This checks if it is time to change the jmp variable, and if so, it chnges it, and adjustts loc to find the next slot. If you want to save your ghost, you need to put the variables read and stjmp in a save group, along with any other information.
I think this should do what you want. If you want more keys, it's probably easier to set up an array for each, although you might find a more efficient way using structs. I can't make a demo at the moment, because my GE computer is not set up, but if you have problems, just ask, and I or someone else should be able to help.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron