Jason's Thoughts 4 - Powershot
- Jason Koch (Programmer)
- Sep 10, 2015
- 1 min read
Due to us lacking additional purpose for our cannons we decided to add a mechanic where your cannon charges up to a powershot by holding the trigger down. This would be implemented so that when a player attempted to fire a shot, a circle would pop up on their cannon which would scale up and down. If a player released their trigger at the correct time a cannonball with increased firepower would be launched. The way I went about doing this, was first to implement the powershot mechanic into the game itself. This entailed a number of things including setting up timers for the correct launch and implementing a different type of cannonball model to be fired. Once the systems were in place I created two UI elements of a circle above each characters fort. I turned off the rendering for the circles so they were essentially invisible. On a shot being taken both circles would render, one being transparent the other scaling up and down from the centre. I synced the timing so that if you released the circle on top of the other, when they matched in size, a powershot would occur. The circle’s size was then reset and both circles’ renderers were once again turned off.
Comments