Arena Survivor: Part 1: Your First 2D Game
Set up a Godot 4 project, create a CharacterBody2D player with keyboard movement using velocity and move_and_slide(), and build your first playable 2D scene.
No login required.
Setting Up Your Player
Every Godot game starts with a script. In the next 3 steps you'll declare a player node, set its speed, and connect its sprite. Watch the game panel: each line you write changes something visible.
Game objects in Godot are scripts attached to nodes, so this is where everything starts.
Loading game...
Click the game window to interact with it
What You'll Build
You will create a player character that moves in all four directions using keyboard input. The player is a CharacterBody2D node with a Sprite2D and CollisionShape2D, controlled by Input.get_vector() and move_and_slide(). By the end of this part you have a character that responds to WASD or arrow keys in a Godot 4 scene.
Learning Goals
- ✓extends CharacterBody2D and the node lifecycle (_ready, _physics_process)
- ✓Input.get_vector() for four-directional movement
- ✓velocity assignment and move_and_slide() for physics-based movement
- ✓Basic scene tree structure: Node2D, Sprite2D, CollisionShape2D
GDScript Concepts in This Part
Tips
- ✨Use Input.get_vector() instead of checking each key individually — it handles diagonals and returns a normalized vector automatically.
- ✨Always call move_and_slide() after setting velocity; it handles delta time internally.