views:

31

answers:

0

Hi there,

I've got a large image (960 X 640) which I use for the level in an iphone game. At the moment, I export this from my level editor as one large image, one for each level.

Obviously, this is quite wasteful! It would be much better if I had a tileset, and constructed the level images in game. I tried making a tile system, but it slowed down with so many images being pasted, so what I want to do is have one image, and then paste portions of a second image (The tileset) into it.

I tried doing this in openGL, ended up tearing my hair out.

So I guess my question is a simple one. I load a UIImage image in which is the 'Level buffer', I load another in which is the 'tileset', and I want to copy rectangular tiles from the tileset image into the level buffer, which I'll then use as the level image.

I've sat all day trying to figure out how to do this, but with no luck. Surely it's a simple thing? Anyone want to put me out of my misery?!

Cheers,

Stu xxx