The Power-UpsThe game felt a little "strategy-less" to me with infinite ammo and shields, so I thought, "Why not have some power-ups?" With that in mind, I sat down with TS4 and started modeling power-ups. Then I realized I didn't have a good idea of what to model! Power-ups usually aren't very realistic. I mean, they say "AMMO" on them, float with some kind of anti-gravity drive, and so on, but still they have to look right. In the end, I decided on simple transparent spheres with the words "AMMO" and "SHLD" glowing inside. The 3D model renderings are shown in Figure 15.15. Figure 15.15. The rendered power-ups.Once I had the 3D models down, I rendered the power-ups and got ready to put them in the game. I wanted the power-ups to appear as a result of destroying either an asteroid or an enemy, and I decided that it made more sense to put the power-ups inside the asteroids. My argument was that when you destroy an asteroid, debris and precious minerals (such as dilithium crystals) might be thrown out during the explosion. Sounds reasonable. :) When an asteroid is destroyed, it's as if a 10-sided die is rolled. If the die lands on the side labeled TRUE, a power-up is created (ammo or shields) and it moves away from the explosion site at a low velocity. When you run through the power-up, you absorb the material and either your shields or ammo increase. At first, I just created the power-up and let it float off. But I soon realized that space is vast, and the second I lost sight of the power-up, it was really hard to find. Sure, I could have put a blip on the scanner, but it made more sense to give the power-up a lifespan. Hence, when a power-up is spawned, it lives for 3–9 seconds and then dies. This way there are an infinite number of power-ups, and if you lose one, it's sure to get recycled and not just lost in space. |