Hey guys !
I am designing a puzzle and wonder what is the better way to deal with it.
I know there is different technics, events, behaviour and would like the best choice.
The puzzle is inspired from the Rush Hour game (in which you have to get a specific car outside of a board, by mooving other cars) but always has different rules.
Here is a quick look of the puzzle :
There is different kind of blocs. The one in the middle is the one player have to get out of the area, area represented by the green line (there is also a floor, not included in the screenshot, and a hole to get the target bloc exit).
Other blocs have different movement. Some only goes verticaly with no limitation, some horizontaly, some goes verticaly with a movement of only one unit (still need to define this unit), some can goes verticaly AND horizontaly etc …
Blocs cant get through each other or through the green line.
My question is, how to deal with of my specifications ?
Right know, my blocs are sprites with a draggable behaviour. They move from space to space, like if they were on a grid. I check if the dragged bloc is not colliding with another bloc, if so, it cant be dragged any futher in this direction. I also check the X minimum and maximal value, for the bloc which can only move for a specific number of unit.
I didnt finish all the events, but here is a quick look :
Am I doing wrong ? Is there another better choice, with less events to set ? Something with physics engine ?
I hope I am clear enough and sorry for my english =p
Thank you very much