#148721 - melw - Wed Jan 09, 2008 10:35 am
Hi,
I've had a DS Motion card for a while but haven't done anything with it until recently. So, I made this small game, but I'm not quite happy how the motion controlling is being used currently. Any tips on making better motion controlled ball movement are appreciated.
Here's roughly what I'm doing each frame right now:
For the reference, you can start the game without a Motion Card / Pak and test the movement with d-pad. Oh, and press A to calibrate the Motion Card.
I've had a DS Motion card for a while but haven't done anything with it until recently. So, I made this small game, but I'm not quite happy how the motion controlling is being used currently. Any tips on making better motion controlled ball movement are appreciated.
Here's roughly what I'm doing each frame right now:
Code: |
motx = motion_acceleration_x();
moty = motion_acceleration_y(); storeMotionAccelerationValues(); interpolateBothXandYfromLastNframes(); // currently using 4 frames to "smoothen" the movement ballSpeedX += motx; ballSpeedY += moty; checkTheSpeedLimits(); |
For the reference, you can start the game without a Motion Card / Pak and test the movement with d-pad. Oh, and press A to calibrate the Motion Card.