Skip to content

Generals.io and its mechanics

Matej Straka edited this page Dec 22, 2024 · 3 revisions

👑 generals.io

is a fast-paced strategy game where you expand your land and battle with enemies over theirs.

You lose when your general is taken, but capturing an opponent's general gives you control of their entire empire.

While the game is easy to understand and control, we explain the game mechanics for completeness.

Tip

Playing one game of generals can be more than a thousand words!

Warning

But be careful, it can be addictive!

⚙️ Game Flow and Mechanics

The game starts with random placement of players on the grid.

You start with nothing but your base.

There is a fog in the game (in gamer terms "fog-of-war"), which means that you only see cells that you own and their immediate neighbors. This makes the game fun, as it enables trickery and interesting tactics 🔥.

As the game unrolls, you and your enemies gain land, cities and grow armies. Your goal is to maneuver your army in a way that leads to capturing the base of your opponent.

⏱️ Time Scales

  • You can move army from one cell to its neighbor every turn
  • Every 2 turns, your base and every city that you own generate one troop/army in their location
  • Every 50 turns, you generate one troop/army for each cell that you own (we call this one round)

🏃 Game movements

In every turn, you can move from any cell that you own to its neighboring cell. You have 2 types of moves:

  1. send all army minus one
  2. send half of army (rounded down)

In both cases you must have al least 2 army to start with, because at least one troop/army stays behind to control the cell.

⚔️ Army collisions

When your and your opponents' army collide in a cell, a "fight" happens troop for troop, which we illustrate on a example.

You move 42 army to the neighboring cell that is controlled by your opponent and has 35 army. Since you have more army, you win the cell with 7 troops (we performed basic subtraction). If your opponent also had 42 army, the battle ends in a draw, but your opponent controls the cell.

Note

All players move simultaneously each turn.

It might happen, that the first player wants to move to the cell that the second player wants to leave. In this case, there is a priority. Either first player captures the cell and the second player can't leave (because his army was captured), or the second player leaves the cell and only then the first player moves there. For this scenario, priority is introduced. It is assigned to the first player in the player list at the start of the game and alternates between players on every move. This information is encoded in Observation under the priority key.