Full workshop recording on the Durham University Computing Society YouTube Channel
-
Start a new project
-
Start a scene with a Node2D and name it 'Scene'
-
Start another scene with a Node2D and name it 'Character'
-
Add child nodes to this scene so that it has the following structure:
- Node2D <-- 'Character'
- CharacterBody2D
- CollisionShape2D
- Sprite2D
- CharacterBody2D
- Node2D <-- 'Character'
-
Go to Project Settings -> Input Map (2nd tab)
- Add the following actions, and press the + button to attach keys to them
Action Suggested Buttons "Left" <A>, <←> "Right" <D>, <→> "Up" <W>, <↑>, or <space> (jumping) "Down" <S>, <↓>
- Add the following actions, and press the + button to attach keys to them
-
Atach a script to the CharacterBody2D Node
-
Use the code in 2D-Movement.gd to allow your character to move!
You can either have your movement be top-down by not adding the gravity elements in the file, or a traditional side-scroller/ platformer style with jumping and gravity implemented
A full template Godot Project can be found in Basic Godot Projects/2d_movement.zip
-
Start a new project
-
Start a scene with a Node3D and name it 'Scene'
-
Start another scene with a Node3D and name it 'Character'
-
Add child nodes to this scene so that it has the following structure:
- Node3D <-- 'Character'
- CharacterBody3D
- MeshInstance3D
- CollisionBody3D
- Node3D <-- 'Neck'
- Camera3D
- CharacterBody3D
- Node3D <-- 'Character'
-
Go to Project Settings -> Input Map (2nd tab)
- Add the following actions, and press the + button to attach keys to them
Action Suggested Buttons "Left" <A>, <←> "Right" <D>, <→> "Forward" <W>, <↑> "Back" <S>, <↓> "Jump" <space> - The mouse perspective movement will be handled by capturing mouse movements using Godot mouse modes (.MOUSE_MODE_CAPTURED)
- Add the following actions, and press the + button to attach keys to them
-
You'll need a surface in the 3D Scene to walk on, so add a surface mesh, MeshInstance3D with a cubic StaticBody3D & CollisionShape3D to stop your character from falling into the void. Use the following structure:
- MeshInstance3D
- StaticBody3D
- CollisionShape3D
- MeshInstance3D
-
Atach a script to the CharacterBody3D Node
-
Use the code in 3D-Movement.gd to allow your character to move!
A full template Godot Project can be found in Basic Godot Projects/3d_movement.zip
Demo Game - Play it on Itch.io!
Full Godot Project folder
The Demo Game implements both 2D and 3D movement, with both a 2D and 3D scene that you can toggle between to play different takes on the same game concept.
The game fits the DurJam: Remastered (2025) theme 'A Twist on a Classic' as it twists the platformer genre; instead of the aim being to get to a particular place using the mechanic of the platforms, the goal is to have visited every platform.
The blue texture of the platforms turns red when they have been visited.
Visiting every platform extends to the 2D demo minigame, and the concept is further twisted on by the new mechanic of toggling platforms. Visiting a platform twice will un-select it, turning it blue again. This means that the player must find a route to all platforms that visits each platform an odd number of times.
By pressing <Q> in the 3D demo, you can switch to this alternate game mode to try out this new concept in the 3D environment.
- Controls
- <W, A, S, D> for movement
- <space> to Jump
- <E> to switch between 2D & 3D demos
- <Q> to switch to alternate, toggle platform (hard) mode
3D textures sourced from Polyhaven.
-
Beginner's Guide to Textures & Meshes in Godot 4 - Explore Game Dev (YouTube)
-
- The best resource for working with GDScript