How-to: transitions and tiles?

Contribute art for mainline Wesnoth.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
Post Reply
charlieg
Posts: 209
Joined: December 16th, 2003, 8:41 pm
Location: Manchester, UK
Contact:

How-to: transitions and tiles?

Post by charlieg »

My excuse for not having 'looked' in the Wesnoth folder is simply that I'm not on my home machine and hence don't currently have access.

The question is; how are tiles and transitions handled? What are the sizes? What other information is pertinent?
Free Gamer - free games compendium & commentary
FreeGameDev - free game development community
fmunoz
Founding Artist
Posts: 1469
Joined: August 17th, 2003, 10:04 am
Location: Spain
Contact:

Post by fmunoz »

IIRC tiles are 256x256 or 100x100 rgb png images.
TRansition tiles:
land-n.png
Will be the transition tile with land at north (ie to be overdraw over another non-land lower-priority tile)
same for -nw,-sw,-s,-se,-ne
These are the basic transition tiles.
You could use images for adjacent "transitions" (starting with n and clockwise)
ie. -n-nw, -nw-sw, -s-se-ne even -n-nw-sw-s-se-ne

If the game needs a transition tile it will look first for "larger named" adjacent transtions and if it was unable to find them try with shorter ones untill single direction images.

Ps. I hope that this makes sense
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Just to clarify what fmunoz said, to do a basic set of transitions, for a terrain, you need six transitions images:

terrain-n.png
terrain-ne.png
terrain-se.png
terrain-s.png
terrain-sw.png
terrain-nw.png

Now suppose that you have grassland that has forest to its north and north-east, and is otherwise surrounded by other grassland. The following images would be overlayed onto the grassland:

forest-n.png
forest-ne.png

You however, might decide that you can make such a tile look better than simply overlaying the two images on top of each other, and so you can draw

forest-n-ne.png

which will be drawn in place of the above two images if it is present.

So, the system allows you to draw however many transition tiles are necessary to make it look good. Usually I think we have found that just the basic six are enough for most terrain.

Hope that makes sense :)

David
Post Reply