Page 1 of 1

Issue with testing out different map for home

Posted: Fri Apr 06, 2012 5:38 pm
by rhansen541
I was trying to use a different tile set and mess around with creating a new starting screen and game wont play with a new tileset being used with a different home map.

Re: Issue with testing out different map for home

Posted: Thu Apr 12, 2012 10:35 pm
by nyktos
i'm pretty sure you are only able to use tiles supplied in the source code...
my guess would be to include the new maps into the code, then run the game.
(so the game can find the tiles you used in your new maps)

im only guessing here - still learning the ropes myself...
good luck though! :D

(i do remember reading that we should stay close to the preexisting "look & feel" when map making)
(so im only using their tiles - in hopes that my maps make it into the game)


~Embrace The Shadow~

Re: Issue with testing out different map for home

Posted: Thu Apr 19, 2012 7:41 pm
by oskarwiksten
In the source code, you'll have to modify ResourceLoader.java to include other tilesets if you want to add to the ones we already have. The string names of the added images in that file has to match the tileset name in
the TMX file, in addition to the actual filename.

For example (from a tmx file),

Code: Select all

<tileset firstgid="641" name="tiles_2_4" tilewidth="32" tileheight="32">
 <image source="../drawable/map_tiles_2_4.png" width="512" height="256"/>
</tileset>
This tileset matches on the "name" attribute of the <tileset> tag ("tiles_2_4"), against what you supply as tileset name in ResourceLoader.java.