Browse Search Popular Register Upload Rules User list Login:
Search:
Automatic Traffic Control

Image:
screenshot of the scene

Author: Xray

Group: Default

Filesize: 288.62 kB

Date added: 2016-11-10

Rating: 6.7

Downloads: 5083

Views: 587

Comments: 17

Ratings: 5

Times favored: 1

Made with: Algodoo v2.1.0

Tags:

Scene tag

This simulates automobile traffic (3 cars) being controlled by traffic lights (the type that we have here in the U.S.) at different intersections. Lasers in front of the cars do all of the sensing for automatically controlling the cars and for changing traffic lights.

The three cars are color coded, Blue, Red, and Green. You can leave the scene run automatically, or you can alter the traffic by starting and stopping any of the cars by clicking on the colored boxes.

The traffic lights do a pretty good job of preventing collisions at intersections, but of course if you are too aggressive with the Start and Stop controls, you can cause crashes.

There is a fork in the road on the left side of the map which alternates between Left Turn and Straight. This gives the traffic some variation.

This is not a game. It's just something for you to play with when you are bored. :lol:

UPDATE: . . . Added a purple Police Car which is autonomous (that means it operates by itself, and you cannot control it. Of course you can "cheat" by grabbing it with the Move or Grab tools, but that's no Phun!). :lol:

UPDATE: . . . Improved traffic control at intersections, and made cars go slightly faster (if they go too fast, they crash!).
Last edited at 2016/11/15 06:20:51 by Xray
Please log in to rate this scene
edit
Similar scenes
Title: Super sonic rocket
Rating: 4.875
Filesize: 52.18 kB
Downloads: 968
Comments: 2
Ratings: 2
Date added: 2015/01/30 20:30:45
Made with: Algodoo v2.1.0
Rating: rated 4.9
download
Title: Traffic Jam: No lights vs. Lights
Rating: 5
Filesize: 107.05 kB
Downloads: 761
Comments: 5
Ratings: 1
Date added: 2015/12/24 18:49:42
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: THYME traffic simulation with Traffic Lights (UPDATED AGAIN)
Rating: 8.52
Filesize: 85.81 kB
Downloads: 7095
Comments: 10
Ratings: 19
Date added: 2009/12/27 01:14:20
Made with: Phun
Rating: rated 8.5
download
Title: Traffic Jam: Car vs. Bus
Rating: 5
Filesize: 81.61 kB
Downloads: 379
Comments: 2
Ratings: 1
Date added: 2015/12/26 17:14:43
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Renault Traffic Grand Passenger
Rating: 5
Filesize: 441.34 kB
Downloads: 618
Comments: 0
Ratings: 1
Date added: 2017/03/28 18:17:40
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Car with Automatic Gearbox
Rating: 8.1
Filesize: 169.62 kB
Downloads: 1199
Comments: 18
Ratings: 90
Date added: 2008/11/16 03:59:03
Made with: Phun
no image found for this scene
Rating: rated 8.1
download
why not 5
Sure!
Cool but. Why variables won't save?
And do you know how to make variables like this?
laser : e._motor = true
on axle
motor = {e._motor}
Or something.
Good job. This must have take a while to make. Maybe you can make a "wild car" that obeys all the traffic signals, but can't be controlled by the user. This way the user can clone the car as many time as he wants and load up the roads.
Can you add more track? and also. Why does algodoo dont use sound?
@Pootis-Man,
Variables that begin with an underscore character are local variables, and they will save their values when the scene gets saved. You must define local variables in the geometry that uses them. They cannot be defined in the global scope (such as in the Console). You define them in that text input box in the upper-left corner of all Algodoo objects. So, for example: _motor := false.

The variables that don't always behave the way we expect them to behave are global variables, such as "scene.my." variables. They don't save when transferred from one scene to another. They also have other problems which I don't recall, but you can find more information about variables in the Algodoo forum.

@springhydra56,
Yes, of course more track could be added. Will I add more track to this scene? Probably not. Algodoo does not use sound because the creator of the program did not give it the ability to produce sound. A couple of Algodoo users figured out a way to make Algodoo play sound files, but it's fairly complex and requires loading and executing external software from other websites which is always a risky thing to do. Search on "sound" here in Algobox and you should find those scenes.

@s_noonan,
Thanks! And thanks for the suggestion. I will consider it.
@s_noonan,

I know how very capable you are when it comes to scripting, and therefore if you would like to improve this scene in any way, please be my guest. Make it do some awesome things which I have not thought of! :)
OOOH! Nice!
Hmmm... it's really cool. I always want to build something lite that!
Bu I don't get it's logic. Too complicated structre IMHO. I'll try to simplify!
:y
@Kilinich - Yes, please work your magic on this scene! I'm sure that you can come up with something more "A.I. like" than my simple logic. :)
Can you add more cars? can some be crazy and not follow traffic rules
Everyone wants more track and more cars! Well, yes, I am working on improving this scene as my time permits, and I think (I hope) that Kilinich will make some improvements too! He is a Master software engineer.
Cool thingy, really.
I just wish it wasn't one of these scenes who force you the play mode. I don't like play mode, it is really bothering (especially when it reset your Algobox tab into the home page). Also, it's getting really annoying to search everywhere where is the damn (sim.running ? (play.mode) : ()).
But aside of that, it's really cool.
LouFoxyBun -- You are a brand new user (some call you a "Newbie") and so you really don't have a right to complain. Well, you do, sort of, but you should learn more about Algodoo and about scripting before expressing your opinion.

There are good reasons to force playmode, and the main one is it hides the Move tool. When the Move tool is available, people can accidentally or intentionally use the Move tool to corrupt the scene. In playmode, the player only has access to the drag tool which works quite differently. I usually set up my scenes so that playmode automatically goes back to normal where all tools are available when the scenes stops running. Therefore, it should not be a problem.

Thanks for your comments.
Last edited at 2016/11/18 19:33:45 by Xray
:tup: this is so nice! Thanks a lot. One can use it also for creating own road-system, with the nice cars working on the "wire-roads". :*)
Nice nice nice
I like that it's just great!.You're done «:)»