Difference between revisions of "Design Document:Map"

From Transport Empire
Jump to: navigation, search
(Copied from http://tempire.phoenixscripts.co.uk/wiki/index.php?title=Map)
 
(No difference)

Latest revision as of 23:21, 7 May 2009

The Map is an rectangle area on which most of game's activity takes place. The Map shows roads, tracks, trees, rivers and all other objects game supports. The Map is composed of square tiles.

Tile edge is 16 metres long. It is composed of four triangular areas (used for placement of some objects).

Tile vertices cannot differ in height more then 10 meters. Landscaping tools will not allow building 'pillars' of rock. Also – tiles are joint – eg 4 tiles can share 1 vertex. It is impossible to create a “cliff” by using tile edges.

Landscaping is achieved in two ways – either automatic while building a track or road, or manual – when the player will carve the land using a set of designated tools. Landscaping costs money.

Landscaping can be up to the smallest 0.1m resolution in height difference.

Some things (like rivers, hard bedrock or shoreline) that cannot be landscaped.

idea: maybe the game should store origin heights of all vertices and base costs of landscaping on how much deviation form origin height occurred - this way landscaping would be much more limited thus forcing to manage hills rather then just levelling them on sight as it is now in TTD/LOMO


Size

The Map can have any size beginning at 128x128 vertices. Size has an upper limit of 65536x65536 vertices. Both sides of The Map can be of any value between these two (so 170x2021 is a viable size).

mental note - soft limit around 4096 or 8192 would probably have to be imposed.

Height

Height is stored as a mesh of all vertices with 0,1 m resolution. 65536 values are possible. 0 being the lowest, 65535 being the highest.

mental note - soft limit of around 1024 would probably have to be included.

idea: laying track/road/canal will automatically landscape to a slope chosen by the player (0%, 0.5%, 1% etc)

idea: erosion - from time to time the game will randomly modify certain vertices causing the terrain to change

idea: earthquake - random modification of vertices in a secluded territory destroying everything

idea: while building things such as railways automatic terra-forming would be used

Water

Up to height of 32 m all terrain is under water by default. If a terrain has connection to outside sea (or any other water) than it will be flooded by water.

This one is very tricky – it can make the life of a map makers and (especially) coders a living hell.

Rivers

Certain tiles will use 'river' property - these tiles will check their surroundings and 'flood' them if possible. Once river has settled are tiles adjoining river are marked 'unmoveable' for landscape tools.

mental note - ships can travel rivers if maximum slope is 0,1%.

Terrain Types

Terrain types define how expensive/cheap it is to clear/terra-form it and which buildings can be built on a tile of this type.