Tutorial: The Village Gate (3D)
8. Polish & share
Sky, fog and sound, saving properly, sharing your village, and ideas for what to build next.
Mood: sky, fog, light
Click Settings at the top of the Hierarchy:
- Sky (day/night): set a late-afternoon time of day for long shadows.
- Fog: a light blue-grey fog hides the edge of the world.
- Post-process: try ambient occlusion and anti-aliasing.
The Sun entity's direction controls the shadows. Select it and turn it.
Sound
- Import a gentle loop (birds, wind) as
.oggor.wav. Sites like freesound.org have CC0 sounds. - Right-click the Hierarchy, then Audio Source. Put it by the house.
- In the Inspector: pick the clip, Gain
0.6, AttMin2, AttMax30, tick Loop.
You'll hear it grow louder as you walk towards the house. (Click the page once if the browser is holding audio back.)
Save, and keep a copy
- Ctrl+S, then check that the orange Unsaved pill is gone.
- Your village lives in this browser only (see Saving & storage). Keep the tutorial pack and your own source files on disk.
Sharing
There's no "publish" button in the web editor yet. To give your village to a friend:
- Send them the tutorial pack (or your own textures with their
.mtfiles). - Send your
VillageCoin,GateandVillagerscripts. In the Script Editor, use the Text tab and copy each one into a.tgscriptfile. - Send the scene. The finished reference version is VillageComplete.tgscene.
They import the textures, then the scripts into Assets/Scripts (the scene refers to them
by that path; create any script there first with Script Editor > New so the folder exists),
and then the scene.
You made a game
What you used:
- Import and UUIDs to bring art in;
- Pixel Art for your own textures;
- primitives, CSG, materials for the world;
- visual scripts with a distance check, a branch, and position changes;
- a UI canvas for the HUD;
- Play mode to test.
Where to go next
- Add more villagers and more gates. Each needs its own copy of a script with its own coordinates.
- Build a moving platform with
SetVelocityand aKeyDowncheck; see Visual scripting. - Paint a top-down overworld map with Tilemaps for a future 2D version.
- Hand the whole thing to an AI: an agent builds this RPG for you.