Emerge

Games Design
A site for players and programmers of Apple Mac games

Guy Walker 2003


«
 
Cocoa
Doom
Flash
HTML
Logo
Script
WTC
   
Shuffled layers - test movie

Layers

At each tick, every object on stage is processed in turn. Starting with the first object to be placed (or born) and ending with the last placed object. When an object is born or created, it is placed at the end of the processing queue.
Therefore if an object is killed and reborn, it will move to the end of the queue. If this is a random event, objects quickly end up shuffled in processing order.


Green Star: This is placed first and is never replaced. It resets the layers counter to zero. It also uses a flag counter to create a pause.

re set counter and decrement flag
if flag < 0 then flag = 8

Yellow Square: Increments the counter and shows the count on itself.
Then either
1) Replaces itself and moves to the end of the queue (flashes red).
or
2) Does nothing and remains at its present queue position (flashes green).

And thats it.

Controls

No controls for this self looping sim. Just watch.

 

View Code

 

Stagecast Creator, Stagecast Player, and Stagecast Web Player are trademarks of Stagecast Software, Inc.
Java is a registered trademark of Sun Microsystems, Inc


Cocoa | Doom | Flash | HTML | Logo | Script | WTC