R
Resonant Drifter
Guest
I'm looking for a movement system or tutorial using an 8+ directional inertial movement.
I'm toying around with a submarine side-scrolling game and am making the movement system. I came up with a four direction system that works fine on the basic level but falls apart after that. Right now I push the right key and the sub accelerates up to max speed based on a variable; let go and it slows down based on a variable. Like I said, it does this going up, left and down as well. Excellent.
The issues come in when going diagonal and reversing direction. Going diagonally and releasing the keys, the system will pick one of the two (up and right, for example, and it will choose right) directions and go with it alone. Upon reversing, it won't slow down to zero and then pick speed up again. It simply reverses immediately because I'm basing it on speed, no doubt.
I tried looking myself but couldn't find tutorials directly on what I'm looking for. I really only found an Asteroids game that has a simplified version of my control system and I get pointed to the physics engine but I don't want to mess with gravity (which is zero), just my ship's speed.
Anyway, after all that rambling if anyone could point me in the direction of such a thing I would appreciate it!
I'm toying around with a submarine side-scrolling game and am making the movement system. I came up with a four direction system that works fine on the basic level but falls apart after that. Right now I push the right key and the sub accelerates up to max speed based on a variable; let go and it slows down based on a variable. Like I said, it does this going up, left and down as well. Excellent.
The issues come in when going diagonal and reversing direction. Going diagonally and releasing the keys, the system will pick one of the two (up and right, for example, and it will choose right) directions and go with it alone. Upon reversing, it won't slow down to zero and then pick speed up again. It simply reverses immediately because I'm basing it on speed, no doubt.
I tried looking myself but couldn't find tutorials directly on what I'm looking for. I really only found an Asteroids game that has a simplified version of my control system and I get pointed to the physics engine but I don't want to mess with gravity (which is zero), just my ship's speed.
Anyway, after all that rambling if anyone could point me in the direction of such a thing I would appreciate it!