We are going through some reorganization of our code, so why not let's start by talking about some of the technical aspects of our game.
We wanted a dynamic map so that our game can feel real and the map can change depending on what the players do (e.g. conquer provinces from another country).
But it was surprisingly hard for us to do that using standard ways.
There are 2 main ways to create maps in games.
First, there is the old way: Fixed Maps.
You create images of maps that you want to show the players.
This includes maps of all possible scenarios.
The game will then pick the correct image and show it depending on what happens in-game.
For our case, let's say we try to create a scenario of the Korean war.
We would have to create maps of every scenario that would occur, so there would be:
- North Koreans taking Seoul
- North Koreans conquering up till Pusan
- UN troops landing at Inchon
- UN troops taking Pyongyang
- UN troops conquering North Korea
- China troops pushing UN troops back to 37th parallel
- UN troops pushing China troops back to 38th parallel
Even after listing 7 scenario, the player will still feel the game is still not dynamic and scripted because it does not plan for any other scenario that might occur.
What if the North Korean troops took Pusan? Or stopped at some other cities?
Maybe the UN troops decided to invade at another beach?
Not to mention that all the maps you see while the troops move is static.
Although this is the most efficient way in terms of computer performance, that not how we envision our game.
![]() |
| Sample of fixed maps |
Then, there is the new way: Tiles.
What you do is that you split the entire map up into blocks of the same shapes and sizes (normally hexagons or squares).
After which, you change each tile into the correct texture (i.e. North Korean tile, South Korean tiles, UN tiles and China tiles).
And you dynamically swap the tiles depending on the progress of the game.
This method is definitely more dynamic and better for user experience, but it comes with its own set of disadvantages.
- Maps will look "blocky"
- Countries will look slightly off as they do not fit perfectly into the shapes of the tiles
![]() |
| Sample of tile blocks |
With that, we went back and try to come up with a better solution for this.
Is there any way to fit the custom shapes of fixed maps with the dynamic properties of tiles?
After much work and some inspiration from Paradox, we found a great way to resolve the issue: Dynamic Map Tiling
What Dynamic Map Tiling does is that it takes in a map image as a skeleton(i.e. custom sized tiles) and then populates the correct texture to each custom sized tiles and viola, you now have the perfect shape of a fixed map combined with the responsiveness of tiling.
![]() |
| Unpolished sample map for crisis |
And since the game can change the map, we can then take that data and populate it with lot's of different textures. For example, there could be country mode, terrain mode, population mode etc.
It will become a dynamic world where the map changes depending on what the player do.
Dynamic Map Tiling does comes with its own disadvantages though.
- The world is only fixed to the size of the map
- Performance hit compared to using Fixed Map
We have worked hard to improve Dynamic Map Tiling performance and arrived at that the point where we feel that it is good enough and does not hold back the game back.
That's all for this week, see you next #CFD!



No comments:
Post a Comment