Hi, I'm making a little movement engine, it's LOTS of events so I've made a tiny little example that has the basic (and i mean basic) fundaments of how I will be moving the player/objects.
So far everything is running ok, I even found a way (although somewhat crude) to find the angle of the any wall to calculate a way to bounce off it corrctly, but there is ONE main thing stopping me from really developing this much further and that is, I can't get it to stop accelerating beyond a certain point. That is to say, if I hold up for example, the player will just keep getting faster.
I'm pretty rubbish at most maths, and i've spent many hours just trying to fix this problem...
I've tried lots of things and most of them, if they even work result in usually one of two things, I -can- get it to stop accelerating once a certain speed is reached BUT after that point I am unable to move in any other direction,
OR
I can move in any direction again but it's not realistic looking, as in moving diagonally will actually move faster than moving up/down or left/right, also when turning whilst moving forward, the player moves in more of an octogon type shape.
Any help with limiting the speed (and some nice accel/deceleration code would be nice too <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile"> ) while still maintaining control would be VERY helpful <img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy">
To fully understand what I'm raving about, here's the link to the reduced version
(you don't really want the big one I'm working on, way too confusing for now I just want this movement thing sorted)
http://www.fileshack.us/get_file.php?id ... ntdemo.cap
Oh one more thing, I don't -really- wanna make it use the built-in movement types, I know it may be a little counter-productive on my part but I really wanna know how to actually do this myself. Plus I like custom movements more anyway <img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink">
Anyway PLEASE help if you can! yay
bye