Re: Representing 3d Staircases? (Python)

The way slopes work in the JFIMA is that, if a char tries to walk into that tile from its height minus 1, they are automatically moved up as well as forward. Otherwise, it behaves like any other stack of tiles.
If you want it to be smoother than this, you need to calculate the height of each block at an arbitrary position on the xy / xz plane (whichever is your floor). Since these are presumably best described as cubes that are cut in half along the slope, the math is a bit easier than for arbitrary right triangular prisms (i.e. a slope that rises in the positive x direction is just y = x-tile_x).
Notice, though, that this means you'll do the bunny-hop going down a slope, which might be a little less awkward in audio, but see what I did with Sonic for how that can still be awkward in audio. Avoiding this requires that you rotate horizontal movement when on a slope, which always sounds like a huge pain but turns out not to be afterward, somehow.

If you allow things to be under your stairs, you might want to be careful that slopes only work horizontally. Otherwise, hitting a slope from below will cause the player to teleport through it, which I somehow keep failing to prevent in that Halloween thing I'll probably never finish even though it's so simple. You could just put a solid block under the slopes, and hope that things never align so that the player hits one diagonally, but that's kinda messy and if the slope-behavior can handle it instead, that's much better.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : manamon_player via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector

Reply via email to