Your first scene
This tutorial builds a small scene from primitives and components: a ground, a cube, a light, and a script. It uses the components that ship in Kolpa.Engine.
1. New scene
Section titled “1. New scene”- Open a project. If you have none, File -> New Project creates one.
- File -> New Scene.
- File -> Save Scene (
Ctrl+S) and give it a name.
The scene is saved as a .scene file under the project’s scenes/ folder.
2. Open the scene panels
Section titled “2. Open the scene panels”- View -> Scene Hierarchy (
Shift+1): the object tree. - View -> Inspector: components of the selected object.
- View -> Asset Browser (
Shift+Space): project assets.
3. Add a ground
Section titled “3. Add a ground”- Create a new empty GameObject from the Scene Hierarchy.
- Rename it
ground. - In the inspector, Add Component -> Mesh Filter. Set Kind to Cube.
- Set Size so it looks like a wide floor, for example
10,1,10. - Add Component -> Mesh Renderer so it draws.
Because the cube is centered on its origin, set the Transform Position to 0, -0.5, 0 so the top surface sits at y = 0.
4. Add a cube
Section titled “4. Add a cube”- Create another GameObject and rename it
cube. - Add Component -> Mesh Filter, Kind = Cube, Size =
1,1,1. - Add Component -> Mesh Renderer.
- Set Position to
0,1,0so it rests on the ground.
5. Add a light
Section titled “5. Add a light”- Create a GameObject and rename it
sun(or use the world sun if the scene has one). - Add Component -> Point Light.
- Set Position above the ground, for example
1,2.5,1. - In the inspector, enable Cast Shadows.
The cube should cast a shadow on the ground.
6. Save and play
Section titled “6. Save and play”- File -> Save Scene (
Ctrl+S). - Press the Play button, or
Ctrl+P/Alt+P. - Use the demo player controls to look around, then toggle back to the editor with
Ctrl+P/Alt+P.
Continue reading
Section titled “Continue reading”Previous: Sample content: demo scenes and prefabs.
Next: Your first prefab: save a GameObject setup and reuse it.
