Tutorial: The Village Gate (3D)
1. Set up the project
Import the textures and the starter scene, open it, and take a first walk.
Download the pack
Download tiny-rpg.zip and unzip it somewhere you can find it.
Import the textures
Open editor.trisgine.com.
In the Project panel, double-click the Textures folder if you have one. Otherwise stay in Assets; the folder doesn't matter, only the UUIDs do.
Choose Assets > Import… and select the eight texture files: the four
.pngfiles and their four.png.mtsidecars.You can also drag all eight from your file manager and drop them onto the editor.
The .mt sidecars carry each texture's UUID (7A11C0DE00000001 to …04). Import them
together with the images, and the starter scene will find them.
Import and open the starter scene
- In the Project panel, go to
Assets/Scenes(if you don't have it yet, stay inAssets). - Assets > Import…, then
VillageStarter.tgscene. - Double-click
VillageStarterin the Project panel to open it.
You should see grass, a grey stone house, an orange capsule (the villager), a wooden fence with a gate in the middle, and three small yellow cubes behind it.
Take a walk
- Press ▶ Play.
- Move the mouse over the Simulation panel. The player only listens while it's there.
- Walk with W A S D and look around with the mouse. Hold Shift to run. Esc gives you the mouse cursor back.
- Press ■ Stop. You're back at the start.
Nothing reacts yet: the coins don't collect, the gate doesn't open, the villager ignores you. You'll fix all of that with scripts.
What's in the starter scene?
Open the Hierarchy: Player, Sun, Ground, House, Villager, FenceLeft, FenceRight, Gate, Coin1–3. Click each one and look at its Inspector.
The scene file itself is plain text. This is the top of it:
configs:
update:
-MoveByVelocity
-RotateByAngularVelocity
-DistanceToPlayerSquare
-ScriptRun
-WorldMatrix
input:
-FreeLookCamera
render:
-ViewMatrix
-ShadowRendering
-SortedSubmissionRendering
-SkyboxRendering
entities:
-Player:
-PerspectiveCamera:60
-Position:0,1.6,-14
-Rotation:0
-Rotation2D:0,0
-Color:0.45,0.65,0.9
-PlayerTag
-PlayerInputTag
-Gate:
-Material:EAF81A2663BA92E,7A11C0DE00000003,0.6,0.4,0.25
-Primitive:Cube,4,3,0.4
-Position:0,1.5,6
-Rotation:0
-Scale:1update:andinput:list the systems that run every frame, in order. FreeLookCamera is what makes the player walk. DistanceToPlayerSquare works out how far each object is from you, and ScriptRun, which comes after it, will run your scripts.Playeris the camera you look through: thePlayerTag/PlayerInputTagtags mark it.Gateis a 4 × 3 × 0.4 box, textured with wood (…03) and tinted brown.
The full format is in the scene format reference.