Well, I liked the idea of Yordan to do something with traffic-lights, so my initial idea was to do something with them, I searched the web for some images of roads and etc. and later I found out that I will have some problems with traffic-lights as they need to show both sides on a map, but initially I liked the idea of something with roads and a car, so I did the same idea I thought of by reading Yordan's post, except I did it using road signs, if somebody is interested here is a link to a google translated version of it:
dev.quatrux.net/DI/DI.phpDI stands for AI in my language, as you can see I did it using only with some PHP and mostly Javascript with HTML+CSS, Javascript is not optimized to much, but it does the work good, it runs on Opera, Safari/Chrome and IE8 really fast, but on Windows Firefox it's quite 4 times slower.. on Linux Firefox it is as fast as on Opera, don't know why.. Also it does not work as it should on IE6 or IE7 as I been said by some of my friends.
I found some sdl/flash games and took some screenshots, created a map using Gimp from those screenshots, found some images on google and altered them with Gimp to suit my needs in this little thing, it also should play a sound when driving of a motor engine starting up, as it's a WAV file..
How to use it:
Just select from the combobox to select a destination and on the map using your mouse click once for A point and next for B point, you'll see the best available path to go, when 2 points are selected you can click Drive and should hear a sound and a moving car by the best/fastest path, it's using the path-finding algorithm of A*
Also, the main point is the road signs, when you click on a road sign with a mouse you'll be able to place it on the map roads, the STOP sign will make the car stop before the sign for 1 second, the sign with PEOPLE will make the car drive slower than usually and the sign with WORKERS will close the road at that square, so the car will need to find another best path to not go through the closed road if it's possible, thats the whole idea of this AI even if you can call it AI

By the way, when putting road signs, to comeback to choosing destination, select from the bottom combobox. Furthermore, some text wasn't translated by google, and the Alert messages are also in my mother tongue Lithuanian, so just push Ok ;]
Map coordinates are just XY values, the Grid mode is just for fun and the territory mode justs shows R for Road, T for Terrain and C for Closed road. ;]
Well, thats about all to control it

By the way, at the beginning it may not work very fluently, as the images load or the sound needs time to load, after some usage, several clicks and a refresh everything seems to work as it should.
Comment/Reply (w/o sign-up)