Thursday, September 15, 2016

Turret rotation, work progress and pad support

Hi!
I have recently mentioned turret rotation in one of my previous posts and today I am going to explain this new mechanics better.

Previously player turret was fixed in one position aiming straight forward. Our tank worked as an tracked "asteroid spaceship" constantly firing upward when we pushed the fire button. This kind of mechanics was fine in spaceship-like game but worked a little awkward in a game about tanks. As we well know almost all tanks can rotate their guns (or turrets) at least a copule degrees to aim enemies...


Now, players can use their mouses to target enemy vehicles and turn their turrets. However, this new feature has brought a copule of issues. Firstly, I was forced to create some kind of a system to allow first and coop player to rotate their turrets and cursors independently. Hopefully, I have separated tank controller from player input, so telling a tank where should it rotate the turret was not very difficult. The problem is, we have only one mouse and two players in front of a computer. So I am currently working on axis-based mechanics instead of mouse-based control. Then, coop player will be able to use numpad to control cursor position or... plug in USB pad and use analog controller to aim the enemy!

Another problem that occured, is - because players can rotate they turrets, avoiding enemy bullets is quite to easy - especially if they shoot only straight forward. So there will be more enemies with rotable turrets too and some old enemies learn new tricks.

But enough about controls, lets get straight to the game progress. I am currently unwrapping new boss turret - it will be finished until tomorrow. Moreover, I have changed how enemy bullets interact with other enemies and buildings. They no longer fly-through other enemies and structures, but "explode" instead, simillary to player bullets hitting static structures. However, enemy bullets do not damage other enemies. I decided, that it will be to easy for player and unfair, if enemies will be able to kill each other.





No comments: