Last night I decided that my Silverlight game wasn’t heading in the direction it should, so I went back to a previous iteration with some insights from my recent effort. I’ve had a problem getting the vision of the game solid in my head.
At first I had built a top-down, ship-centric shooter but I decided to try a map-driven, simpler game where you click on planets and then do your trading. I had the map part working nicely, but man it would have been a pretty dull game.
So mow I’m going for a model that’s much closer to Escape Velocity…top-down, player-in-the-center pew-pew game with a galactic map, commerce and weapon/ship upgrades. Last night I was able to (with the assistance of my older boy, Max) get a starfield moving under the ship, and move the ship around using velocity, etc. I still need to do the physics for thrust/velocity/turning, but for a guy that’s used to doing event-driven programming all the time, seeing this real-time action is pretty exciting.
One of the aspects of the game that I’m apprehensive about is building the AI for non-player ships (NPS? hehe). They’ll need to turn, thrust, fire weapons, target the player, etc. etc. Sometimes I think I’m getting a little too ambitious, but that’s what I need to do so I don’t get bored.
Where I am Now:
- The game universe is 30000×30000 pixels. I generate a background starfield using about 7,000 randomly-placed white circles.
- player ship in the center; a target reticle is moved by the mouse, which causes the ship to rotate to point at it.
- ship fires lasers when the left mouse button is clicked. no sound yet.
- ship increases velocity when the W key is pressed. the starfield moves in relation to the ships velocity/direction.
- Map currently represents one solar system. You can click on a planet and your ship ( a totally different ship ) appears there.
Next steps:
- Create the background more efficiently. The stars take too long to generate, IMHO, and maybe take up too much memory. I’m thinking a tiled bitmap would be better. Requires investigation.
- Get the thrust/maneuvering to be fluid. Add some graphics for thrust, sound too.
- Create a new data hierarchy to have star systems with planets/moons/stations. Each system should have a security rating, description, etc.
- Refactor the map to show star systems and enable jumping between those systems.
