Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

To Move or not to Move

Sign in to follow this  


Post by Joel, Programmer at Demergo,[/font][/color]
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.[/font][/color]
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.[/font][/color]
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.[/font][/color]
Reposted from Fixbot Blog[/font][/color]
Sign in to follow this  


Recommended Comments

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 !!

Share this comment

Link to comment
@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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!