The horde on a real map
For creators
You move the horde onto a real neighbourhood: every building is a real OpenStreetMap footprint, and the waves come from where the streets leave the map.
▶ Play: the controls of tutorial 21.
What you get
Section titled “What you get”The map is 300 × 380 m of West Ashley in Charleston, South Carolina, round the Harrell Square shopping centre. These are the same streets the hover racer’s track runs on (tutorial 13). Buildings stand where they stand in the real world, turned the way the real streets run, and the zombies chase you round them.
Build it
Section titled “Build it”-
Start from the horde. Keep the hero, the controls, the tables and the pickups from tutorial 21.
-
Lay out the area. Model the real streets as one ribbon mesh, and each building as a prism: its OpenStreetMap outline, raised to its height. Take the height from the building’s map tags: its height, else its number of levels × 3.2 m, else 7 m. Pave the commercial lots and grass the rest. With add-on 2.2.0, Properties ▸ World ▸ Simulacrum ▸ Map fetches the outlines for you: each building and lot arrives as a flat shape carrying its map tags, ready to raise (Placing things).
-
Write the footprint table. In Blender’s Text Editor, make
data/footprints.json, with one row per building:{ "format": 1, "title": "Building footprints", "rows": [{ "id": 440404366, "h": 7.0, "pts": [[-71.91, -165.69], [-74.85, -183.96], [-108.53, -178.61], [-105.6, -160.35]] }] }his the height in metres andptsis the outline:[x, z]points in metres,xeast andzsouth (Blender’s −Y). -
Point the horde at it. Add the scene tag
horde.footprints = data/footprints.json. The buildings become walls for the hero and rock for the zombies, both from the same outlines. -
Size the grid to the map. Set
horde.map = 300,380andhorde.origin = -150,-190. -
Keep a city-sized chase smooth. Add
horde.chaseNear = 20,horde.chaseBlock = 2,horde.chaseFarBlock = 24andhorde.chaseBudget = 4000. Within 20 m a zombie heads straight for you when it can; farther out it follows a route that covers the whole map, worked out a little each step so the game never stutters. -
Spawn from the edges. Put the spawn points where the streets leave the map, and raise
horde.minDistto30so no wave is born on top of you. -
Press ▶ Play. Run behind the shopping centre. The runners go round it to reach you on the far side, and you stop at its walls even where they are turned off the grid.
How it plays
Section titled “How it plays”- A building is its outline, never its box. A building turned off the grid would fill the corners beside every wall if it were a box. Here the hero and the zombies both follow each wall to within a cell.
- Zombies go round. Born behind a building, they find their way round it to you.
- Only what is mapped is there. The map holds what OpenStreetMap holds. Round the shopping centre the homes aren’t mapped, so this map has 13 buildings. Trees and abandoned cars are set dressing you add yourself.
Map data from OpenStreetMap is © OpenStreetMap contributors. Credit it where you share your scene.
Settings
Section titled “Settings”| Tag | Values | What it does |
|---|---|---|
horde.footprints |
a table, such as data/footprints.json |
The building outlines: walls for the hero, rock for the zombies |
horde.chaseNear |
metres, default 0 (off) |
Within this distance a zombie heads straight for you when nothing is in the way |
horde.chaseBlock |
cells, default 1 |
How finely the near chase follows you. 2 suits a city |
horde.chaseFarBlock |
cells, default 16 |
How finely the far chase follows you |
horde.chaseBudget |
cells, default 0 |
How much of a far route is worked out each step, so the game never stutters |
The footprint table’s columns:
| Column | What it is |
|---|---|
id |
The building’s id |
h |
Its height in metres |
pts |
Its outline, [x, z] points in metres (x east, z south) |
Next: walk-in buildings.