Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

(Construct) Slope Acceleration/Deceleration


Candescence

Recommended Posts

You guys know I'm working on a Sonic engine for Construct, SO...

Okay, for starters, here's the current version of the engine.

Okay, so I've been trying to implement slope acceleration and deceleration, with pretty much no success whatsoever.

The Sonic Physics Guide uses a Slope Factor (slp) that is used with "slp*sin(angle)" and added to Sonic's speed at the beginning of every step. The results of my attempts at implementing this method have been... Varied. The regular value for "slp", 0.125, does nothing at all. This is mainly because Construct's "Custom Movement Behaviour" works with much larger values (for example, Sonic's 'normal' acceleration is 450). Moving the decimal point around to the right once so it's 1.25 doesn't do anything either. Move the decimal point to the right again, however, and suddenly when Sonic is angled to the left he goes incredibly fast and when angled to the right he stops in his tracks, no matter which direction he's facing. Naturally, this is because clockwise from 0 degrees is positive and counter-clockwise is negative.

(Note that the default angle for when Sonic is NOT on a slope is 90 degrees. I merely reduce that by 90 when performing calculations.)

More complicated methods I've tried have not worked either. I might be doing the Physics Guide method wrong somehow, but why that would be so hasn't quite hit me yet.

If anyone who has experience with Construct could help me out, it would be very much appreciated. If any general programming guys might have an idea why I might be doing the Physics Guide method wrong, that would be awesome too.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...