DEVLOG#02 | Projectiles and weapon types #1.
With Phase two of the project fully under way I wanted to start adding more weapon types as well as introduce a number of new mechanics for the player. As part of the Ship Weapon Upgrade system the next thing on my list was Rockets.
Sounds cool right? But doesn't every other 8 bit shooter have them as feature? I wanted to make them fun and engaging to the player whilst adding a unique feature set to the game.
Projectiles | Smart Rockets.
I started brain storming ideas and decided rather than having standard rockets in my game I would use "Smart Rockets". That would not only seek out and enemy but would chain been enemies seeking out each ship one after one.
I wrote a simple script which allowed my projectile to follow an object based on its type. In this case the red squares on the screen. As soon as the projectile comes within range it would collide and destroy the first object it hits.
Fitting the Current theme for my game I wanted to use an energy ball rather than an actual model of a military style missile.
Projectiles | Implementation.
I set up my sprite and created a prefab object so this could get called from my Players Ship when fired. Being these were "Smart Rockets" we were talking about earlier I wanted to add more features to make the gameplay more satisfying. I suddenly remembered watching "Guardians of the Galaxy". In the Movie the character "Yondu" has quill which when released, moves through all enemies one by one and kills them. Seems pretty smart to me and also very cool!
Using this as a weapon type was so satisfying. I watched as It bounced between enemies in a chain seeking out the next in-line creating visuals Michael Bay would be proud off. But my next problem was finding a balance.
Projectiles | Finding a balance.
Sure this was very cool. But I felt it needed toning down.
I began implementing some fixes to the behaviour of the rockets.
To start, I slowed down the projectiles. Restricting firing from a longer cool down. If a rocket collides with an asteroid it destroys the rockets chain making firing the rocket a concious decision for the player as the this weapon type will have very limited ammo. Finally I made the number of enemies the rocket would actually chain through random.
Upon further testing I was happy with the balance this provided.
Thanks for reading and please feel free to leave a comment below.