It's time for the fourth devlog of my shoot'em up game. In this episode I walkthrough my latest implementations regarding animation, HUD and enemy fire in Swift, SpriteKit and GameplayKit.
The game is moving forward and we now have a basic HUD in place. Visually nothing special but it provides the core functionality of how the HUD shall interact with and render the game data to screen.
I've also added a first pass of sprite animation handling with an
AnimationComponent. That is a
GKComponent which receives the animation frame sequences via a dictionary containing associated animation states.
The implementation is still a bit crude for this component and I'll keep ironing it out as I add animation support for more entities.
And at last, but not least, I've added the initial code to allow enemies to start firing bullets so they are now attacking the player. Each enemy bullet is a
GKEntity with a
MovementComponent. This setup will allow for more advanced enemy bullet patterns moving forward. The bullets are also part of the collision handling so the player takes damage when getting hit.