Living HordesDocumentation

Systèmes centrauxCore systems

Simulation

Project Zomboid tient quelques centaines de zombies autour du joueur. Living Hordes en simule des dizaines de milliers sur toute la carte. L'écart se comble en n'en rendant presque aucun réel.

Project Zomboid holds a few hundred zombies around the player. Living Hordes simulates tens of thousands across the whole map. The gap is closed by making almost none of them real.

Trois formes d'une même populationThree forms of one population

Un zombie de Project Zomboid est un objet de jeu complet : un corps, un calculateur de chemin, un inventaire, une machine à états. Quelques centaines, c'est ce pour quoi le moteur est fait.

A Project Zomboid zombie is a complete game object: a body, a pathfinder, an inventory, a state machine. A few hundred is what the engine is built for.

Le mod garde donc la même population sous trois formes, et convertit de l'une à l'autre à mesure qu'un joueur approche.

The mod therefore keeps the same population in three forms, and converts from one to another as a player draws near.

  • Un groupe est un nombre, pas une liste : une position, un effectif, une destination et une graine de personnalité. Les groupes couvrent la carte entière et continuent de vivre sans personne à côté (voir Migration et Dynamique des hordes).
  • A group is a number, not a list: a position, a count, a destination and a personality seed. Groups cover the entire map and go on living with nobody nearby (see Migration and Horde dynamics).
  • Un individu a sa propre position, sa direction et son apparence, mais reste une coordonnée. Rien n'est affiché, rien ne calcule de chemin.
  • An individual has its own position, direction and appearance, but remains a coordinate. Nothing is drawn, nothing computes a path.
  • Un zombie réel est la seule forme qui puisse voir, entendre, cogner à une porte et se faire tuer.
  • A real zombie is the only form that can see, hear, bang on a door and be killed.

Où vit chaque formeWhere each form lives

Le zombie réel vit dans le terrain que le jeu a chargé. Le jeu ne charge pas un disque autour du joueur mais un carré de terrain, dont la taille dépend de la résolution de l'écran, et qui se décale vers l'avant quand le joueur roule en voiture. Le mod relit ce carré à chaque image et y cale sa zone réelle. Un zombie qui en sort, parce que le carré s'est déplacé plus vite que lui, est aussitôt rendu à la couche des individus au lieu d'être perdu.

A real zombie lives in the terrain the game has loaded. The game does not load a disc around the player but a square of terrain, whose size depends on the screen resolution, and which shifts forward when the player is driving. The mod reads that square again every frame and fits its real zone to it. A zombie that leaves it, because the square moved faster than the zombie did, is immediately handed back to the individual layer instead of being lost.

Les individus vivent jusqu'à 250 tuiles du joueur. Au-delà, un individu redevient une petite horde.

Individuals live up to 250 tiles from the player. Beyond that, an individual becomes a small horde again.

Les hordes se défont en individus à environ 190 tuiles. Plus près, une horde n'existe plus comme groupe : elle est devenue une foule d'individus, dont certains deviendront réels.

Hordes break up into individuals at about 190 tiles. Closer in, a horde no longer exists as a group: it has become a crowd of individuals, some of which will become real.

À chaque limite, une marge évite les allers-retours : on entre dans une couche au seuil annoncé, on n'en sort qu'un peu plus loin. Un zombie qui oscille autour d'une limite n'est donc pas converti et reconverti sans cesse.

At every limit, a margin prevents back-and-forth: a layer is entered at the stated threshold and only left a little further out. A zombie oscillating around a limit is therefore not converted and converted back endlessly.

