Primate Applications
Friday, 21 November 2008
Track Attack PDF Print E-mail

You can play my new game Track Attack off of my website. I think it's not bad for 3 or 4 days worth of work in my spare time. It was a lot of fun to make and learn some new things. The animation work was pretty interesting. I could have gone with other libraries that would have done the animating for me, but where's the fun in that?!

History:

Work has been a little crazy lately, and to compensate I've been spending some time on a fun little game in JavaScript. My son really likes trains, so I wanted to do something that had trains. My wife used to play Pipe Dream on the NES. I took the idea behind pipe dream and changed the ooze to a train. I also wanted to see if I could get JavaScript to play music.

I didn't use any JavaScript libraries other than for sound. To play sound I used the SoundManager2 Library. Currently the game only works in FireFox, Opera, and Safari. *UPDATE* it works in IE 7, and IE6 (but IE6 doesn't support PNG transparency, so the train looks a little weird) For sound to work you need Flash installed.

All of the artwork was done by myself, and all the sounds and music were pulled off of public domain sites. I used pdmusic.org for the music, and the sounds came off of other different sites that I don't remember. I wanted to stay away from copyrighted works.

It's not quite done yet though. I think I'll add one or more places that you can pick up passengers. When you pick up a passenger, it adds an additional car to your train. I also need to factor in a point system and mark which tracks have already been traversed over so that they cannot be replaced. I should also finish up the cross browser work. I left most of the code in the html file so that you can view the source more easily.

The points system would work by having 100 points per track you cross, and 500 points for using a crossover piece. Any tracks that are not used at the end deduct 50 points from the total. Not delivering passengers to the finish spot would deduct you 250 points for each passenger. If you do reach the finish you would get 1000 points plus 500 points for each passenger. All of this is just for planning right now though.

Rules of Play:

There is a preview of the pieces to come on the right-hand side of the game board. It's kind of like Tetris where you can only use the next piece available. The piece highlighted with the black border shows the next piece. This allows you to plan your moves ahead of the train.

Press the "Start" button to start the counter and begin game play.

Click on any open tiles to place the track on that tile. You can remove an existing tile and replace it with a new one, but you will not be able to place another track for 1.5 seconds while the "crews" replace that section of track.

After the timer hits 0, the train will start moving. This should be announced by a train whistle sound. The train will keep following the tracks. The point is to get the train to the finish spot before it runs out of tracks.

Crossover pieces can be entered through either vertically or horizontally.

If you're super good at this game (not that it's all that difficult) you can also use the "Choo Choo!" button. Use this if you finish your track. It will make the train go much faster and get to the end sooner. When the points system comes into play, this should double the score for the tracks it covers at the faster speed.

Once you've mastered the gameplay, try and challenge yourself. See how many crossover pieces you can use and also see how complex you can get the track.

Gameplay:

An example of gameplay can be viewed HERE. It's just a video made with vnc2swf.

Next >
Main Menu
Home
Projects
Downloads
Forums
Contact Us
Search

Member Of:
SourceForge.net Logo


http://www.primateapplications.com, Powered by Mambo and Designed by SiteGround web hosting

http://www.primateapplications.com, Powered by Mambo and Designed by SiteGround web hosting