The city by district
For creatorsAdd-on 2.2.2+
You open the horde up to about 1.5 × 1.5 km of a real downtown. The whole city never loads at once: only the part round the hero is built and simulated.
▶ Play: the controls of tutorial 21. You start in Marion Square, in downtown Charleston.
What you get
Section titled “What you get”The map runs from Marion Square and King Street to the College and the Cooper River waterfront: nine districts with more than 2,000 real buildings. Run in any direction and the city keeps coming. Zombies you can’t see yet are already on their way.
Tiles and districts
Section titled “Tiles and districts”- A tile is a 128 m square of the city: the unit that loads and unloads.
- A district is a block of 4 × 4 tiles, about 514 m across.
- This map is 3 × 3 districts: 12 × 12 tiles.
Each tile has its own data table, with its buildings (outline and height), streets, parks, lots, water and trees. An index table lists every tile, its street spots (points on its streets, clear of buildings, where zombies enter) and its population (the zombies it starts with).
Build it
Section titled “Build it”-
Start from the real map. Keep the hero, the tables and the chase settings from tutorial 22.
-
Add the tile tables. Add the index as
data/tiles.json, and each tile’s table asdata/tiles/<i>_<j>.json, as texts in the Text Editor. Point the scene at the index withhorde.tiles = data/tiles.json. -
Set the window. The game simulates a window of 3 × 3 tiles round the hero. Add
horde.window = 3and size the grid to the window:horde.map = 384,384(three tiles of 128 cells). -
Make the city’s materials. The city is built from the tables, so you never model it. Instead, add one small template object per surface, give each Add Component ▸ Shooter & Strategy ▸ City Tile Material, and set
horde.tileMaterialtoground,street,park,water,lot,wall0,wall1,wall2orroof. Give each template the material you want. The game paints every tile with them and hides the templates. -
Make the trees. Model two trees, give each Add Component ▸ Shooter & Strategy ▸ City Tile Prop, and set
horde.tileProptotree0andtree1. The tiles place them in the parks. -
Press ▶ Play. Run east along a street from your start. The city builds ahead of you, and zombies come out of the streets you have just reached.
Change a template’s colour and the whole city follows.
How it plays
Section titled “How it plays”- The window follows you. When you go more than 6 m past the centre tile, the window moves with you. Zombies left outside it become a count in the tile they stood in.
- The city drifts toward you. Outside the window, each tile’s zombies step one tile toward you every 128 s (walking pace at the default setting). They never cross water.
- Waking. When a tile comes into the window, its zombies come out of its street spots, at least 30 m from you, already hunting you. Waves still come too, from the edge of the window.
- No stutter. Tiles within two of you are built a little at a time, nearest first. Tiles more than three away are removed.
Limits
Section titled “Limits”- A zombie waking at the window’s edge appears from nowhere, 30 m or more away. It is usually lost in the fog, but you may see one pop in.
Settings
Section titled “Settings”| Tag | Values | What it does |
|---|---|---|
horde.tiles |
the index table, such as data/tiles.json |
Makes the map load by tile |
horde.window |
tiles across, odd, default 3 |
The part of the city that is simulated. horde.map must cover it |
horde.hyst |
metres, default 6 |
How far past the centre tile you go before the window follows |
horde.drift |
metres a second, default 1 |
How fast the unseen zombies drift toward you. 0: they stay put |
horde.spawnBudget |
default 8 |
The most zombies that come into the window in one step |
horde.tileMaterial |
ground, street, park, water, lot, wall0, wall1, wall2, roof |
On a template: the surface its material paints |
horde.tileProp |
tree0, tree1 |
On a template: the tree it is |
Next: the nav mesh.