Difference between revisions of "Tiles Tutorial"

From The Battle for Wesnoth Wiki
m (Normal Tiles: Corrected a typo: seperate->separate)
m (Multihex tiles)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=== Normal Tiles ===
 
=== Normal Tiles ===
  
Normal tiles consist of a set of 72x72 tiles which are the variants used for a given terrain type. The probability for showing the different variants are given in terrain-graphics.cfg. In addition each terrain type has a set of transition tiles:
+
Normal tiles consist of a set of variant 72x72 tiles used for a given terrain type. The probability for showing the different variants are given in terrain-graphics.cfg. In addition each terrain type has a set of transition tiles:
  
 
* 6 basic transitions: n, ne, se, s, sw, nw
 
* 6 basic transitions: n, ne, se, s, sw, nw
 
* 6 "2-side trans": n-ne, ne-se, se-s, s-sw, sw-nw, nw-n
 
* 6 "2-side trans": n-ne, ne-se, se-s, s-sw, sw-nw, nw-n
 
* 6 "3-side trans": n-ne-se, ne-se-s, se-s-sw, s-sw-nw, sw-nw-n, nw-n-ne
 
* 6 "3-side trans": n-ne-se, ne-se-s, se-s-sw, s-sw-nw, sw-nw-n, nw-n-ne
* 6 "4-side trans": n-ne-se-s, ne-se-s, se-s-sw-nw, s-sw-nw-nw, sw-nw-n-ne, nw-n-ne-se
+
* 6 "4-side trans": n-ne-se-s, ne-se-s-sw, se-s-sw-nw, s-sw-nw-nw, sw-nw-n-ne, nw-n-ne-se
  
 
Few terrain types use all these possible transitions, if any.
 
Few terrain types use all these possible transitions, if any.
  
It is possible to make several transitions and use different ones depending on which terrain type is adjacent. There is also a need for some special transitions when terrains are adjacent to castles.
+
It is possible to make several transitions and use different ones depending on which terrain type is adjacent. There is also a need for special transitions for terrains adjacent to castles.
  
Transitions are drawn around tiles according to a what is defined in terrain-graphics.cfg. Each terrain is placed in a given layer. This defines which terrain will draw their transition when adjacent to another. This means that the one which are layered the "highest" will draw their transitions on top of terrain layered further down.
+
Transitions are drawn around tiles according to the definitions in terrain-graphics.cfg. Each terrain is placed in a given layer. This defines which terrain will draw a transition when adjacent to another. Terrains in the "higher" layers will draw their transitions on top of terrain layered further down.
  
Each of these transitions are stored in separate image files.
+
Each transition is stored in a separate image file.
  
  
Line 26: Line 26:
 
'''Example 2.'''
 
'''Example 2.'''
  
1 tile + 2 x nw trans and a sw-nw-n trans. (This might seem strange, but the trans. are named after where the trans. is drawn in the trans. tile itself, not where it's "attached" to the terrain tile).  
+
1 tile + 2 x nw trans and a sw-nw-n trans. (This may seem strange, but the transitions are named after where the image is drawn in the transition tile itself, not where it's "attached" to the terrain tile).
  
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/normal_tiles2.png
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/normal_tiles2.png
Line 32: Line 32:
 
=== Multihex tiles ===
 
=== Multihex tiles ===
  
Multihex tiles work differently. They don't have seperate transitions. One could say the trans are attached to the tile itself. They also behave differently. While normal tiles draw their trans according to the layering a multihex tile will rather overlap terrain either vertically and/or horizontally. This means fx that mountain tops will extend into tiles above removing the need for a special transition. for other sorts of terrain like grassland and other flat ones this must be done in a way that will allow them to mesh into each other. Of course multihex is not neccesarily ideal for all terrain types.
+
Multihex tiles work differently. They don't have separate transitions. One could say the transitions are attached to the tile itself. They also behave differently. While normal tiles draw their transitions according to layering, a multihex tile will overlap terrain either vertically and/or horizontally. This means, for example, that mountain tops will extend into tiles above, removing the need for a special transition. For other sorts of terrain like grassland (and other flat ones) this must be done in a way that will allow them to mesh into each other. Of course multihex is not necessarily ideal for all terrain types.
  
 
'''Examples'''  
 
'''Examples'''  
Line 40: Line 40:
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/multihex_tiles2.png
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/multihex_tiles2.png
  
Note on overlay tiles: you define a background tile which gets drawn first underneat them using the regular layering rules for that particual terrain type.  
+
Note on overlay tiles: define a background tile which gets drawn first underneath the overlay using the regular layering rules for that particular terrain type.  
  
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/multihex_tiles3.png
 
http://www.idi.ntnu.no/~haskjold/wesnoth/info/multihex_tiles3.png

Latest revision as of 16:59, 13 April 2013

Normal Tiles

Normal tiles consist of a set of variant 72x72 tiles used for a given terrain type. The probability for showing the different variants are given in terrain-graphics.cfg. In addition each terrain type has a set of transition tiles:

  • 6 basic transitions: n, ne, se, s, sw, nw
  • 6 "2-side trans": n-ne, ne-se, se-s, s-sw, sw-nw, nw-n
  • 6 "3-side trans": n-ne-se, ne-se-s, se-s-sw, s-sw-nw, sw-nw-n, nw-n-ne
  • 6 "4-side trans": n-ne-se-s, ne-se-s-sw, se-s-sw-nw, s-sw-nw-nw, sw-nw-n-ne, nw-n-ne-se

Few terrain types use all these possible transitions, if any.

It is possible to make several transitions and use different ones depending on which terrain type is adjacent. There is also a need for special transitions for terrains adjacent to castles.

Transitions are drawn around tiles according to the definitions in terrain-graphics.cfg. Each terrain is placed in a given layer. This defines which terrain will draw a transition when adjacent to another. Terrains in the "higher" layers will draw their transitions on top of terrain layered further down.

Each transition is stored in a separate image file.


Example 1.

1 tile + the 6 basic transitions:

normal_tiles.png

Example 2.

1 tile + 2 x nw trans and a sw-nw-n trans. (This may seem strange, but the transitions are named after where the image is drawn in the transition tile itself, not where it's "attached" to the terrain tile).

normal_tiles2.png

Multihex tiles

Multihex tiles work differently. They don't have separate transitions. One could say the transitions are attached to the tile itself. They also behave differently. While normal tiles draw their transitions according to layering, a multihex tile will overlap terrain either vertically and/or horizontally. This means, for example, that mountain tops will extend into tiles above, removing the need for a special transition. For other sorts of terrain like grassland (and other flat ones) this must be done in a way that will allow them to mesh into each other. Of course multihex is not necessarily ideal for all terrain types.

Examples

multihex_tiles.png

multihex_tiles2.png

Note on overlay tiles: define a background tile which gets drawn first underneath the overlay using the regular layering rules for that particular terrain type.

multihex_tiles3.png

See Also

This page was last edited on 13 April 2013, at 16:59.