do they still should be created manually? i mean i have hundreds and maybe thouthands of tiles. should i really calculate and describe every single tile?..
What tiles are you using? Are they available on oga?
As for the definition file, if the tiles are equal size and positioned in a uniform way, excel or open office could be utilised to quickly create hundreds or thousands of rows, incremented by a particular amount each time. It would not be so easy with different size tiles, unless they are arranged by size.
i use tilesets from the mana world and dew tilesets from here and deviantart.
most of them are 32x32 but from time to time size changes. i can avoid it by creating many layers but isn't there any automated way to export tiled maps to flare?
Someone could write a utility that generates Flare tilesetdefs from a Tiled tmx file. But one doesn't exist yet.
one fox gave my a semi automatic python script. so i use bash commandto get list of images' resolutions
identify * | cut -f 3 -d' '
and script for calculating
step = input('Step: ')
count = 1
y1=0
fo = open("./tilesetdef", "rw+");
while(1):
x1 = 0
x2 = step
y2 = step
imagex = input("Wight: ")
imagey = input("Heght: ")
dimx = imagex/step
dimy = imagey/step
i = 0
j = 0
while (j < dimy):
while(i < dimx):
s = 'tile={},{},{},{},{},0,0'.format(count,x1,y1,step,step)
fo.write(s+'\n')
count+=1
i+=1
x1+=step
x1=0
x2=step
y1+=step
y2+=step
j+=1
i=0
well, export maps for flare is real hell. i made 1st map few weeks and looks like i will export it even longer.
convert *.png -append output.png
creating one tileset from many.
I've created a script to generate a tilesetdef and image from an existing Tiled map file:
https://github.com/dorkster/tilesetdef-generator/blob/master/tilesetdef-...
Run the script in the same directory as your map file and images with:
./tilesetdef-generator FILENAME.tmx
It doesn't pack tiles, so it's a bit inefficient in that regard. Nonetheless, it should still do the job.
File "script.py", line 6
tileset_w = 0
^
IndentationError: expected an indented block
that's what i get whan try use it
Strange, I'm not noticing any whitespace errors. If you copy/pasted from the Github page, try downloading the raw file instead: https://raw.github.com/dorkster/tilesetdef-generator/master/tilesetdef-g...
thanks. now i got
Traceback (most recent call last):
File "./tilesetdef-generator.py", line 99, in <module>
main()
File "./tilesetdef-generator.py", line 44, in main
for prop in root.find('properties').findall('property'):
AttributeError: 'NoneType' object has no attribute 'findall'
btw, when i tried to make map manually i got black screen (except minimap that shows collision level correctly) though i'm sure i did all right. is there any limits to tilesets?
It looks like you didn't add the tileset property to the Map Properties in Tiled. In Tiled go to Map -> Map Properties. Then create a new property with the name tileset and make the value the filename of the tilesetdef (ex: tileset_dungeon.txt).
thanks a lot for help. but i don't understand tile x and y offset. i made it 0,0 because i thought that tiles don't have offset. they really should be 16,16?
This page does a better job of explaining tile set definitions than I can: https://github.com/clintbellanger/flare-engine/wiki/Tile-Set-Definitions
index is the unique (to this tile set) integer index for this tile. This index is used in map layers (background and object). Indexes from 1 through 1023 are allowed
so i can use only 1023 tiles? O_o_O
Yes, but 1023 is more than enough for our uses. Each of Flare's tilesets contain less than 300 unique tiles. If 1023 isn't enough for you, you might be able split up your tilesets by theme/location (like we do with cave/dungeon/grasslands).
flare game has just 3 tilesets while i have about 40-50 and common size of tileset is 512x512 that means 256 tiles 32x32
1st map - center of big city (173x144 tiles) contain few buildings, castle, district for wealth citizens, park, bazaar small arena.
it's impossible now :(
Good news! That wiki page is apparently incorrect. The amount of tiles you can have is "unlimited" according to this commit: https://github.com/clintbellanger/flare-engine/commit/ac024815a714b67c8f...
There is a hard coded 256 value used in the pathfinding code (while calling the find neighbour function). This would cause a limit but it could be easily changed to use the map width and height instead of the hard coded values.
Sorry ignore my post. Just realised that you were not referring to map size.
sweet. i still have engine to make game ^_^_^