I am trying to create a 2D tile map engine that works sort of like a tiled ScrollView

253 Views Asked by At

I already have a function that can return a tile for a given position. I am trying to make it so that when I scroll around it will load new tiles on the fly. I am having trouble figuring out how to attack the problem. I am sure that someone must have done this before and I would prefer to not reinvent the wheel on this.

Can anyone point me to a tutorial or some example code?

If not, can perhaps help me figure out how to do this?

I am using Kobold2D and the map is not going to be static, it will be generated on the fly, Minecraft style.

1

There are 1 best solutions below

0
On

CATiledLayer is perfect for this. However, I do not know if this will play well with Cocos2d.