Skip to content

Units and orders

For creatorsAdd-on 2.2.2+

You build a 96 m strategy map split by a rocky ridge, with 200 units of your own that you select, group and send across it.

▶ Play (the live scene already has the fighting from the next tutorial).

  • Click a unit to select it. Shift-click adds or removes one.
  • Drag a box to select everything inside it.
  • Double-click a unit to select every unit of that type on screen.
  • Right-click the ground to move there. S stops. Esc clears the selection.
  • Ctrl+1–9 stores the selection as a group. 1–9 recalls it; press it twice to centre the camera on it.
  • The arrow keys or the screen edges pan. The wheel zooms toward the cursor. Q and E rotate. The middle button orbits.

You command 150 troopers and 50 hover tanks. Twenty-six red units wait across the ridge; they fight back in the next tutorial. The ridge has two gaps. Order everyone across and the army splits between the gaps, streams through and forms up on the far side.

The whole game is objects, tags and data tables. You write no code.

  1. Make the ground. Add a plane 96 m on each side, centred on the origin.

  2. Make the scene a strategy map. In Properties ▸ Scene ▸ Custom Properties, add these scene tags as text (String) values:

    rts.map = 96,96
    rts.cell = 1
    rts.origin = -48,-48
    rts.player = 0
    rts.teams = #3b82f6,#ef4444

    The map is a grid of 1 m cells. You play team 0 (blue); team 1 is red.

  3. Set up the strategy camera. Add the camera tags from the Settings table: camera.mode = rts, where it looks first, how far and how steep, and the bounds it stays inside. They then show in Properties ▸ World ▸ Simulacrum ▸ Camera.

  4. Raise the ridge. Model the ridge and a few outcrops as boxes. Select each one and choose Properties ▸ Object ▸ Simulacrum ▸ Add Component ▸ Shooter & Strategy ▸ Strategy Rock. Every grid cell whose centre lies inside a box becomes rock. Leave two gaps in the ridge.

  5. Model the units. Model a trooper and a hover tank, each facing the way it moves (+Y in Blender). Name them Model_Trooper and Model_Tank. The game hides these models and draws one copy per unit.

  6. Write the unit table. In Blender’s Text Editor, make a new text named data/units.json. Each row is a unit type:

    { "format": 1, "title": "Unit types", "rows": [
    { "id": "trooper", "name": "Trooper", "speed": 4.0, "radius": 0.4, "model": "Model_Trooper" },
    { "id": "tank", "name": "Hover tank", "speed": 2.8, "radius": 0.8, "model": "Model_Tank" }
    ] }
  7. Write the start table. Make a second text, data/start.json. Each row places one unit, or a block of them:

    { "format": 1, "title": "Where the units start", "rows": [
    { "type": "trooper", "team": 0, "x": -46, "z": -14, "count": 150, "cols": 10, "spacing": 1.2 },
    { "type": "tank", "team": 0, "x": -34, "z": -12, "count": 50, "cols": 5, "spacing": 2.2 },
    { "type": "trooper", "team": 1, "x": 30, "z": 24, "count": 20, "cols": 5, "spacing": 1.2 },
    { "type": "tank", "team": 1, "x": 38, "z": 24, "count": 6, "cols": 3, "spacing": 2.2 }
    ] }

    x is east and z is south (Blender’s −Y), in metres.

  8. Add the help lines. Add two empties, each with Add Component ▸ HUD & Menus ▸ HUD Text. Give the first the mouse help and hud.touch = 0 (desktop only), and the second the touch help and hud.touch = 1 (touch screens only). Set hud.at = bottom on both.

  9. Press ▶ Play on the toolbar. Drag a box round your army, right-click beyond the ridge, and watch it split between the two gaps and form up on the far side.

  • Formations. A move order lays out a square grid of places round the target, facing the way the group travels. Units that will arrive first take the far rows, so later arrivals never push through units already standing.
  • One path for the group. The whole group follows one shared route that flows round rock. Two hundred units cost the same as one.
  • Room to stand. Units keep their bodies apart. A moving unit shoves a resting one aside.
  • Arriving. A unit that can get no closer for two seconds, while inside its formation, stops where it stands.
  • Rock. No unit ever stands in rock. A unit the crowd shoves against a rock face moves to the nearest free cell.
  • Exact every time. The game steps 20 times a second and keeps positions exact, so the same orders always play out the same way. That is what lets the online match work later.
Tag Values What it does
rts.map W,H in cells Makes the scene a strategy map, and sets its size
rts.cell metres, default 1 The size of a grid cell
rts.origin x0,z0 in metres The grid’s corner. Default: the grid is centred
rts.player team number, default 0 The team you command
rts.teams #hex,#hex,… Team colours, in team order
rts.units default data/units.json The unit-type table
rts.start default data/start.json The start table
rts.block 1 On a box: rock (the Strategy Rock component)
camera.mode rts The strategy camera
camera.rtsFocus x,z, default 0,0 Where the view looks first
camera.rtsDist metres, default 40 How far the camera stands back
camera.rtsPitch degrees, default 56 How steeply it looks down. The middle button orbits between 25 and 82
camera.rtsYaw degrees, default 0 Its turn. Q and E rotate it
camera.rtsBounds x0,z0,x1,z1 The view’s focus stays inside this rectangle
camera.rtsZoom min,max in metres, default 8,120 How near and far the wheel or a pinch zooms
hud.touch 1 or 0 On a HUD line: touch screens only, or desktop only

The unit table’s columns so far:

Column What it is
id The unit type’s name, used by the start table
name The name players see
speed Metres a second
radius The body’s radius in metres
model The name of the Blender object drawn for it

Next: combat and fog of war.