Closed LordofMaps closed 11 years ago
Is there capability for map scripts within the file?
looks nice :)
@Tipaa I don't think there is native support for scripts within TMX maps. However, I'm not sure what would be possible with an object layer.
If you could add the ability to tie a piece of JS into the .tmx that would be good enough to work.
This is sweet, I'm itching to test this. I'll send feedback as soon as I can.
@Tipaa tmx can have arbitrary properties on all elements. We could add one containing a filename pointing to the script...
@LordofMaps I'll have to take a look at this tonight! Moving to Tiled was one of the more daunting tasks when looking to move to Slick2d. If this could be done in advance it would make the transition easier.
I haven't looked, but does it also play nice with the level editor?
Can you possibly synch up the branch to the latest and do a pull request? Even if there are a few lingering bugs, it would be great to have this merged. Also, others can help fix bugs if its been committed :)
@Flet It does not work with the built-in level editor (which reminds me I should remove the option from the main menu). You have to use Tiled with the tile sets under 'res/tiled'.
@master-lincoln I think that would be the best way to implement scripts on map, as long as the tile properties are loaded with the map and not every tick.
@LordofMaps I coudn't get this compile with either gradle or netbeans .. something about the Sound.java not sure EDIT: http://www.pasteall.org/30203 EDIT#2: Looks like it's happening in the main repo as well. Think I'm gonna create a new issue for this rather.
looks like the issue is resolved here and everything is setup for tiled maps :)
I currently have a branch (feature/tiledMap) with Tiled map support, or more accurately Tiled Map XML (TMX) file support. Maps can have any number of layers but only the top most tile at any position (x,y) will be considered active. Object layers are not supported. Also, as part of this player spawn points and shop items are now map defined.
I'm using the Slick2d code to load the maps, however the code does NOT require Slick, nor does it use Slick. This was done because the code was already there, and quite good, and if the project ever switches over to Slick the only thing that will need to be changed are imports.
I'm posting this because I need testers! It would take me way to long to find all of the bugs on my own and it's not quite ready for a develop pull request. I need people to play around and make TMX maps.
To create a map download Tiled Map editor and load the base.tmx file found in my tiledMap branch under res/tiled. Any feedback will be greatly appreciated! Sorry if this is the wrong place to post something like this.
EDIT: The tile sets are not actually loaded from the map. The tile sets are used as a reference for the ID of each tile and not the image of each tile. This is why I've included base.tmx so that the tile set order will be consistent across maps.
Currently each map is assumed to have at least one spawn point for player one.