After playing around with Cellular Automata and zero-player games, I decided to create one of my own. This one is called relf, short for rectangular lifeforms. It’s a game of life, of sorts. Each relf has its own priorities and does its own actions. Relves interact with each other, both in good and bad ways.
I used Jonas Olmstead’s cellauto library to simulate the world and the pixi.js library to draw it on this canvas.
Basic Relf Types
Nomads
Nomads are wanderers. They travel alone and only settle down when the conditions are right.
Nomad Rules of Life
- If a nomad has two other nomad neighbors, it will become a settler.
- If a nomad has one or two neighboring settlers, it will become a settler.
- If a nomad is completely surrounded by settlers, it will revolt and become a hunter in its panic.
Settlers
Settlers band together with other settlers and do not wander. They are so reliant on one another, in fact, that a settler will die if it has no neighbors of its kind. Under the correct conditions, a settler will reproduce to create new relves.
Settler Rules of Life
- If a settler has no other neighboring settlers, it will die.
- If a settler can move to a nearby square to get more neighbors or position themselves closer to existing neighbors, it will do so.
- If a settler has exactly three neighboring settlers, it may reproduce to create a new nomad. On rare occasions, the settler may instead reproduce to create a new hunter.
- If a settler lives long enough, it will eventually corrupt and become a hunter.
- On rare occasions, a settler may evolve into a noble.
Hunters
Hunters seek out and kill settlers. They travel like nomads, and can kill a finite number of settlers before dying.
Hunter Rules of Life
- If a hunter has at least one neighboring settler, it will kill one and lose one hit point.
- If a hunter has zero hit points, it will die.
- If a hunter lives long enough, it will eventually calm down and become a nomad.
- On rare occasions, a hunter may transform into a warlock.
Special Relf Types
Warlocks
Warlocks use dark magic to summon hunters in bursts of magic. They remain stationary, but will fire one or more bursts before dying to the dark magic they wield. Each burst creates eight hunters from the warlock's location.
Warlock Rules of Life
- If a warlock has completed all of its bursts, it will die.
Nobles
Nobles are an evolved form of settler. They do not corrupt into hunters and they cannot reproduce to create hunters. Nobles are also stronger against hunter attacks: they can take multiple hits before dying.