ZZT racing game 'checkpoints'?
Moderators: Commodore, Zenith Nadir
ZZT racing game 'checkpoints'?
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.
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.
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
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.
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.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders
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
http://www.geocities.com/jotzjquestion/dl2.htm
╟ is the best char.
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.
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.
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.
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.
╟ is the best char.
- superbowl shuffle
- Official Clamp School Defender
- Posts: 418
- Joined: Mon Apr 07, 2003 4:52 am
- Location: CAsE SenSiTiVe
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
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.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
He stands there like a statue, Becomes part of the machine
A long-dead thread identifying some workarounds...theorangehamster wrote:I'm not sure if someone has figured out any "if alligned" commands with objects yet.
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.