250 tuiles : limite des individus 250 tiles: limit of individuals environ 190 tuiles : les hordes s'y défont about 190 tiles: hordes break up here 90 tuiles : couche interne des individus 90 tiles: inner layer of individuals carré chargé : zombies réels loaded square: real zombies horde en migration migrating horde horde posée settled horde individu (couche externe, interne) individual (outer layer, inner) zombie réel real zombie La grosse horde posée en haut chevauche la The large settled horde at the top straddles the ligne : seule la partie qui la franchit se défait. line: only the part that crosses it breaks up. Couleurs du sonar de débogage du mod. Colours of the mod's debug sonar.
Vu de dessus, aux couleurs du sonar de débogage. Le carré chargé n'a pas de taille fixe : elle dépend de la résolution de l'écran. Une horde se défait vers 190 tuiles, et seulement la partie de son emprise qui franchit cette ligne : une grosse horde peut donc avoir un pied dedans et le reste dehors. Les hordes vivent partout au-delà, y compris entre 190 et 250 tuiles, et un individu ne redevient une horde qu'au-delà de 250. Avec les animations actives, une horde en migration arrive et se défait sous les yeux du lecteur.
Seen from above, in the colours of the debug sonar. The loaded square has no fixed size: it depends on the screen resolution. A horde breaks up at about 190 tiles, and only the part of its footprint that crosses that line: a large horde can therefore have one foot inside and the rest outside. Hordes live everywhere beyond, including between 190 and 250 tiles, and an individual only becomes a horde again beyond 250. With animations on, a migrating horde arrives and breaks up before the reader's eyes.

L'arrivéeArrival

Un groupe ne se convertit pas d'un bloc. Les individus ne sont créés que dans la portion du groupe qui recouvre réellement la zone, et le débit est plafonné par groupe. Une horde ne peut céder que quelques individus à la fois, ce qui étale la conversion sur toutes les hordes présentes au lieu d'en vider une entièrement avant de passer à la suivante.

A group is not converted in one piece. Individuals are only created in the portion of the group that actually overlaps the zone, and the rate is capped per group. A horde can only give up a few individuals at a time, which spreads the conversion across every horde present instead of emptying one entirely before moving on to the next.

Une horde peut donc frôler la zone d'un joueur et poursuivre sa route sans qu'un seul zombie ne devienne réel.

A horde can therefore graze a player's zone and carry on its way without a single zombie becoming real.

La dissolutionDissolution

Quand un groupe se disperse en individus, il ne les éparpille pas au hasard. Chaque horde possède un plan de dissolution, tiré de sa graine et composé d'un point d'ancrage et d'une forme.

When a group scatters into individuals, it does not strew them at random. Every horde has a dissolution plan, drawn from its seed and made of an anchor point and a shape.

L'ancrage peut être le centre du groupe, une poignée de points dispersés autour de lui, ou les routes. Dans ce dernier cas la horde cherche une voie de circulation dans son voisinage et s'y accroche, en suivant son orientation. La forme décide ensuite de la répartition : un amas serré, une dispersion, une dispersion large, une bande alignée sur l'axe de l'ancrage, ou un arc dans la direction de marche dont la largeur et l'épaisseur grandissent avec la taille de la horde.

The anchor can be the centre of the group, a handful of points scattered around it, or the roads. In that last case the horde looks for a route in its vicinity and latches onto it, following its orientation. The shape then decides the distribution: a tight cluster, a scatter, a wide scatter, a band aligned on the axis of the anchor, or an arc in the direction of travel whose width and thickness grow with the size of the horde.

Une horde qui se dissout sur une route se retrouve donc étirée le long de la chaussée, comme une colonne en marche. Une autre, avec une autre graine, formera un paquet compact au même endroit. Rien de tout cela n'est réglable : c'est la graine qui décide, et une horde garde son plan toute sa vie.

A horde dissolving on a road therefore ends up stretched along the carriageway, like a column on the march. Another, with another seed, will form a compact clump in the same place. None of this is adjustable: the seed decides, and a horde keeps its plan for life.

