Advanced running object

NOTE: I HATE A LOT OF YOUR ZZT GAMES, SO WATCH OUT!

Moderators: Commodore, Zenith Nadir

Post Reply
User avatar
Jotz
rank bank jotz
Posts: 120
Joined: Thu Oct 16, 2003 2:59 am
Contact:

Advanced running object

Post by Jotz »

Directions:

1)Make a board with random walls all over the place
2)Put a bunch of objects on the board with this code:

[start of code]

@scared
#cycle 1
:loop
/opp seek
#if alligned if blocked e /rnd
#if alligned if blocked w /rnd
#if alligned if blocked n /rnd
#if alligned if blocked s /rnd
#if blocked w if blocked n /rnd
#if blocked w if blocked s /rnd
#if blocked e if blocked n /rnd
#if blocked e if blocked s /rnd
#loop
:touch
#become red fake

[end of code]

Watch as you see how hard some of them are to catch because of this advanced AI.
╟ is the best char.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

I'm not sure I understand the purpose of the code involving the #alligned commands. If they're blocked and aligned? And catching a cycle 1 object is hard anyways, they move as fast as the player can go.
*POW* *CLANK* *PING*
User avatar
Jotz
rank bank jotz
Posts: 120
Joined: Thu Oct 16, 2003 2:59 am
Contact:

Post by Jotz »

The /rnd for all of them create a more life-like run away movement so they're harder to catch. And the #if alligned codes are for if the object is blocked in the direction its running from you. The #if blocked codes are for when the object is trapped in a corner.
╟ is the best char.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

I think I see...

If the contact conditional was added as well it would make it harder.

I seem to remember something about how many non-movement/action commands were executed in a cycle, but I forgot the number. maybe 17?
*POW* *CLANK* *PING*
MadTom
<:D
Posts: 886
Joined: Fri May 13, 2005 6:37 am

Post by MadTom »

Jotz wrote:The /rnd for all of them create a more life-like run away movement so they're harder to catch. And the #if alligned codes are for if the object is blocked in the direction its running from you. The #if blocked codes are for when the object is trapped in a corner.
Don't forget that /rnd is more likely to go east/west than it is north/south. For 'pure' random movement, you'd need /rndp rndne. It'd also probably be better to replace the slashes with question marks for a TRY command, so that the object doesn't stall if it's blocked in the random direction it moves.
464
What can be said now?
Posts: 0
Joined: Tue Oct 21, 2003 8:41 pm

Post by 464 »

Madtom is so smart.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

MadTom is PERFECT.

Saying that makes him sad :\
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
Ryan Ferneau
LOOK OUT FER BAAAD BOB
Posts: 116
Joined: Fri Mar 28, 2003 12:51 am

Post by Ryan Ferneau »

MadTom is PERFECT DARK.
Post Reply