SliderPuzzle help

Hi,

I’m trying to create a slider puzzle with Corona, where you have to move horizontal and vertical blocks, in order to move an object outside the box. See http://www.youtube.com/watch?v=SjUTWVa4gOs for an example.

I figured the only way to do this in Corona would be using physics objects, but i ran into some problems:

1 - When i drag a block horizontally or vertically, it also moves the blocks next to it.
2- When i drag a block against another block, it overlaps other blocks, same with dragging blocks outside the area.

I created a sample to check out, if somebody has the time to look into it: http://www.rmbsoft.com/programs/SliderPuzzle.rar

I don’t know if using physics objcts is the answer, but if anyone know alternative methods creating this, i would love to hear it.
[import]uid: 50459 topic_id: 25091 reply_id: 325091[/import]

Cant imagine why you need physics unless you expect things to move in a parabolic arc or drop under the effect of gravity.
If not, then just use images or sprites without physics, and move them about under finger control.

Im guessing that your objects have friction, and that moving one ‘strokes’ another.
[import]uid: 108660 topic_id: 25091 reply_id: 101941[/import]

I thought i needed physics, because how can you detect if a block hits another block and is not able to move further?

[import]uid: 50459 topic_id: 25091 reply_id: 101959[/import]

Keep an in-memory array of the blocks.
e.g. if our block is at 2,4 and the array at 2,3 has a number in it, you can’t ,move left.

But you could just try removing the friction if thats the only problem [import]uid: 108660 topic_id: 25091 reply_id: 101960[/import]