2d step height / programmatic slope implementation

Godot Version

Godot 4.2.1

Question

I am attempting to implement some kind of step height into my 2d platformer game - I am perfectly fine with slope colliders to accomplish this so long as I can maintain the general look of the below image (with debug colliders enabled).

Some notes:

  • I’d welcome a step height implementation if one exists that is relatively performative - I did a lot of research into step height in Godot but everything I saw was focused on 3d.
  • The solution must be programmatic and performative, as terrain will be procedural, and the player can modify the terrain dynamically.
  • I would prefer not to create actual slope tiles for this (I don’t like the appearance). I’m fine with using slope colliders on square tiles, and have tried to copy my square textures onto slope colliders, but it feels inefficient and also conflicts with my border tile masks.
  • I really only need top slopes, as the end-goal is step height. Having square ceiling colliders is irrelevant at this time.

In lieu of a complete solution, any kind of push in the right direction would be greatly appreciated. I don’t currently have any code to share, because I’m still in the process of planning this functionality to determine the best approach.