ANCRAGE ANCHOR FORME SHAPE la horde, et son cap the horde, and its heading individu déposé individual set down ancrage anchor route road portée maximale, 90 tuiles maximum reach, 90 tiles
Chaque graine tire un ancrage parmi trois et une forme parmi cinq. Le nuage est ensuite recentré sur la horde, pour qu'elle ne dérive pas d'un passage à l'autre, et ne dépasse jamais 90 tuiles. Les boutons parcourent les treize combinaisons distinctes (l'arc ignore l'ancrage), et un clic sur le schéma passe à la suivante. Aux couleurs du sonar de débogage.
Each seed draws one anchor out of three and one shape out of five. The cloud is then re-centred on the horde, so that it does not drift from one pass to the next, and never reaches beyond 90 tiles. The buttons go through all thirteen distinct combinations (the arc ignores the anchor), and a click on the diagram moves to the next one. In the colours of the debug sonar.

La formationFormation

Une fois dispersés, les individus ne dérivent pas chacun de leur côté. Chacun retient sa place par rapport au groupe, exprimée dans un repère lié à sa direction de marche, et cette place est reconvertie en position réelle à chaque pas.

Once scattered, individuals do not each drift off on their own. Each keeps its place relative to the group, expressed in a frame tied to its direction of travel, and that place is converted back into a real position at every step.

La conséquence se voit : la horde avance comme un motif qui suit le groupe et pivote avec lui. Elle ne se dilue pas en s'éloignant, elle garde sa forme.

The consequence shows: the horde advances as a pattern that follows the group and pivots with it. It does not dilute as it moves away, it keeps its shape.

Être vuBeing seen

La distance seule serait le mauvais critère. Si elle décidait de tout, un joueur caché dans un placard ferait apparaître une horde entière de l'autre côté du mur, et chacun de ces zombies perdrait la migration qu'il était en train de faire.

Distance alone would be the wrong criterion. If it decided everything, a player hidden in a closet would materialise an entire horde on the other side of the wall, and every one of those zombies would lose the migration it was in the middle of.

Au-delà de 22 tuiles, le mod interroge donc le test de visibilité du moteur lui-même, celui qui décide de ce qu'un joueur peut voir : murs, champ de vision, distance de vue, lumière. Un individu visible devient réel. Un individu qu'on ne pourrait pas voir reste une coordonnée et poursuit sa route en passant devant.

Beyond 22 tiles, the mod therefore queries the engine's own visibility test, the one that decides what a player can see: walls, field of view, view distance, light. A visible individual becomes real. An individual that could not be seen stays a coordinate and carries on its way as it passes by.

En deçà de 22 tuiles, le test est ignoré. À cette distance, il faut entendre des râles à travers la cloison et quelque chose cogner dans les meubles, et cela n'arrive que si le zombie est réel.

Below 22 tiles, the test is ignored. At that distance, there have to be groans through the partition and something knocking into the furniture, and that only happens if the zombie is real.

joueur caché hidden player visible, devient réelvisible, becomes real derrière le mur, continue sa routebehind the wall, carries on même distance same distance porte ouverte open door
Deux zombies, une seule distance, deux résultats : celui qu'on ne peut pas voir ne devient jamais un objet de jeu et n'oublie jamais où il allait. Avec le script, le schéma devient interactif : le joueur suit la souris et regarde où il va, avec le cône de vision du jeu (144° à pied, de jour, reposé). Aux couleurs du sonar de débogage.
Two zombies, a single distance, two outcomes: the one that cannot be seen never becomes a game object and never forgets where it was going. With the script, the diagram becomes interactive: the player follows the mouse and looks where they are going, with the game's vision cone (144° on foot, by day, rested). In the colours of the debug sonar.

L'étage du joueurThe player's floor

Dans le bâtiment où se trouve le joueur, aucun zombie ne devient réel à son étage ni au-dessus. Rien n'aurait pu y monter sans passer devant lui. Le rez-de-chaussée reste ouvert, et un zombie qui était déjà à l'étage revient là où il était : l'étage de chaque individu est gardé dans la sauvegarde.

