Skip to content
Chris Oelmueller edited this page Feb 19, 2013 · 2 revisions

Tile sizes

Values for tile size and object related messures:

parameter reference size height x width
Grid cell size 64x64px
Tile size 1x1 grid cell 32x64px
Unit tile size 1/4 tile 16x32px
building floor height 36px - 42px - depending on building design.
unit height 26px - depending on unit design.

A camera with tilt -60° and rot 45° transforms a 64x64 cell to a diamond with height 32px and width 64px.

Implementation related notes

The tile size and all the other measures for ingame graphics depend on the effects of zooming. All objects have to be identifiable up to a certain degree of zooming.

Rotation and orientation:

o stands for the main building entrance

 45:  135:  225:  315:

 /\    /\    o\    /\
/  \  /  o  /  \  /  \
\  /  \  /  \  /  o  /
 \o    \/    \/    \/

General

Unknown Horizons is impossible without tiles. Defining the tile size and other measures for images is fundamental.

<LinuxDonald> jwt_working what is the rotation of the tile files in fife?
<LinuxDonald> in °C

<jwt_> hey LinuxDonald, I'm not quite sure what you're asking.
       You mean the rotation of the tile graphics fife uses for its demo?
<jwt_> their rotation is 45 degrees and tilt is -42

This is a pretty much different camera setup from what is used in UH. We will use rotation 45° and tilt -60°. Although this should normally end up in pretty ugly pixel lines for some strange reason Blender as well as FIFE come up with the exact output I was looking for - sharp and regular pixel lines. --dauerflucher 23:58, 18 May 2008 (UTC)

You can use the fife tool fife/utils/geometry_twister.py to check the camera positions.

Examples

tile size pixels
2x2 128x128
2x3 160x96
2x4 192x96
3x3 192x192
3x4 224x112
4x4 256x256
4x5 256x320
5x5 320x320
6x6 384x384

Building dimensions

To define the dimensions of a building in tile size (tile 64x32px), there are currently 4 factors to start with:

  • The size of residential buildings is 2x2 tiles. This should define the basic size of a common building in UH.
  • The size of the main square is 6x6 tiles. This is the dimension of 3x3 residential buildings which consequently defines a block and the maximum size not to exceed.
  • Whether a building is available in one tier and dimension only has just fit into town planning definitions OR it will appear over several tiers and the building's level can be upgraded - which means the dimensions have to be fixed again somehow.
  • Whether a building is likely to be placed in a block or not.

There are currently 6 sizes in definition:

         |tiles| example buildings / classes

-----------|-----|---------------------------------------------------- small | 1x1 | streets, walls, trees and other small structures normal | 2x2 | residents as indicator for common buildings, including production and service buildings like weaver, pavilion, school medium | 3x3 | agricultural: farm, garden, all fields; clay deposit & pit, fish deposit large |2x3/4| bigger production and service buildings: inn, charcoal burner, smith, larger church very large | 4x4 | smeltery, university, fortress super large| 4x6 | cathedral, palace exceptional| any | tilesize depending on need**

The last size definition (exceptional) covers all buildings which need different sizes to look right or to be effective. Buildings like the main square (6x6 tiles) and warehouse (which should be bigger than it is now - like 2x6 or something).

One of the most important thing to think about is if a building is likely to be placed within a block of residents or not. If it is, we will have to avoid white space. A church with dimensions of 2x3 tiles will leave a gap of 2x1 tiles in a block. This should not happen because it is annoying for players trying to achieve a clean town planning. In this case a church should either be 2x2 tiles or 2x4 tiles. The maximum size of a block is 6x6 tiles and should never be exceeded.

If a building is not likely to be placed in a block (like a farm or a mine) it is possible to be less careful with dimensions. E.g. our current decision is to leave farms and plantations at a size of 3x3 tiles because 2x2 tiles is too small and 4x4 tiles is definitely to big. Agricultural structures (fields and so on) are meant to be the same size of the farm or plantation.

Another likewise important thing is to keep in mind if you need fixed dimensions or not. Building level upgrades happen every tier. The residents will develop from tents to cottages to houses to villas. A tent could stick to a size of 1x1 tiles, BUT as soon as it develops it will need more space.

Before creating a new building the artist should think about how many tiers a building will be updatable in(to) and how much space it will need when development is finished.

There are three possibilities to handle this problem:

  1. Define a fixed size which will provide enough space for all development levels of buildings and let the player update them w/o destroying and building the new version (optimal).
  2. Define new sizes for each development level and constrain the player to destroy the old one and replace it with the new version (worst case).
  3. Define a fixed size for the building until a new development level exceeds this size and then constrain the player to destroy and replace it with a newer version (solid workaround).

The first case should be used as much as possible, but of course will not work for every building. The most obvious example is a resident which will be 2x2 tiles in size for all tiers as well as the main square will be 6x6 tiles for all tiers. The warehouse should be of the same size either, but it is difficult to provide nice graphics for a low level building which will be pretty large in the final stage of development. Maybe an exceptional solution is needed then.

The second case should never really happen or just if the next level of development is rather a complete new building. There is currently no example and hopefully never will be!

The third case will happen most likely even more than the first one. A common example is the lumberjack which will develop from a tent to a blockhouse to some framework building. After the third level of development the player can keep it as it is, or replace it with a saw mill which will be bigger in size.

Another example is the church which will develop from from a tent/pavilion to a wooden chapel to a framework chapel which against could be replaced by a framework church in the same tier which will develop to a stone church and maybe to a nicer stone church just to be replaced by a cathedral in the final state of development which will be definitely super large in size.

Those paragraphs are guidelines not detailed definitions for the different buildings. In the end it will have to be carefully discussed how to solve the occurring problems for each building individually.

Home > Artists >

Render
Action sets
Tile size
Building style
[Open tickets] (../issues?labels=graphics&state=open)

Clone this wiki locally