A classic real-time strategy set in the classical antiquity. Build your economy, employ diplomacy and control hundreds of units on large maps and clash in grand battles. Great modding capabilities and multiplayer features allowing you to shape the game the way you want it and share it with other players.

Post news Report RSS A change in scale

Compared to other complex optimizations it was time for a larger, necessary and more simple change.

Posted by on

In order to support massive maps, more units and avoid overly complex map designs it was decided to double the size of map tiles. From the previous 32 pixels across they are now 64 pixels wide and tall.

A map that was previously 256x256 tiles had a width and height of 8192 units, or pixels if you will. A map of this size now only consists of 128x128 tiles and is just as big, 8192 units. This results in a decrease of 65536-16384=49152 tiles.

What does this mean?

Firstly, 32x32 pixel objects previously contained on one tile have been enlarged to the new 64x64 minimum standard.

There was however only one such object, and those were the trees. Which, relative to the rest of the game objects were actually very small and could often be mistaken as bushes. Making the trees twice as big was not only necessary with the new change, but also made them look more natural and gave the game a more realistic sense of scale.

Two other buildings, houses and farms - which were previously 3x3 tiles (96x96 units) were updated to 2x2(128x128 units). Units and other buildings in the game remain at their original size.

Here's why

This decision was mainly for optimizing the game, enabling larger maps, but also provoked a design decision which I was more than satisfied with - which basically meant, make things that previously were small larger. While the trees simply could of been made 2x2, it felt stupid not to go all the way and reap all the positive effects this change meant.

A 1/4 the amount of tiles means 1/4 the work in many demanding operations. Fog of War is calculated four times faster. All operations checking for nearby units (aggro range etc.) also only have to check for a lot of less tiles for the same distance. The same goes for pathfinding; finding a walkable path from one point to another.

Terrain textures are also redone for 64x64 and as a result of less tiling it is harder to notice repeated patterns.

The best system of course would be to allow tiles of different sizes to be used for different operations and I have begun to work on one such system for pathfinding.

Nonetheless this has provided an enormous boost in performance and is a huge step forward in making the scope of Terra Militia truly gigantic.

Visual comparison (top old, bottom new)


Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: