Crazy Train – Update

Sometimes I surprise myself with how easy a project comes together. Let me throw this picture at you:
What you see here is my own recreation of the Candy Train game that was available on the web up until a few years ago. My version is an object oriented version written in VB.NET 2005, and is quickly becoming my favorite arcade-style game that I’ve written, even though it’s not even finished! Right now, the grid of track segments is randomly generated, each segment can be rotated right or left (via mouse clicks) to construct a longer continuous track. The “train” starts off as a red square (actually just a Label object, nothing fancy yet), and it follows the path that you arrange. You can control the speed using the speed adjustment (right now just two speeds, perhaps the finished version will have more?), and your score goes up faster as your train goes faster. Periodically (about 5 seconds) a new “rail car” will appear (shown as the purple square in the middle tile in the bottom row), and you have to flip track segments until your train travels through that tile. When it does, your train gets one car longer, and play continues. About every 10 seconds, one of the tiles starts flashing (the white bordered tile) for a few seconds, and then that tile gets replaced with a new randomly selected tile. This is to prevent you from just arranging a closed circle and racking up points! In fact, when I took the screen shot above, the tile flipped a split second and caused my train to crash.
Okay, I still have much more to go. Most importantly, I want to add better graphic images than just square labels. (Presumably, the code won’t need much modification with this change.) Then there’s all sorts of little things, like level control (have a “station” appear when the train reaches a predetermined length; bringing the train to the station completes the level), better score keeping, and perhaps even sound effects.
Not bad for a week’s worth of coding. This is fun.

About Mr. I

After 17 years as a PC Software Engineer I gave it all up in 2000 to become a High School Computer Teacher
This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s