Mirakle

**Mirakle** is an isometric 2D **god-simulator** video game in the *Svea* series, currently in development. The game takes place in a primeval undeveloped setting.

## Player

The **player** takes the shape of a disjointed, floating **hand**. This hand can interact with objects and structures, as well as hold and let down/throw smaller objects. By holding the interact button above fields of wheat, they can gather them up in increments until the field is depleted. Once an "object" is held, in this case a bundle of wheat, no more can be gathered or held.

Most tasks that villagers can perform can be done by the player themselves, except for construction.

## Construction

The player is responsible for constructing structures and roads. Structures include housing, 1 village center, storage houses, mills, butcheries, lumberyards, workshops (assembling the new buildings to be placed and constructed) and temples of worship. Roads greatly increase the speed of which the citizens' travel; furthermore, citizens' are only able to travel a certain distance from leaving a road tile.

All structures, excluding roads, supply **area of influence**; a radius around each structure in which the player can build new structures, and cast miracles.

## Resources

Resources needed to manage include wood for further construction and repairs, water for themselves and the field, grain for food, meat for food. Worship is not depleted as such, but a sum of citizens' in worship.

## Citizens

Citizens are required for every construction and repairs; something the player is unable to do themselves. Citizens also generate **worship** when they have faith in the player, which in turn will be spent on miracles.

Citizens can be **assigned** to focus on tasks; chopping wood, gathering grain, hunting for meat, foraging for mushrooms, working in one of the granaries/lumberyards/etc, or spreading the word of their god (the player). Unassigned citizens will wander about and helping here and there, as well as produce offspring.

## Miracles

**Miracles** come in the form of **bubbles** containing the symbol of the miracle within, as physical objects that can be moved around. Tapping on the bubble breaks it, causing the player hand to "hold" miracle and allowing it to be cast.

Town centers will gradually generate miracle bubbles, provided the player has enough worship.

Miracles include rain that causes fields of wheat to grow even beyond their normal capacity, sunlight that has an equivalent effect on trees, etc.

## Creature

The player has a **creature** at their disposal, which completely AI-controlled but able to be taught to help the player. Good deeds done by the creature will massively impress citizens and garners plenty of worship.

The creature starts as a blank slate, and is curious about everything it has not yet done. The player must **praise** or **reprimand** behavior as it is performed or about to be, which will change the creatures' **intents** accordingly.

Initial bad behavior include picking up citizens without cue, eating citizens that are picked up, throwing citizens that are picked up, eating livestock, throwing rocks at citizens or structures, etc.

Good behavior that should be encouraged is picking up grain and putting it in storage, picking up trees and putting them in the lumberyard, picking up wood and putting them in storage, hunting for wild animals and picking them in butcheries, casting miracles from bubbles, etc. The creature is the only entity capable of casting miracles without first finding a bubble, and can do so without limitation and whenever it pleases.

The player can **instruct** a creature by dragging from the creature to a point or entity. The creature will always walk to the point, but how they will interact with the entity in question is up to them.

### Programmatically

The creature utilizes **intent**s that represent the **end goal** as a single **tag**; most likely containing several steps prior to it, not every step having a corresponding tag. Each intent has a **morality** value that initially starts completely neutral but is increased with praise and decreased with reprimand respectively.

The creature first sets its intent based on nearby entities, its needs, and its morals. As the creature is curious, it will prioritize intents that it has not yet performed (this is tracked).

Example: `eat_human`. While in this "mode", unbeknownst to the player, it will attempt to execute it; in this case with three steps: go to human, pick up human, eat human. Reprimanding the creature at any point while this intent is active or shortly after will decrease the morality value of `eat_human`; it is now less likely to do as other intents will have a higher value. The steps "go to human" and "pick up human" are not affected, as the intent refers to the last step; reprimanding `pick_up_human` would inadvertently also reduce the likelihood of it eating a human, as this requires it to pick one up first, and all actions that require the same.

Another example: Generic intents may transform into more specific intents. A creature with the generic intention `cast_miracle_bubble` will first prime the miracle bubble, then *generate* an intent based on its current state. In this case, an intent with target for the specific miracle bubble used. If `cast_miracle_bubble_rain_on_wheat` is used, it should be praised.

## Inspirations

*Black & White*
*Anno 1602*