Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to develop a cocos2d tiled based game using a sort of 'dynamic' object layer. What I want to do is after the tiled map is loaded, the user can drag something into the map and that will become an event when the 'hero' pass over it. I know how to build an object layer in tiled but it seems that is for fixed positions and what I want is a dynamic action position based on what the user can select. For instance, the user can drag a rock into a tile and when the character hit that rock he may die, or something.

I'm a little lost about how to make it work. Do you have any idea of what should I use or what should I look for?

Thanks in advance!

share|improve this question
do you mean you want different to have different collision callbacks for different obstacles? or do you want non-grid-based TileMap? – Ali.S Oct 19 '12 at 23:07
Yes, I mean for instance the user will drop a rock at some tile, or maybe drop another element like fire, and depending what element is dropped different actions can be fired. I just found examples where the object layer was fixed and I want something dynamic made. Is that possible? – Rodrigo Camargo Oct 20 '12 at 0:39
You need conditionals where you process your event ( if (event.type == FIRE) processFire(); else if (event.type == STONE) processStone(); etc. ) – Markus von Broady Oct 20 '12 at 7:09
he means he wants to add tiles dynamically after the tile map is loaded. im having the same trouble. – dtc Jan 8 '14 at 19:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.