Hongerspelen Online

07-03-2021

A "Hunger Game Simulator" is a game that allows users to input a set of players and read about events as they unfold. These virtual players are put in a battle royale setting. There is no interactivity after the initial configuration part.

"Hongerspelen Online" is a game I wrote after seeing how limited the popular Hunger Games Simulator is. The original game seemingly didn't keep track of any state other than alive or dead. I decided to write my own version in which players are simulated on a grid of cells, each of which can contain unique features and items. At the time of writing, in its abandoned state, these include:

Cell properties - Elevation (delta determines likelihood for a player to travel here) - Shelter - Water (drinkable, potentially unsafe) - Trees - Loot bonus value (determines likelihood of finding items)
Items - Twig (weak weapon, light) - Rock (weapon, heavy) - Hammer (weapon, heavy) - Knife (weapon, light) - Spear (weapon, heavy) - Bandage (healing item) - Bow and arrow (ranged weapon) - Pistol (ranged weapon) - Bottle of water (safe drinking water) - Berries (safe food) - Sandwich (safe food)

Each player can be extensively configured. Every stat has some effect on their actions during the game. Players are able to travel, eat, starve, drink, dehydrate, gather, engage in combat, surprise attack, betray teammeates, hide, find and pick up items, drop items, go insane, cry, verbally fight, break limbs, become immobile, follow others, and commit suicide. The game is essentialy a convoluted state machine, causing stories to emerge. A manually described possible example scenario:

A player hides from an enemy inside a building. They find a gun inside the building, but fall down a hill on the way out and break one of their legs. The pain decreases sanity and mobility, causing them to travel slower. After a while of crawling around, they get thirsty. They haven't found any water bottles so far, and the only thing nearby is a lake. They drink from the lake out of desperation, and become very sick. Now starving, sick, and with a broken leg, the player has lost their mind and starts crying. Shortly after, they commit suicide with the gun they found at the start.

There is currently no way to win, so the game eerily continues even when all players have died. Technically, it works by calling a function that takes the game state, generates a set of events based on it, and then calculates a new state from those events.