Advanced Image Atlas Possible?

Hello!

After I got very unhappy with Corona (for several reasons that most of them are seemly fixed with the new version and licensing) I switched to Marmalade.

Marmalade allow some very low level control of the graphics, and I went to make a jigsaw game where I the images used are solid images, and the “pieces” are made using UVs.

For example, if I want to transform a single 100x100 image into two pieces, I would render one object using pixels from columns 0 to 50 of the image for one piece, and 51 to 100 in the other piece. 

Corona has a light support for that, using imagesheets, but for me is not enough, I change the pieces during runtime, they are not fixed.

Can I do it?

If not, the promised “Re-imaging” or something like that, will support if? Because if we can port our game from Marmalade back to Corona, we will seriously consider using Corona again (Marmalade is a great piece of technology, but their support is too poor for the price we paid).

Maurício Gomes

Kidoteca

stan8 - I’m having someone who knows the answer look at this and respond. 

stan8, could you elaborate on how you want to construct the pieces? Maybe a concrete example of how you would change the pieces?

It sounds like what you are asking can be done with image sheets. Image sheets are essentially texture atlases where you can specify various frames of difference size, location. 

You can dynamically create the metadata for the image sheets, so wouldn’t that let you change how the texture atlas is divided up?

Hello walter!

What I want to do in fact is divide a image twice. I want to make pieces out of frames (or frames out of pieces). Also in a dynamic way, sometimes while the game is running.

I guess it maybe can be done creating my image sheet data dynamically, but I guess it would be pretty crazy all the calculations and then creating objects on the fly.

In fact is I could avoid the object overhead would be awesome, and just paste a arbitrary image where I want, without any other code to it.

So if I understand you correctly, you’d like to modify the frames of the image sheet? Or in your case, add frames to the image sheet?

That would avoid creating new image sheet data dynamically.

walter

You could try using image masks.  All the pieces would be made from display objects of the same size using the same texture image, but each would have a different mask that only shows the area of the particular piece.  All the pieces would overlap to complete the entire image.

I will run some tests here, see what I can do with the current image sheet system and some dynamic editing of the sheet. Thanks Walter.

Maurício Gomes

stan8 - I’m having someone who knows the answer look at this and respond. 

stan8, could you elaborate on how you want to construct the pieces? Maybe a concrete example of how you would change the pieces?

It sounds like what you are asking can be done with image sheets. Image sheets are essentially texture atlases where you can specify various frames of difference size, location. 

You can dynamically create the metadata for the image sheets, so wouldn’t that let you change how the texture atlas is divided up?

Hello walter!

What I want to do in fact is divide a image twice. I want to make pieces out of frames (or frames out of pieces). Also in a dynamic way, sometimes while the game is running.

I guess it maybe can be done creating my image sheet data dynamically, but I guess it would be pretty crazy all the calculations and then creating objects on the fly.

In fact is I could avoid the object overhead would be awesome, and just paste a arbitrary image where I want, without any other code to it.

So if I understand you correctly, you’d like to modify the frames of the image sheet? Or in your case, add frames to the image sheet?

That would avoid creating new image sheet data dynamically.

walter

You could try using image masks.  All the pieces would be made from display objects of the same size using the same texture image, but each would have a different mask that only shows the area of the particular piece.  All the pieces would overlap to complete the entire image.

I will run some tests here, see what I can do with the current image sheet system and some dynamic editing of the sheet. Thanks Walter.

Maurício Gomes