In the building the player is in, no zombie becomes real on the player's floor or above it. Nothing could have gone up there without passing in front of the player. The ground floor stays open, and a zombie that was already upstairs comes back where it was: each individual's floor is kept in the save.

Repartir, et se reformerLeaving, and reforming

Un zombie qui sort de la zone n'est pas supprimé. Il redevient un individu qui garde son apparence, son équipement et la direction qu'il suivait, et il continue de marcher.

A zombie that leaves the zone is not deleted. It becomes an individual again, one that keeps its appearance, its equipment and the direction it was following, and it carries on walking.

Quand ces individus s'éloignent encore, ils cherchent d'abord leur horde d'origine et la rejoignent si elle existe encore. Sinon, ils se rallient au premier morceau issu de la même horde, ou à un petit groupe orphelin du voisinage. En dernier recours, ils reforment une horde, qui reprend la graine de la précédente et se recompose sur son centre de masse, là où ses zombies se trouvent vraiment.

When these individuals move further away, they first look for their original horde and rejoin it if it still exists. Otherwise, they rally to the first fragment that came from the same horde, or to a small orphaned group nearby. As a last resort, they form a horde again, which takes up the seed of the previous one and reassembles on its centre of mass, where its zombies actually are.

Une horde qui traverse une ville habitée ressort donc de l'autre côté en étant toujours la même : même tempérament, même façon de se déposer, même goût pour l'errance. Ce qu'elle a perdu, ce sont les zombies tués en chemin.

A horde crossing an inhabited town therefore comes out on the other side still the same: same temperament, same way of settling, same taste for wandering. What it has lost is the zombies killed along the way.

L'apparenceAppearance

Un zombie revient tel qu'il était. Le jeu sait recréer un zombie à l'identique à partir d'un identifiant de tenue : vêtements, couleurs, coiffure, sang, saleté et trous. Le mod garde cet identifiant pour chaque zombie qui a été réel, et la horde qu'il rejoint le garde à son tour. Un zombie croisé puis perdu de vue peut ressortir de sa horde des jours plus tard : c'est alors le même. Seul le sang des coups portés par le joueur n'est pas gardé.

A zombie comes back as it was. The game can recreate a zombie identically from an outfit identifier: clothes, colours, hairstyle, blood, dirt and holes. The mod keeps that identifier for every zombie that has been real, and the horde it joins keeps it in turn. A zombie met and then lost from sight can come back out of its horde days later: it is then the same one. Only the blood from the player's blows is not kept.

Une horde jamais vue s'habille selon son lieu de naissance. Ses tenues sont tirées une fois, à sa première apparition, avec les règles du jeu pour l'endroit où elle est née, et non pour celui où elle apparaît. Une horde née dans une base militaire porte l'uniforme ; une horde qui n'a fait que traverser la base, non. Quand deux hordes se rejoignent, leurs garde-robes se mélangent.

A horde never seen before dresses according to its birthplace. Its outfits are drawn once, at its first appearance, with the game's rules for the place where it was born, not for the one where it appears. A horde born on a military base wears the uniform; a horde that only passed through the base does not. When two hordes merge, their wardrobes mix.

La vitesse, en revanche, n'est pas gardée. Sprinteur ou marcheur, c'est le jeu qui tranche au moment où le zombie redevient réel, d'après les réglages de la partie. La proportion réglée est donc respectée partout, mais un zombie précis qui s'éloigne et revient est un nouveau tirage sur ce point.

Speed, on the other hand, is not kept. Sprinter or shambler, the game decides at the moment the zombie becomes real again, from the game's settings. The configured proportion is therefore respected everywhere, but a particular zombie that moves away and comes back is a fresh draw on that point.

Ce que ça change en jeu : une horde qui traverse la ville où l'on se cache ne s'arrête pas dessus. Elle passe, et c'est toujours la même horde de l'autre côté.

What this changes in play: a horde crossing the town where someone is hiding does not stop on top of it. It passes through, and it is still the same horde on the other side.