Isometric Tile-map: Gaps when moving camera :(

I have created a basic isometric tile map. It looks like this:

lilx.png

Everything works great, except that when I move the camera too fast, this happens:

az3p.png

With a high-level language, I suppose this is expected to happen, but I was wondering if there is any way to parent the tiles to one another so that the gaps don’t occur?

The way I have set up the map is there is an origin and each tile has an offset from that origin in the x and y axes.  When I drag my finger across the screen, it moves the origin and updates all of the tile positions according to the velocity of my finger’s movement.

Let me know if you need code snippits.

On a side-note: if any artists come across this post and would like to help me make isometric tiles and sprites, feel free to add me on skype: quick282

Hi @tynerk92,

You should definitely learn the usage of Corona display groups, which allow you to move/rotate/fade/etc. a bunch of display objects (like these tiles) as one cohesive unit.

You can find guides, tutorials, and videos about these topics (and much, much more) in Corona University:

http://www.coronalabs.com/resources/tutorials/

In particular, you should explore these:

http://docs.coronalabs.com/guide/start/displayGroups/index.html

http://www.youtube.com/watch?v=BPnsy89HmKo

Have fun!

Brent Sorrentino

Thank you @Brent :smiley: I already had them in a displaygroup, but I did not know that you could move the entire group’s coordinates like that! 

This is exactly what I was looking for :smiley:

Great! Happy to help. Just a note that if you plan to use the physics engine and built-in collision handling, there are some “rules” pertaining to groups and moving them around. Not sure if that applies to your game or not, but if so, I can elaborate.

Brent

hmm…I’m not sure if I’ll need that or not. I haven’t fully decided how character movement will work or if there will even be dynamic objects or not.

I’d like to read up on it anyway though, I’m still new to corona. Are there any articles about this topic?

In corona I dont think there are likely to be any articles aimed specifically at isometric stuff as you cant really use physics with it and it tends to be a bit trickier to set up. How are you planning on setting up your levels? In case you didnt know, Tiled, the free level editor, can work with isometric I believe.

oh…well I already made a map editor. Working on encoding it into json right now. I’m also experienced with writing my own simple physics…shouldn’t be an issue. Thanks for the info though!

Tynerk, great job! I want to see an update on this later.

Will do! Right now, I’m currently overhauling the project while it’s still small. I’m new to both LUA and Corona, so I might end up having to do this several times throughout the process.

Once I get the map editor done, I hope to bring an artist into the project to create maps and sprites to use.

Hi @tynerk92,

You should definitely learn the usage of Corona display groups, which allow you to move/rotate/fade/etc. a bunch of display objects (like these tiles) as one cohesive unit.

You can find guides, tutorials, and videos about these topics (and much, much more) in Corona University:

http://www.coronalabs.com/resources/tutorials/

In particular, you should explore these:

http://docs.coronalabs.com/guide/start/displayGroups/index.html

http://www.youtube.com/watch?v=BPnsy89HmKo

Have fun!

Brent Sorrentino

Thank you @Brent :smiley: I already had them in a displaygroup, but I did not know that you could move the entire group’s coordinates like that! 

This is exactly what I was looking for :smiley:

Great! Happy to help. Just a note that if you plan to use the physics engine and built-in collision handling, there are some “rules” pertaining to groups and moving them around. Not sure if that applies to your game or not, but if so, I can elaborate.

Brent

hmm…I’m not sure if I’ll need that or not. I haven’t fully decided how character movement will work or if there will even be dynamic objects or not.

I’d like to read up on it anyway though, I’m still new to corona. Are there any articles about this topic?

In corona I dont think there are likely to be any articles aimed specifically at isometric stuff as you cant really use physics with it and it tends to be a bit trickier to set up. How are you planning on setting up your levels? In case you didnt know, Tiled, the free level editor, can work with isometric I believe.

oh…well I already made a map editor. Working on encoding it into json right now. I’m also experienced with writing my own simple physics…shouldn’t be an issue. Thanks for the info though!

Tynerk, great job! I want to see an update on this later.

Will do! Right now, I’m currently overhauling the project while it’s still small. I’m new to both LUA and Corona, so I might end up having to do this several times throughout the process.

Once I get the map editor done, I hope to bring an artist into the project to create maps and sprites to use.