Sprite Characters with Keyboard Control

This is a project I made in response to a request on youtube to show how to make an animated sprite controlled by the keyboard.

We can do this with just a few steps.

1. load the image
2. set up the animations
3. detect keyboard presses
4. change the robot’s position
5. adjust the speed
6 change the direction of the robot’s graphic from right to left

Here is the final result
To follow along you’ll need the basic phaser template the phaser snippets and the image below

Here is the robot sprite sheet image

Leave a Comment