Friday, February 4, 2011

Debuggy Spaceships

I have made much progress with Dreadnaught, my Star Control 2-inspired space adventure game.

The game now loads spaceship designs and images from files and can construct such spaceships in the combat space. The files are entirely human-readable, so people will be able to mod in their own spaceships.

If you zoom in on the picture above, you will notice that each spaceship has a blue triangle, and some red dots near the edges. These are debugging tools. The blue triangle shows where the computer thinks the spaceship is, and the red dots show the collision hull. This allows me to line them up properly. I made the spaceship entirely white for clarity; the actual game will have beautifully drawn pixel-art spaceships, asteroids, beams, particles and so forth.

The collision hull, mass, rotational inertia, center of mass and all other physical properties are calculated from the spaceship image to make sure that they match. This has the consequence that, if you make a spaceship with only one opaque pixel in its texture, that it will be very light and quick, but also very fragile and having very small energy reserves. There is also no hard limit on how big a ship may be; it just depends on what your computer can handle.

No comments:

Post a Comment