Jump to content

  • Log In with Google      Sign In   
  • Create Account






To Move or not to Move

Posted by toddbluhm, in Demergo Studios, Fixbot 06 March 2012 · 399 views

lines movement the force player movement fixbot demergo studios gameplay

Post by Joel, Programmer at Demergo,


A critical element of any game that must be considered carefully when designing and developing is the movement and controls. The decision will affect every aspect of the game and the very feel of play. There are as many movement styles as there are game types. Ranging from the simple run-and-jump of a platformer to the head-scratchingly complicated schemes that allow precise control in flight simulators. In our case we chose a relatively simple setup that works off of lines. When the player drags from fixbot to a point on the screen a line is projected out in front of his finger that collides with walls and objects in that direction. When he releases his finger fixbot is rotated to a correct landing angle and moved through space to the new wall.


To handle the movement from the code side we use a modified version of the Cocos 2D engine's built-in movement and rotation actions. By starting from a pre-built engine we avoided a lot of the risk of redesigning the proverbial wheel. Of course even with the assistance Cocos was, it still didn't solve all the issues we had but luckily we were able to reuse a lot of the math work that we did for the surfaces in the level. In fact, the most difficult math came into play with adjusting player rotation after launching to a new surface. By dragging a line from the player to one of the level surfaces we calculate distance to the point of collision and once the player releases we launch them down that line until they land safely (or so they hope) on another surface. Getting the correct rotation required a healthy smattering of linear algebra and geometry but the less said about those dark times the better.


Because controls dictate how the player interacts with the game they color his entire experience and directly affect his enjoyment. It is therefore important to make sure that the control scheme chosen matches the goals for the game.


Reposted from Fixbot Blog





Sounds interesting, but did you try letting the player handle the rotation. If they get it wrong SMASH, fixbot breaks into bits :-) Maybe another mode of play !!
@Lee Strip I think if I gave Joel another thing to change on his movment code he would kill me. ;) Your idea sounds awesome! Sounds like you have the start of your own game there. :D
Oh well, I think it would be interesting :-) Good luck guys.
PARTNERS