Player scene
Open a new scene and add a KinematicBody2D object named Player as the root and save the scene (don't forget to click the Make children unselectable button). When saving the Player scene, you should also create a new folder to contain it. This will help keep your project folder organized as you add more scenes and scripts.
As you've done in other projects, you'll include all the nodes that the player character needs to function in the Player scene. For this game, that means handling collisions with various game objects, including platforms, enemies, and collectibles; displaying animations for actions, such as running or jumping; and a camera to follow the player around the level.
Scripting the various animations can quickly become ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access