Thursday, 23 July, 2020 UTC


Summary

When it comes to 2D game development, sprite animations are going to be a critical part of the game experience. No one wants to play a game with a static unappealing image that moves around on the screen. They are going to want vibrant animations that add a certain realism to the game-play experience, even with it being 2D.
There are a few ways to accomplish animations in game development. You could develop complex logic that swaps images on a sprite every time the render function updates, or you could work from a single spritesheet and iterate over the frames in that spritesheet.
One of the main benefits to spritesheets, beyond them being easy to animate in modern game development frameworks, is they are easy on the computing resources. Loading one image file is less resource intensive than loading several image files, and when it comes to smooth performance in games, how you manage your resources can make or break your game.
In this tutorial, we’re going to see how to animate 2D sprites in a Phaser 3.x game using simple spritesheets with JavaScript.
The post Animate Spritesheets in a Phaser Game appeared first on The Polyglot Developer.