๐ŸŽฎ Summer Coding Quest
Week 1 ยท Day 2

Build a 3D World

Turn yesterday's blank grey window into a real 3D scene โ€” a ground to stand on, a sun in the sky, a camera to see through, and a player.

โฑ About 45โ€“60 minutes
๐ŸŽฏ Today's mission Raviv, by the end of today you'll press Play and see a proper 3D world: a green floor, a glowing box standing on it, lit by sunlight, viewed through your own camera. The first time your own 3D world appears on screen is a brilliant feeling โ€” let's get there.

What you'll learn

๐Ÿ’ก Before you start Open the My First Game project you made yesterday (double-click your Godot shortcut, then click the project). Everything today builds on it.

Part 1 โ€” A fresh 3D scene

  1. Start a new scene

    Top menu: Scene โ†’ New Scene. You'll see options for the type of root node.
  2. Choose "3D Scene"

    Click 3D Scene. A node called Node3D appears, and the middle of the screen switches to a 3D view with a grid floor and coloured arrows. This is your empty world.
  3. Rename it and save

    Double-click Node3D in the Scene panel and rename it World. Press Ctrl + S and save it as world.tscn.
๐Ÿ’ก Getting around the 3D view Hold the middle mouse button (the scroll wheel) and move the mouse to orbit the camera. Scroll to zoom. Hold Shift + middle button to slide sideways. Have a quick play โ€” you can't break anything by looking around.

Part 2 โ€” Add the ground

  1. Add a shape node

    Click World, then + Add Child Node. Search for MeshInstance3D and create it. A MeshInstance3D is "a slot for a 3D shape" โ€” right now the slot is empty, so nothing shows yet.
  2. Put a flat shape in the slot

    With the MeshInstance3D selected, look at the Inspector on the right. Find Mesh, click the box next to it that says <empty>, and choose New PlaneMesh. A flat square appears โ€” that's your ground.
  3. Make it bigger

    Click the word PlaneMesh that just appeared in the Inspector to open its settings. Set Size to 20 ร— 20. Now it's a proper field, not a tile. Rename this node Ground.

Part 3 โ€” Add the sun and a player

  1. Add sunlight

    Select World โ†’ + Add Child Node โ†’ DirectionalLight3D. This is the sun. To stop it shining straight down flat, select it and in the Inspector set Rotation X to about -45.
  2. Add the player block

    Add another child of World: a MeshInstance3D. Give it a New BoxMesh (same way as the plane). Rename it Player.
  3. Lift the box onto the ground

    The box is half-buried in the floor. With Player selected, set its Position Y to 0.5 in the Inspector. Now it sits neatly on top.
๐Ÿ’ก X, Y and Z โ€” the three directions Everything in 3D has a position made of three numbers: X is left/right, Y is up/down, and Z is forward/back. The box was sunk halfway because the floor sits at Y = 0 and the box is 1 tall, so its middle needed to go up by 0.5. You'll think in X/Y/Z constantly from now on.

Part 4 โ€” Add a camera and press Play

  1. Add the camera

    Add one more child of World: a Camera3D. This is the eye your game looks through. Right now it's at the centre looking forward, which isn't a great view.
  2. Pull the camera back and up

    Select Camera3D and in the Inspector set Position to X 0, Y 4, Z 8. Then set Rotation X to about -25 so it tilts down towards the box.
  3. Run it

    Press F5. Godot asks for a main scene the first time for this scene โ€” pick Select Current. Your 3D world opens: a green-grey floor, a box standing on it, lit from the side. ๐ŸŽ‰
โœ… You did it! That box on a sunlit field is the seed of your whole game. Everything โ€” the trees, monsters, villages โ€” gets added to a world built exactly like this one.

Understand it โ€” the four ingredients

Every 3D scene you'll ever build needs the same four kinds of thing. You just added all four:

1. A world to hold everything โ€” your World (a Node3D). A Node3D is simply "anything that has a position in 3D space". It's the tray everything else sits on.

2. Something to see โ€” your Ground and Player (MeshInstance3D). A mesh is any 3D shape: a box, a sphere, a whole castle. If you can see it, it's a mesh.

3. Light โ€” your DirectionalLight3D. Without light, a 3D world is pitch black, exactly like a real room with the curtains shut. "Directional" light acts like the sun: parallel rays coming from one direction.

4. A camera โ€” your Camera3D. The world might exist, but you only see the slice the camera is pointed at. Move the camera, change what the player sees.

๐Ÿ’ก The logic to remember World + Mesh + Light + Camera = a scene you can see. If you ever press Play and get a black screen, run through the list: is there a light? is the camera pointing the right way? Nine times out of ten that's the problem.

Play around โ€” level up ๐ŸŽฎ

๐ŸŸข Level 1 โ€” Easy Give your player some colour. Select Player โ†’ in the Inspector find Material Override โ†’ New StandardMaterial3D โ†’ click it โ†’ set Albedo (that just means "base colour") to your favourite colour. Run it.
๐ŸŸก Level 2 โ€” Medium Add a second box somewhere on the field as an obstacle. Give it a different colour and a different Position X and Z so it sits apart from the player. Now your world has scenery.
๐Ÿ”ด Level 3 โ€” Spicy Move the Camera3D to a bird's-eye view: try Position Y 12 and Rotation X -90 (straight down). How does the whole game feel different from above? Lots of strategy games use exactly this camera.
๐Ÿ”ฌ Experiment: turn off the sun Select the DirectionalLight3D and untick Visible at the top of the Inspector (or just delete it). Run the game โ€” everything goes dark! Put it back. Now you can feel why every scene needs a light.

If something went wrong

"Everything is black when I press Play." You're missing a light, or the light is rotated to point away. Add a DirectionalLight3D to World and set its Rotation X to about -45.

"I press Play and see nothing / a tiny dot." The camera is probably inside the floor or facing the wrong way. Re-check Camera3D Position (0, 4, 8) and Rotation X (-25).

"My box is sunk into the floor." Set the Player's Position Y to 0.5 so its middle sits half a box above the ground.

"I added MeshInstance3D but nothing showed up." The Mesh slot is still empty. Select the node and give it a New PlaneMesh or New BoxMesh in the Inspector.

Tomorrow that box stops standing still โ€” you'll drive it around with the keyboard. ๐Ÿ•น๏ธ

Previousโ† Day 1 โ€” Set up & Hello World