As you can see in my previous post, I've placed a mother ship symbol in my test map already. I'm thinking of having the mothership being out of reach from the player (for now) and dropping smaller objects that will attack the player.
What I did to prevent the player from shooting at the mother ship is to simply place it above the max player height. Basically you can only see it from a distance. I also added a large trigger sphere around the mother ship so that it triggers the launch of 4 tracking mines at the upper playable altitude when getting close.
Really my inspiration comes straight from movies with hanging motherships over large cities, such as V or Independance Day. I think it goes perfectly in line with the game's style.
Moving targets
The behavior I've been thinking for these tracking mines comes from memories of old C64 games I used to play when I was a kid.
More specifically Uridium http://www.youtube.com/watch?v=P_wwiFrUTGY
and Z http://www.youtube.com/watch?v=1hZBjZz5nWQ
In those games, some mine would chase you with strong inertia so you could avoid it simply by constantly steering up your ship in another direction.
I thought it would be nice to try that with many mines and see how the control performs. Initially I thought about the mines being able to change altitude as well, but when testing I realised they quickly would crash into the buildings and that made it too easy to the player to get rid of them. So instead they now keep waiting for you at the upper altitude.
The behavior is quite simple but effective:
- Take the current direction vector of the mine and add a portion of the vector toward the player so that the mine move more and more toward the player.
- As the mine gets closer to the player, it accelerates until a certain maximum speed is reach.
- Each mine produces a sound, and the pitch is modulated according to its age. At a certain age the mines explodes. So the sound gives you a hint as to when it will explode.
- All mines repulse each other (according to their respective distance), but if their speed is sufficient, they can crash one on another. This makes possible to eliminate mines without shooting by attracting several of them and then breaking away. With their own inertial speed they will crash on another.
Fireworks
Now that I have a basic shooting system in place (the player's ship fires bullets straight) and some moving enemies, it's time to see how shooting performs with moving targets.
Playing with the tracking mines is quite fun already, even at this early stage, but shooting them is not that easy because of the fixed fire direction. I take note and will investigate other possibilities later on.
Also in order to have a better feeling of accomplishment when shooting a mine (or when they self collide), I've added some temporary particle explosion. Here's a screenshot:
Next: Time to implement some game menu structure and the ability to load/unload levels to quickly test various level configurations.
No comments:
Post a Comment