Hi
I tried to create a new game using flare as engine with new tilesets as mod. I know how to create/modify maps with existings tilesets, but I am not able to use my own tileset.
I did following steps:
1) I created a new tileset (orthogonal like polymorphable) and copied it into tileset-folder.
2) I created a tilesetdefenition like described at https://github.com/clintbellanger/flare/wiki/Tile-Set-Definitions for this tileset in tilesetdef-folder
3) I created a testmap with tiled, using this new tileset and placed the map.txt file into the map-folder.
4) I modified the teleport-event of spwn.txt map to start a new game at my created testmap.
5) I built the game with g++ on Ubuntu with the command:
g++ -I /usr/include/SDL src/*.c src/*.cpp -o polymorphable -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf
I expected to find myself at my testmap, but the game crashed.
There's not a lot of good error checking in the data files yet (plenty of that coming during Beta).
So in the meantime, can you post a copy of your tile set def, map file, and tile set image file? We can help debug it easier that way.
Thanks!
Here are the textfiles:
tile set def: http://pastebin.com/W1vUj37L
map file: http://pastebin.com/wfWVrf7X
spawn file: http://pastebin.com/RxmeYC0L
The tileset is a piece of a polymorphable tileset.
t1.png 7.5 Kb [210 download(s)]
When you create a new map, make sure that you add your tiled_collision layer first, THEN your real tileset. Glancing at your map, I notice, for example, that your collision layer has a bunch of 19's in it, which isn't a valid collision value. You tileset def file properly starts at 16, but there's a bunch of 7's, 8's, and 9's in your background layer.
It's difficult to rectify in Tiled, but you can easily open your .tmx file in a text editor, and near the top, find where it says something like:
"<tileset firstgid="1" name="tiled_collision" tilewidth="32" tileheight="32">
<image source="tiled_collision.png" width="480" height="32"/>"
And make sure that for tiled_collision, firstgid=1, and for the other one (t1) firstgid=16. Once those are corrected, reopen the .tmx in Tiled and re-export it to mods/yourmod/maps/test1.txt
And, of course, you should make sure to have your tilesetdef placed in mods/yourmod/tilesetdefs/t1.txt, and the t1.png in mods/yourmod/images/tilesets/t1.png
Thanks a lot! I added the collision tilset first, so the tilesetdefenitions seem to be right, but i still cannot start a new game at this map. I also tried to load the new game at it's original map (laurelia.txt) and added a teleport-event to connect my testmap, but it returns "unknown destination". All filles placed in right folders, but together with the whole content of polymorphable. Are there maybe any config files, which perhaps cause problems?
If you're getting an unknown destination error, I'd double-check the [event] in laurelia.txt to confirm that the inermap line says "intermap=test1.txt,3,3" I sometimes forget the .txt.
If you're still having trouble, paste the [event] from your laurelia.txt and your full test1.tmx
I checked all files again, you can find them at:
http://pastebin.com/h86LnpzH
Well, it worked for me.
Here's my filepaths:
mods/core/images/tilesets/t1.png
mods/core/maps/test1.txt
mods/core/tilesetdefs/t1.txt
Also to remember: FLARE will generally be case sensitive - so there is a difference between Test1.txt and test1.txt
Check your filepaths against mine, and then run Polymorphable (or FLARE) from the command line. If it still crashes, show us the last line before the segmentation fault.
Thanks! It works! ;-) Case sensitvity was the problem...
I am working on a dry-run set of documentation and full conversion mod tutorial, and this entire example will help! I'm glad I was able to assist.