Wednesday, October 17, 2007

Silverlight - Truck Wars Strategy Game v2.0

[This was originally posted at http://timstall.dotnetdevelopersjournal.com/silverlight__truck_wars_strategy_game.htm]

Release 2.0 - Migrated to SL2

Microsoft has officially released Silverlight 2.0, and there are more breaking changes. I haven't updated TruckWars yet (it's gone through Alpha 1.1, Beta 1, Beta 2... running out of gas). Here's a screen shot of what it looked like. I hope to migrate sometime in the future, perhaps even adding dynamic scripting for the objects.

 

truckwars_screenshot_1_2.jpeg


Release 2.0 - Migrated to SL2 Beta 2

I started working on TruckWars as a way to learn Silverlight back in the Alpha last year. There have since been two more betas (with plenty ofbreaking changes), but I've finally migrated it.

 

Things of note - Beta 1 started supporting buttons, which obviously simplified things. For example, it helped me remove keyboard input. It also had some subtle changes that affected the gameplay. Also, there still is no dropdown. Before I was using an HTML dropdown to select the levels. Rather than jump through hoops, I just ceded the dropdown part until the next release.

 

Because the code has been migrated from an alpha, to a beta, to another beta, it's becoming pretty screwy. Not the best, most agile code out there, but good for a demo of what cool stuff Silverlight can do.


NOTE: You need to view this page in a browser in order to see the game; it doesn't show up in most RSS feeders.

 

Release 1.3: Now Open-Sourced

TruckWars is a simple SilverLight real-time-strategy game. You control the green units. You select a unit by left-clicking it. You move a unit by drag and drop. You attack an enemy unit by moving your unit into the enemy unit's space. The goal is to push all the green buttons down.TruckWars is now open-sourced at CodePlex. It's also on the Silverlight Gallery.

Release 1.1

This is a simple SilverLight real-time-strategy game. You control the green units. You select a unit by left-clicking it. You move a unit by drag and drop. You attack an enemy unit by moving your unit into the enemy unit's space. The goal is to push the numbered crates onto the pink "Victory" tiles, and then hit the green semi-circle button. You can see more info on the release notes.

Release 1.0

I converted the XNA game to Silverlight. This is a simple SilverLight real-time-strategy game. You control the green units. You select a unit by left-clicking it. You move a unit by drag and drop. You attack an enemy unit by moving your unit into the enemy unit's space. (SilverLight only allows a left click). Currently only the tanks can attack. The ambulance and pickup truck don't do anything yet. The goal is to push the numbered crates onto the pink "Victory" tiles, and then hit the green semi-circle button. Select the game (to activate it), and then click "spacebar" to start. Obviously this is just a simple test of SilverLight, and I'm open to suggestions. I'm going to explain the code in the next several posts. I was inspired by my son's love of trucks to use the truck theme. I was definitely helped by Bill Reiss's good Silverlight Tutorials.

No comments:

Post a Comment