NetLogo banner

 Home
 Download
 Help
 Resources
 Extensions
 FAQ
 References
 Contact Us
 Donate

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Japanese

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

Light bike

by Noah Thoron (Submitted: 03/10/2011)

[screen shot]

Download Light bike
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)

WHAT IS IT?

This is a reproduction of the Light Bikes from Tron. Being a two player game, there are two players, a red player and a blue player. They lay down a colored trail, and when they run in to a trail, their own, or the other player's, they will crash.

HOW IT WORKS

Turtles do not own any values, but patches own blue and red countdowns that let it change color, from black to red or blue.
Setup creates two turtles and aims them tworads each other.
Go first checks if any car has crashed. It then checks if the patches have a red or blue countdown equal to one (This was to prevent every thing being on color at the begining). If so, it will set it to red or blue, depending. Once finished, it will subtract one from the countdown value. After, it moves them forward and kills off any car on a non-black patch.It finally sets up the countdown.

HOW TO USE IT

Setup and Go do what they say.
Blue and Red indicate which car they effect.
Basic controls:
Up, Down, Left, and Right set the direction of the car.
Advanced controls:
Turn-angle determines the angle you turn when pressing Q, E, U, or O.
Speed-up and slow-down effect how fast you slow down while using Red or Blue slow or fast.
The Red and Blue turn right or left controls are an alternitive to using the basic controls.
The Red and Blue speed up and slow down controls are to give you an advantage in neck to neck straight-aways and to speed up the game.
Reset trails and Red and Blue reset are to set your trail to black.

THINGS TO NOTICE

If you pause while speeding up or slowing down, your car will jump across the screen. Also, if you speed up, then slow down, with out stoping speeding up, then you will get the effects from both.
I left the instructions for all the turning buttons and the reset trails button in their Commands sections. This does not effect the model, but is just an intresting fact. You could take practically every thing, and put it in the interface.

THINGS TO TRY

Try changing the turn angle, and use different speeds for the acceleration and deceleration values. Once you have mastered basic controls, try the advanced ones.

EXTENDING THE MODEL

I attempted to make the model as editable as possible, while being not too complex. I also wanted to leave room for improvment. You can make a slider to set the speed, a better way to speed up and slow down, add more players, hook it up to the hub-net (I would really like to see this), make it more faithful to the movie, or write an AI.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

This is all original code, though the idea to make this came from a friend, and the concept came from the Disney Corporation. Authored by Noah Thoron.

(back to the NetLogo User Community Models)