How to Build a 2D Platforming Character in Godot

Опубликовано: 22 Июль 2026
на канале: Thomas Yanuziello
565
11

Learn all this & lots more with my courses:
Patreon:   / tyanuziello  
Discord:   / discord  
Udemy: https://www.udemy.com/course/build-a-...
Skillshare: https://skl.sh/497zNpO

Section 1 Setup
Download Godot, create a new project, download assets and import.
Create new scene used for prototyping, add basic floor with collider.

Section 2 Controlling a Character
(This video) Create basic node structure of character and make it its own scene.
Separate input handling into its own script, then set up basic controls for moving left/right and jumping.
Export acceleration, deceleration, and speed in the character script, & have the character move realistically.
Add exported jump height variable, calculate jump force from jump height, adjust gravity & air control.
Add animation player to the character, create & populate animations for idle, run, jump, fall, and ground.
Add Animation Tree to character and use state machine to transition between animations.
Create animated sprites for dust effects & trigger them to sync with character's animations.
Assignment:  Build rest of characters.
Challenges:  Write basic AI script, switch character control with a button press.

Section 3 Building Levels
Use tile map to build basic level with terrain editing and physics layers.
Attach script to camera which will follow character.
Tween camera gently, looking ahead of character in all directions.
Use assets to create animated decorations and one-way platforms.
Create parallax scrolling background image with clouds blowing in wind that follows camera.
Add animated water to the foreground with collider that player can swim in.
Create separate level scene with boundaries to contain player and camera.
Assignment:  Build at least 2 levels with new tile sets, decorations, & level boundaries.
Challenges:  Change level backgrounds and write a script to chase player.

Section 4 Collecting Treasure
Create custom resource to store the player's information and node to access it.
Create coin scene with collision & add script to it so it will be collected when player collides with it.
Add canvas layer, coin image and text displaying player's coin count on screen.
Create skull scene, use polymorphism to repurpose the coin script to apply similar behavior to other treasure.
Create treasure chest which spawns a burst of coins when opened.
Add lock to treasure chest & key which can unlock it.
Create & add goal object which will end level. Fade scene in and out.
Assignment:  Populate your levels with treasure!
Challenges: Use treasure in your level to manipulate player behavior, create a new treasure type.

Section 5 Life & Death
Use custom collision polygons to implement spikes that hurt player on contact.
Have player character react to taking damage with animation, knockback, and invincibility.
Add health potion item that helps player recover lost health & display health gauge on the UI.
Create checkpoint that saves player's progress through level when reached.
Allow player to die when their health reaches zero & respawn them at last checkpoint.
Add attack animations for enemies and have them damage player.
Build game over menu that appears when player runs out of lives.
Assignment: Update all levels and characters to have required nodes.
Challenges: Tween menus on and off screen, add blue and green potions to your game.

Section 6 Combat
Create sword that player can pick up, equip, & drop upon death.
Add attack animations for player and use input buffering to process attack input more effectively.
Add aerial attacks and cooldown timer, limiting the amount of successive attacks player can perform.
Write AI scripts for enemies to have them patrol an area of your levels.
Add aggressive behaviours to your enemies to have them see, chase, & attack the player.
Build another enemy that shoots projectiles at player.
Create boss encounter that locks camera, displays the boss's health, and uses attack patterns.
Assignment: Add perception, targeting, and patrolling behaviours to all enemies. Build the cannon, box, & barrel.
Challenges: Make defeated enemies spawn treasure, give the seashell a bite attack.

Section 7 Progress
Pause game scene and display pause menu with options.
Build title scene to be set as the project's starting scene, transition to game scene.
Build level selection scene, provide access to any level.
Save/load the player's progress using save file resource.
Lock access to levels & unlock them as player completes prerequisites.
Add background music that fades in & out.
Export your project for distribution on multiple platforms.
Final Project:  Finish building this game or build a complete platforming game of your own design.