Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
FLARE

Problems with new tileset [SOLVED]

Tevoo
Wednesday, September 26, 2012 - 08:14

 

 

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.

 

  • Log in or register to post comments
Clint Bellanger
joined 13 years 6 months ago
Wednesday, September 26, 2012 - 08:17
Clint Bellanger's picture

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!

  • Log in or register to post comments
Tevoo
joined 10 years 6 months ago
Wednesday, September 26, 2012 - 09:16

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.

Attachments: 
Preview
t1.png t1.png 7.5 Kb [210 download(s)]
  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Wednesday, September 26, 2012 - 10:09
makrohn's picture

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

  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Wednesday, September 26, 2012 - 10:09
makrohn's picture

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

  • Log in or register to post comments
Tevoo
joined 10 years 6 months ago
Wednesday, September 26, 2012 - 13:55

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?

  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Wednesday, September 26, 2012 - 14:03
makrohn's picture

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.

  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Wednesday, September 26, 2012 - 14:56
makrohn's picture

If you're still having trouble, paste the [event] from your laurelia.txt and your full test1.tmx

  • Log in or register to post comments
Tevoo
joined 10 years 6 months ago
Thursday, September 27, 2012 - 02:14

I checked all files again, you can find them at:

http://pastebin.com/h86LnpzH

  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Thursday, September 27, 2012 - 02:31
makrohn's picture

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.  

  • Log in or register to post comments
Tevoo
joined 10 years 6 months ago
Thursday, September 27, 2012 - 02:49

Thanks! It works! ;-) Case sensitvity was the problem...

  • Log in or register to post comments
makrohn
joined 10 years 11 months ago
Thursday, September 27, 2012 - 08:25
makrohn's picture

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.

  • Log in or register to post comments