Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Alright, just one more question and then I'm done: could the system be modified to allow for slopes?

(1 edit) (+1)

It would need a bit of work, but it doesn't seem impossible. player_inertia_x already sort of supports 1-pixel slopes (to solve edge cases where you could get stuck in jump-through platforms, if I recall correctly). If you replaced this hardcoded code with a loop that checks a range of values, it'd allow for slope support. (My preferred approach is to start the loop at y+SLOPESIZE when you're on ground, y+0 when you're in mid-air, and in both cases sequentially check values until y-SLOPESIZE; this lets you smoothly follow slopes down, but you won't get sucked down at massive speeds if you try moving left/right in the middle of a jump because the game thinks you're on an invisible slope)

Don't forget that you will also need to change the rectangle_free script so that it uses precise collisions instead of bounding box only, and give all slope objects a sprite with a precise collision mask.



As an example for how the improved inertia function would look like, here's the corresponding code from my SoulsVania engine:


(+1)

Alright, thanks again for your help! Definitely gonna buy this now, if only because your customer service is so on-point.