Jump to content
GameDev.net Posting Guidelines (please read before posting)
For Beginners Forum FAQs (please read before posting)
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 06 July 2012 - 03:11 PM
Posted 06 July 2012 - 03:17 PM
Edited by DevLiquidKnight, 06 July 2012 - 03:20 PM.
Posted 09 July 2012 - 07:20 AM
Posted 11 July 2012 - 12:24 PM
Posted 11 July 2012 - 12:53 PM
You could try separating the movement from the key listener:
Posted 11 July 2012 - 12:54 PM
// check if player is moving and set direction int dx = 0; int dy = 0; if ( bMoveUp ) dy--; if ( bMoveDown ) dy++; if ( bMoveLeft ) dx--; if ( bMoveRight ) dx++; setXDir( dx ); setYDir( dy );
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.