Slick Forums

Discuss the Slick 2D Library
It is currently Mon May 20, 2013 1:43 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Animation in Tiled?
PostPosted: Sun Feb 21, 2010 11:51 am 
Offline
Regular
User avatar

Joined: Thu Mar 12, 2009 9:52 am
Posts: 142
Location: Portugal, Lisbon
Hi guys,

I've been using Tiled as my main map editor fo quite some time, and I've reached a point we're I need to destroy some tiles during gameplay, so I wanted to add a simple destruction animation.

Before I used to just erase the tiles and draw the animation above the tiles, but it's a bit dirty.

Can I do this with Kev's Tiled classes (read the javadoc and this is nowhere to be found) or should I create my own classes with support for animations?

Thanks in advance...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 21, 2010 1:31 pm 
Offline
Regular

Joined: Mon Feb 23, 2009 11:32 am
Posts: 113
if you were to write it here is what you could do:

just put the animation frames in different layers, and then have hte top layer have a data thing called animation = true. and thena all the other info, like speed and tha kinda stuff :).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 21, 2010 1:55 pm 
Offline
Regular
User avatar

Joined: Thu Mar 12, 2009 9:52 am
Posts: 142
Location: Portugal, Lisbon
h3ckboy wrote:
if you were to write it here is what you could do:

just put the animation frames in different layers, and then have hte top layer have a data thing called animation = true. and thena all the other info, like speed and tha kinda stuff :).


Are you talking about creating a animation on the fly with data from all the layers?

It's still a hack of sorts... I would rather have a sort of native Slick Option coupled with Tiled.

Thanks for the response, I'll try it anyway...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 21, 2010 2:37 pm 
Offline
Regular

Joined: Mon Feb 23, 2009 11:32 am
Posts: 113
Spiegel wrote:
h3ckboy wrote:
if you were to write it here is what you could do:

just put the animation frames in different layers, and then have hte top layer have a data thing called animation = true. and thena all the other info, like speed and tha kinda stuff :).


Are you talking about creating a animation on the fly with data from all the layers?

It's still a hack of sorts... I would rather have a sort of native Slick Option coupled with Tiled.

Thanks for the response, I'll try it anyway...


I am saying incase that there isnt any way to do it with slick.

and who knows, maybe kev will add it later if it works enough :P


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 23, 2010 5:46 pm 
Offline
Regular
User avatar

Joined: Thu Mar 12, 2009 9:52 am
Posts: 142
Location: Portugal, Lisbon
h3ckboy wrote:
I am saying incase that there isnt any way to do it with slick.

and who knows, maybe kev will add it later if it works enough :P


I'm studying how TileMap, TileSet and Layer work.

I'll override the TileSet class to add Animation as well as a SpriteSheet.
Properties of the Tileset shall define were animation begin and end, and their speed.

Also I'm thinking of using tiles in the map editor and then replace them with the appropriate ingame animation, but I would like to have an automatic way to create a level in map editor and then just reading it.

I'll post my results soon enough...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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