Imperial Dynamics
Source: Dev.to
Imperial Dynamics – Map‑building System

How it works
- Nations (adjustable setting) spawn as a single pixel.
- Over time, nations grow in size if their neighboring tiles are free.
- Simple fighting:
- When a nation has a tile it can conquer, it has a small chance to take that tile.
- The same applies to the opposing nation.
- A nation won’t conquer its own land—that would be treason.
Core checking code
Check
point in direction (90)
repeat: 4
move (Tile Size)
if: touching (empty space) and not (touching (own color))
add (x) to (Grid x)
add (y) to (Grid y)
stamp
move (-Tile Size)
else:
if: rnd(1 - 4) = 1
add (x) to (Grid x)
add (y) to (Grid y)
stamp
move (-Tile Size)
end
Thanks for reading. This one was a little late today—sorry about that. Have a great day!
