Page 1 of 3

ZZT racing game 'checkpoints'?

Posted: Thu Jul 15, 2004 5:06 am
by 770
Okay, I've just recently been getting into making things in ZZT, and I was thinking about making a racing game.. where, you just kinda run around a track and it's all like "hooray! you ran around the track!" and it ends the game or something.


Aaanyway, how would you make sure that the player actually did run all the way around the track? I was thinking of maybe an object that sets a flag, but, then I'd have to have an entire row of objects across the track or something, plus it'd make the player stop when you hit one.

Any ideas?



P.S. - These emoticons scare me.

Posted: Thu Jul 15, 2004 6:10 am
by Dr. Dos
Our emoticons were hand picked.

Since you're new don't be surprised if this thread gets way off topic!

I recall Smiley Racer X and SRX-2 always had a narrow part then you'd pass the narrow point and an object would check if it was blocked in the direction the car would pass it which i worded badly. But yeah i assume then it would send something else to zap itself or something. and yeah look at Smiley Racer X.

Posted: Thu Jul 15, 2004 6:14 am
by clecky
:adomisfreewareyoudontneedacrackorserialnumbertopl

Posted: Thu Jul 15, 2004 6:16 am
by 770
Thanks for that, I'll check it out. ^^

Posted: Thu Jul 15, 2004 11:06 am
by Zenith Nadir
Freak Da Cat also had a racing section. There was also a game demo called RUSH ZZT by Tricky you may like, you get to run people over

also hi there!!!!!!!! welcome to z2

Posted: Thu Jul 15, 2004 3:51 pm
by Jotz
Here is what is left of a racing game I was going to make. The checkpoint thing should work though, just edit the objects in the purple walls.

http://www.geocities.com/jotzjquestion/dl2.htm

Posted: Fri Jul 16, 2004 2:31 pm
by 519
Quick question.

Most of the racing(whether it involves moving the player or another object) boards I've seen still require that a #if contact or #if blocked command be executed to detect said moving object. In my mind, this limits the checkpoint areas to one or two blocks wide.

There's probably a fix already, but I'm just throwing it out there. Is there a way to make a checkpoint line that's oh say 6 tiles wide.

Posted: Fri Jul 16, 2004 4:40 pm
by Jotz
You can use this code so that it can detect if there is a strip of a certain colored fake [example uses purple].

Code:

:loop
#if not blocked flow #put flow boulder
#if any white boulder da [if the space ahead is an empty]
#if any purple boulder do [if the object reaches the purple strip]
#change boulder fake
#loop
:da
#change boulder empty [this means you cannot use white fakes]
#loop
:do
#change boulder fake
Checkpoint cleared [or whatever]
#loop

I don't know if this will work though.

Posted: Fri Jul 16, 2004 9:23 pm
by 519
Seems like that will take an awfully long time to execute. The object motion will be pretty choppy, but the concept works.

Posted: Sat Jul 17, 2004 2:29 am
by superbowl shuffle
...but I love white fakes.

Posted: Sat Jul 17, 2004 3:19 am
by Aplsos
Image

Posted: Sat Jul 17, 2004 10:20 am
by nps
You could use a set of "#if alligned ..." objects to make the checkpoint as big as you want.

Posted: Sat Jul 17, 2004 7:03 pm
by 519
That's assuming the player is used as the 'racer'. I'm not sure if someone has figured out any "if alligned" commands with objects yet.

Sorry for the seminewbiesh questions, but I haven't reallyworked on my ZZT skills in over a year....

Posted: Sat Jul 17, 2004 7:47 pm
by Dr. Dos
That's what I thought at first until I realized you could have the car be checking for if it's alligned with the player to have it hit the checkpoint and then have the player alligned with the track at some point.

He stands there like a statue, Becomes part of the machine

Posted: Sat Jul 17, 2004 11:34 pm
by Quantum P.
theorangehamster wrote:I'm not sure if someone has figured out any "if alligned" commands with objects yet.
A long-dead thread identifying some workarounds...

I suppose you could have a line of invisible objects placed on the track. They would be looping at #cycle 1, checking to see #if blocked <i>direction.</i> When the racing object moved into a tile adjacent to the object line, one of the objects would detect this and send out a message to move out of the way of the racer. The effect would be a checkpoint made from an invisible "membrane" that the racing object could pass through without being affected. For this to run smoothly, the objects would have to be placed before the racing object, so that the stat orders would allow the checkpoint code to run before the racer code each cycle. If this did not happen, the racer might run into the objects before they had a chance to respond.

Also, I bet that with some clever landscaping, you could create a skinny region on the track that didn't look so skinny.