grid movement
johnboymac
Member Posts: 33
does anyone have a template\ideas on how to move using a grid?
i.e. to make your player jump in 64 pixel increments to a new location, only if there is not an obstacle there?
I have searched, but couldnt see anything suitable.
any pointers much appreciated.
i.e. to make your player jump in 64 pixel increments to a new location, only if there is not an obstacle there?
I have searched, but couldnt see anything suitable.
any pointers much appreciated.
Comments
http://gamesalad.com/game/play/85409
Its just a matter of change attributes on the actor's position coordinates depending on the event received(key press, etc).
the eventual idea is to have the character move to the next grid square, if its free using an animation rather than a straight jump.
Im thinking the easiest way is to have a 'mask\invisible' actor that does the checking - such that if the player presses right, i move the mask to the next grid square . if there is a collision, I don't move my actor, if there is no collision i move (interpolate) my actor to the new grid square. (and probably need to ignore events until the move completes.)
thanks, J