Slick Forums

Discuss the Slick 2D Library
It is currently Thu May 24, 2018 10:04 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [UPDATED] Tiled
PostPosted: Mon Mar 19, 2012 6:45 am 
Forked Commit Here, waiting for approval

CHANGES

BugFIX

Merged @thaaks Isometric Support (commit d0a74b4374b8) into current TiledMap's

Added ZLIB compression support (code needs to be reviewed)

Added parsing for opacity/visibility values of layers (need to still make render method render opaque layers)


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Wed Mar 21, 2012 7:53 am 
  • 0.8 Feature - IMPLEMENTED Flipping and Rotating Tiles
  • 0.8 Feature - IMPLEMENTED Polygon Objects
  • 0.8 Feature - IMPLEMENTED Polyline Objects
  • 0.8 Feature - IMPLEMENTED Coloured object groups (doesn't render objects in colour as usual)
  • 0.8 Feature - IMPLEMENTED Tileset properties
  • Some optimisations and code cleanups here and there

Currently the support for Tiled 0.8 is almost complete. All I need to implement is "specifying a tile drawing offset" (it says this is a feature, but I can't find any documentation about it in the UI etc.) and writing Tiled 0.8 maps.

As usual, the code is pushed to my repo. I will push when everything is done. Currently stable.


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Thu Mar 22, 2012 2:49 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
After using the new Tiled classes, I encountered an empty string error when loading layers without opacity. I solved this by replacing
Code:
      opacity = Float.parseFloat(element.getAttribute("opacity"));

with
Code:
      if (element.hasAttribute("opacity")){
         opacity = Float.parseFloat(element.getAttribute("opacity"));
      }else{
         opacity=1;
      }


in both the Layer class and the ObjectGroup class.
should I push this fix to dev?

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Thu Mar 22, 2012 6:46 am 
I have already solved this bug, no need to push to dev. Currently all the Tiled0.8 stuff is in my branch, I will push it all over to dev soon.


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Mon Mar 26, 2012 7:19 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Roger

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Wed Mar 28, 2012 9:45 am 

This should be full support for Tiled 0.8 Maps.

I've created a pull request.


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Wed Mar 28, 2012 10:40 am 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Question:

Does or is it planned to support streamed maps using Tiled?

Speaking about online applications that download a small part of the map and add/remove stripes of tiles at every step. The the actual map is VERY large (10000 x 10000 tiles) but the client "knows" only a smaller part of the map.

Nitram

_________________
http://illarion.org


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Wed Mar 28, 2012 11:04 am 
Well Tiled support is currently static in the sense that no it cannot do that. It would be a very large pain to implement this, but I suppose it's achievable.


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Thu Apr 05, 2012 7:47 am 
Offline

Joined: Sun Jul 10, 2011 8:27 am
Posts: 25
liamzebedee wrote:

This should be full support for Tiled 0.8 Maps.

I've created a pull request.


Hi Liam,

Where can we get a copy of the integrated code? I'm looking forward to trying it out, the original TilEd support has a really weird and cumbersome API!

_________________
Deejay
BinaryTweed.com - New games that are like old games, but better
IndieCity.com - Playing a different game


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Wed Jul 04, 2012 11:29 am 
Offline

Joined: Wed Jul 04, 2012 11:16 am
Posts: 1
When will this be added to a nightly build?

Is there a unofficial up-to-date build somewhere?

Does TiledMapPlus make modifications outside of the tiled folder, i.e. can I just copy the files from bitbucket and have them outside the stable slick build?

This project looks really promising and I'm looking forward to using it in my game.


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Fri Jul 06, 2012 11:57 am 
Offline

Joined: Sat Jun 23, 2012 4:14 pm
Posts: 74
Location: Germany
liamzebedee wrote:
Well Tiled support is currently static in the sense that no it cannot do that. It would be a very large pain to implement this, but I suppose it's achievable.


Is it the same for TiledMapPlus? I want to make a game with a generating world (think Minecraft) and it should only load (stream) a part of the whole map so that it also could be used for multiplayer.

So does TiledMapPlus support these two things?


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Sat Jul 07, 2012 1:07 pm 
It hasn't been implemented. Streaming is a very complex process, that would probably be more suitable to a binary format. None the less, it can be achieved with Tiled. I'll describe the process, and if you don't understand it, you probably won't be able to implement it.

The map is divided into chunks. Chunks are fixed in size (say, 16 by 16 tiles). Chunks are loaded around where the player is, in the order of closest to furthest. Whenever the player moves to a new chunk, another chunk in the farthest opposite direction is removed. This way, we are not exhausting memory by storing all the chunks. Objects are different, because they are not necessarily organized into structure. The general approach is to store all the objects and periodically search and remove all the ones we can't see.


Top
  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Sat Jul 07, 2012 1:40 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
snapy666 wrote:
liamzebedee wrote:
Well Tiled support is currently static in the sense that no it cannot do that. It would be a very large pain to implement this, but I suppose it's achievable.


Is it the same for TiledMapPlus? I want to make a game with a generating world (think Minecraft) and it should only load (stream) a part of the whole map so that it also could be used for multiplayer.

So does TiledMapPlus support these two things?

Why would you use Tiled for this? Tiled is a means of loading maps from the tiled editing software. If you are generating your maps and streaming them, you would want to create your own map format, and you wouldn't have need for a map editor.


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Sat Jul 07, 2012 2:05 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
snapy666 wrote:
liamzebedee wrote:
Well Tiled support is currently static in the sense that no it cannot do that. It would be a very large pain to implement this, but I suppose it's achievable.


Is it the same for TiledMapPlus? I want to make a game with a generating world (think Minecraft) and it should only load (stream) a part of the whole map so that it also could be used for multiplayer.

So does TiledMapPlus support these two things?


Check out my "Engine", I work on if I have time:
https://github.com/Regiden/RadicalFishEngine

I made a nice map engine which writes raw data so you can load the maps in any application. The Engine provides Interfaces in Java to load maps and also provides you with a gzipped stream. You can easily setup a Thread to stream maps with that. There is not much doc about but a small test.

Map Package:
https://github.com/Regiden/RadicalFishE ... /world/map

Test:
https://github.com/Regiden/RadicalFishE ... h/test/map

This is all very easy and raw but you can use it as a basic idea :D

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [UPDATED] Tiled
PostPosted: Sat Jul 07, 2012 2:14 pm 
Offline

Joined: Sat Jun 23, 2012 4:14 pm
Posts: 74
Location: Germany
liamzebedee wrote:
The map is divided into chunks. Chunks are fixed in size (say, 16 by 16 tiles). Chunks are loaded around where the player is, in the order of closest to furthest. Whenever the player moves to a new chunk, another chunk in the farthest opposite direction is removed. This way, we are not exhausting memory by storing all the chunks. Objects are different, because they are not necessarily organized into structure. The general approach is to store all the objects and periodically search and remove all the ones we can't see.


Understood. Although implementing this might be quite hard (and even more so if your are quite a noob in game developement) so I might try working on other stuff first.

davedes wrote:
Why would you use Tiled for this? Tiled is a means of loading maps from the tiled editing software. If you are generating your maps and streaming them, you would want to create your own map format, and you wouldn't have need for a map editor.


The reasoning for using Tiled is to have a map editor in place (which might be needed anyway) and also not having to reinvent the wheel, because I think that my map format would share a lof of the features of Tiled's format.

Edit:
R.D. wrote:
Check out my "Engine", I work on if I have time:
https://github.com/Regiden/RadicalFishEngine

[...]

This is all very easy and raw but you can use it as a basic idea :D


Wow thanks! I'll look into it :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group