Turret Visual Update & Cannonballs

Today’s been mostly about turrets. I started with updating the sprites to something I hope matches the theme of the game more. The turrets are now cannons used by a person that shoot cannonballs at the ships. To keep things simple, I’ll keep calling this cannon+person combination “turret” on the devlog.

Next up was to make the turret rotate so it is facing the ship it’s shooting. I decided to let the turret continue to rotate the target it is currently focusing as long as that target is in range. So even when the turret only shoots once per 2 seconds, it will continue to rotate around its axis every frame update.

Last up was adding projectiles / cannonballs. These are actual objects that cause damage on hit. So the turret no longer damages the ship, the actual cannonball does. For now, I’ve created this cannonballs in such a way that they will always hit the target it is originally shot at. It will continue to follow¬†the target until it hits it. Visually this isn’t really noticeable because of the speed the bullet travels. I think I will change this behavior later, calculating a cannonball trajectory when shot. This allows the bullet to miss if it’s not fast enough. This will also allow the cannonball to hit a different shit it wasn’t shot at (say ship 1 is too fast but ship 2 is tailing ship 1, causing the cannonball to hit ship 2).

Anyway, enough ideas for the future. Here’s a quick video of the new turrets in action.

Related Posts

  • Following the visual update for the level screen, the map has been updated as well.…

  • Today I visually updated the UI control buttons (on the top of the screen). The…

Leave a Reply

Your email address will not be published. Required fields are marked *