
Build a 2d rpg in Godot 4 from scratch, featuring movement, health and mana, attack, animations, a finite state machine, crafting with recipes, inventory and equipment, quests, and npc interactions.
Clarify who this Godot 2D RPG course is for and how to get help fast, outlining prerequisites, expectations, and support through Discord and the Q&A section.
Learn to animate a 2d player in Godot 4 with AnimSprite, using 12 directional animations, a finite state machine for idle, walk, and attack, and weapon positioning with marker nodes.
Create a Godot 4 project for a 2D RPG game, configure the layout and viewport to 1280x720, apply nearest filter for pixel art, and import audio and sprite assets.
Create a player scene in Godot 4 using CharacterBody2D, with a shadow, 8 animations (idle and walk), a collision shape, camera follow, and a stats export group for WASD controls.
Build a finite-state machine in Godot 4 to govern a 2D game character, using idle, move, and attack states with enter, exit, and transitions.
Wire a finite state machine into the player, update direction from input, and play directional idle or walk animations using last direction, velocity, and move_and_slide in Godot 4.
Create a reusable health component with max and current health, initialize via setup, take damage, and emit on health change and on dead signals for use across scenes.
In this lecture, learn to implement player experience in a Godot 4 2D RPG by tracking base and current experience, calculating next level thresholds, and emitting level-up and stats updates.
Learn to implement attack positions in a Godot 4 2D RPG by creating four directional attack poses, animating the weapon, and wiring input-driven transitions in a finite state machine.
Enable weapon collision only during attack, position and rotate the weapon based on last direction, play the attack animation, then hide the weapon and return to idle.
Build a multi-section town for a Godot 4 2D RPG, with a main player area, houses, a shop interior, water section, enemy zones with elite foes, and neighbors-based floor painting.
Build a town zone in Godot 4 using a tilemap with terrain sets and floor and sand tiles, then paint, decorate, and prepare water and enemy zones.
Create a terrain node and a decoration tilemap to place walls, houses, and plants, then add collision shapes and doors for player interaction and future shop transitions.
Create a water zone by adding a water tileset and water floor terrain, painting water areas. Define collision shapes on a new physics layer, then decorate.
Create multiple enemy zones in Godot 4 by painting tiles, walls, and floors, adding decorations and collision shapes to build five distinct zones.
Create a special enemy zone in a Godot 4 2D RPG, with stronger enemies and better drops. Delete walls, paint tiles, add decorations, collision, and stairs.
Explore building a complete user interface for a 2d rpg in Godot 4, with experience, health, and mana bars, action buttons, and panels for equipment, inventory, stats, and skills.
Create the main buttons and HUD in Godot 4 using a canvas layer, panel, and horizontal container, then link them to toggle equipment, inventory, stats, and skills panels.
Build an inventory panel in Godot 4 by aligning four panels in an hbox, with a panel container that auto-sizes, a 5-column grid of 30 slots, and a gold display.
Create an equipment panel in Godot 4 by duplicating the inventory panel and adding four slots for helmet, sword, chest, legs, and ring.
Build and configure a stats panel that displays damage, hp, velocity, mana, critical chance, and critical damage, plus current level, points, and attributes strength, dexterity, and intelligence.
Build a skills panel in Godot 4 by creating a skills button layout using bbox and hbox containers, styling a button with icons and hover/press states, and adding lock indicator.
Create a skill hotbar in Godot 4 by duplicating the main panel, adding equipped skill buttons with icons, and labeling buttons 1–4 to load and use skills.
Create a hud with health, mana, and experience progress bars, customize styles, bind labels, and connect signals to update bars and text on health, mana, and level up.
Build a Godot 4 inventory system with item data for potions, food, and equipment, manage a 30-slot panel, and implement pickup, stacking, and use to affect health and mana.
Define an item resource and an item data subclass in Godot 4, exporting icon, name, description, price, isConsumable, maxStack, and a type enum (food, potion, scroll, equipment) for inventory items.
Build a Godot 4 inventory by creating SlotData resources, storing items in an autoload dictionary, and updating 30 inventory slots with item icons and quantities via signals.
shader_type canvas_item;
uniform vec4 shine_color : source_color = vec4(1.0);
uniform float shine_progress : hint_range(0.0, 1.0, 0.01) = 0.0;
uniform float shine_size : hint_range(0.01, 1.0, 0.01) = 0.1;
uniform float shine_angle : hint_range(0.0, 89.9, 0.1) = 45.0;
float scale(float value, float inMin, float inMax, float outMin, float outMax) {
return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}
void fragment() {
//COLOR = texture(TEXTURE, UV);
float slope = tan(radians(shine_angle));
float progress = scale(shine_progress, 0.0, 1.0, -1.0 - shine_size - shine_size * slope, 1.0 * slope);
float shine = step(slope * UV.x - UV.y, progress + shine_size + shine_size * slope) - step(slope * UV.x - UV.y, progress);
COLOR.rgb = mix(COLOR.rgb, shine_color.rgb, shine * shine_color.a);
}
Create a 30-slot inventory autoload in Godot 4, with slot data, addItem stacking up to max stack using getEmptySlotIndexes and findItemIndexes, and emit onInventoryChanged and onEquipmentChanged.
Update the inventory panel to show item and quantity by mapping each button to a slot index and loading slot data. Sync with inventory changes via getSlot.
Implement item movement in a Godot 4 2D RPG inventory by showing a hover selector, emitting slot signals on hover and click, and swapping or merging items between slots.
Learn to move items in inventory by creating a grabbed slot that follows the mouse, shows icon and quantity, and handles swap or merge with slots.
Implement item usage by validating consumables, reducing the item quantity, removing empty slots, and signaling the health system to heal using the health potion value of 2.
Create a mana potion in a Godot 4 2D RPG by duplicating the health potion and setting 5 mana. Apply id-based use logic and a mana function with max clamping.
Create an EquipData class extending ItemData with EquipType (helmet, body, legs, weapon, ring), implement getEquipKey, and manage GameData equipment for swapping items via equipItem and updating the equipment panel.
Equip items in a Godot 4 2D RPG by wiring the equipment panel and item icons for helmet, weapon, body, legs, and ring, with unequip returning items to inventory.
Create new items for your Godot 4 2D rpg, adding helmets, weapons, body, legs, rings, and food sprites like beef and fish for shop and crafting panels.
Review items in a Godot 4 2D RPG, including potions and food with IDs, and complete equipment such as body, helmet, legs, ring, and sword.
Update the stats panel in play mode to see current damage, hp, velocity, mana, critical chance, and critical damage in Godot 4, then spend points to boost strength, dexterity, intelligence.
Connect stats by adding strength, dexterity, and intelligence, and update all labels—damage, hp, velocity, mana, crit, level, points, and attributes—when the player is created in Godot 4.
Upgrade player stats by choosing strength, dexterity, or intelligence, increasing damage and max health, move speed and crit chance, or max mana and crit damage, all updating the stats panel.
Create a get_damage function that calculates total damage from base, skill, and equipment bonus damage; loops through equipped items and applies a crit multiplier based on critical chance.
Create enemy scenes with animations, a collision area, and health components, with enemies spawning across zones. Implement a finite state machine with wonder, follow, and attack states, plus loot drops.
Create an enemy scene in Godot 4 for a 2d RPG, including area2d detection, four directional animations, a shadow and selector, and a health component with max health and damage.
Create a Godot 4 2D RPG enemy spawner using an onEnemyDie signal, rectangle zones, and random spawn positions with a spawn rate and max enemies.
Build an enemy finite state machine to drive wandering behavior, with EnemyState and EnemyWonderState that target random points in the enemy zone and update animations by direction.
Implement the enemy follow state with a detect area, chase the player at a random speed between min and max, stop at 15 units, then return to wander on exit.
Create and manage an attack state in the enemy finite state machine for a Godot 4 2D RPG, handling attack duration, timing, and damage when the player is close.
Learn to add visual effects for damage and level up in a Godot 4 2D RPG by creating AnimatedSprite2D effects, a damage text label, and reusable FX at positions.
Add a health bar to enemies in Godot 4 using a progress bar, set min 0 max 1, update value based on health divided by max health on health change.
Learn to implement enemy targeting and damage in a Godot 4 2D RPG: select and deselect enemies, apply damage, update health bars, spawn damage effects, and delete defeated enemies.
Define a loot data resource with item and amount, attach a loot array to enemies, and drop a random item away from the player via dropItem async, using call defer.
Inherit from the base enemy to create new enemies with move animations, name consistently, and use an octopus as example, then set loot, health, and spawn zones.
Review enemies across five zones, each with one enemy reference: mouse, octopus, gray rex, dragon, gold raccoon, and cyclops, to reinforce enemy setup in Godot 4.
Create a skill data resource to configure mana cost, base damage, and explosion effects for multiple skills, then equip skills to the hotbar and trigger them with use skill calls.
Create a SkillData resource that extends item, detailing mana cost, base damage, and an explosion effect. Bind it to a skill button to load data, show icons, and manage unlocks.
Develop all nine in-game skills for a Godot 2D RPG by duplicating and configuring skills like shuriken and magic weapon.
Build reusable skill effects in Godot 4 by deriving from a base kunai scene, adding animated sprite frames from sprite sheets, enabling autoplay and zero-based frames, and deleting on finish.
Equip skills in the hotbar in Godot 4 by purchasing, loading, and storing skill data in four slots, updating coins, and enabling buttons to assign skills to the hud.
Bind skills to keys 1–4 in the Godot 4 input map and implement UseSkill to validate indices, spend mana, and damage the selected enemy. Show explosion effects and damage text.
Create NPC scenes, implement dialogue and a navigation-based movement system, and manage shop, quest, and crafting panels for interactions in a 2D RPG with Godot 4.
Create interactive npc scenes in Godot 4, using area2d, collision shapes, and animated sprites with a nav agent for town pathfinding, plus dialogue, shop, quest, and crafting panels.
Create a dialog panel user interface featuring an NPC icon and dialogue lines, with optional shop, quest, or crafting panels, and implement typing animation and signals for start and finish.
Demonstrate displaying npc dialogue in a Godot 4 2D RPG by wiring a dialogue reference, loading dialogue data, and showing a dialogue panel; advance lines with space and finish with onDialogFinish.
Learn to implement NPC movement in a 2D RPG with Godot 4 by building a navigation tilemap, painting the navigation layer, and using pathfinding with animations and debug.
Create new NPCs using the NPC symbol as the base scene, remove default references, add them to the town with optional movement, and link custom dialogues from data/dialogue.
This lecture builds a shop system using a portal to a shop interior, triggers a transition and dialogue with an NPC, opens a shop panel, and handles purchases.
Create a functional shop panel for a 2D RPG in Godot 4 by building a grid of buttons, item icons, and a coin display to show current coins.
shader_type canvas_item;
// Ranges from 0 to 1 over the course of the transition.
// We use this to actually animate the shader.
uniform float progress : hint_range(0, 1);
// Size of each diamond, in pixels.
uniform float diamondPixelSize = 10.0;
void fragment() {
float xFraction = fract(FRAGCOORD.x / diamondPixelSize);
float yFraction = fract(FRAGCOORD.y / diamondPixelSize);
float xDistance = abs(xFraction - 0.5);
float yDistance = abs(yFraction - 0.5);
if (xDistance + yDistance + UV.x + UV.y > progress * 4.0) {
discard;
}
}
Create an NPC shop in a Godot 4 2D RPG by adding an NPC to the interior, wiring dialogue to open the shop panel.
Load items into the shop by creating a shop button with an OnItemPurchase signal, update item icon and price, and dynamically populate the shop panel while managing coins and inventory.
Do you have a solid foundation in Godot 4 and want to take the next step toward building more complete and professional games?
Master Godot 2D: Create an RPG-Style Game with Godot is designed specifically for those who already understand the fundamentals of Godot and want to level up by building more advanced, organized, and reusable systems.
In this course, you’ll learn how to build a complete RPG-style game from scratch, packed with engaging mechanics. RPGs are generally one of the most complex genres to develop. In this course, you’ll learn how to tackle the hardest parts in the simplest way.
Throughout the course, you will learn how to:
Play animations based on movement
Create a Finite State Machine (FSM) system
Build a health system
Design levels using TileMaps
Automate TileMaps with rules
Create interactive panels
Master UI creation
Build a complete inventory system
Add an equipment system
Create custom items
Update player stats using attributes
Create enemy zones (enemy spawners)
Develop enemy AI using states
Build an enemy loot system
Create skills with unique effects
Equip skills using a hotbar
Add NPCs to the world
Implement NPC movement
Create a dialogue system
Build a complete shop system
Build a complete crafting system
Build a complete quest system
Master Autoloads
Create an audio system
Write clean, scalable code applicable to your own projects
Master nodes, signals, composition, and scene inheritance
Design a solid and flexible architecture
Each section is carefully designed to strengthen your programming logic and help you understand how to structure professional-level projects in Godot.
If you already know the basics of Godot and are ready to build a complete and polished RPG, this course will give you the tools to make it happen.