Skip to content

better slope handling possibly maybe#160

Draft
Ishanarunarjpriya wants to merge 28 commits into
web-dashers:mainfrom
Ishanarunarjpriya:better-geometrical-slope-handling
Draft

better slope handling possibly maybe#160
Ishanarunarjpriya wants to merge 28 commits into
web-dashers:mainfrom
Ishanarunarjpriya:better-geometrical-slope-handling

Conversation

@Ishanarunarjpriya

Copy link
Copy Markdown

No description provided.

genizy and others added 20 commits May 1, 2026 14:29
Vehicle modes (isFlying/isShip/isWave/isBird/isDart) must not
accumulate slope state — isOnSlope, wasOnSlope, currentSlopeAngle,
and slopeVelocity are wiped to 0 before any slope hit results are
applied. This prevents the polluting flags from contaminating
collision tracking on the next frame, which was causing unexpected
player deaths every time a ship/wave/bird/dart-mode touched ground
after a slope run.
1. Hazard sorting priority (player.js:2034–2048)
   Moved _colType === hazardType to the absolute first branch inside
   _broadPhaseHit so no earlier portal/coin/ring handler 'continue'
   can skip a death check. Old duplicate block removed from mid-chain.

2. Ball velocity symmetric clamp (player.js:1850)
   Replaced asymmetric if/else clamped at +/-30 for gravityFlipped
   only with a single Math.max(-30, Math.min(30, velocity)) that
   constrains both branches identically, preventing pad-launched
   balls from entering out-of-bounds clipping bands.

3. QueuedHold release safety (player.js:1812)
   Added this.p.queuedHold = false inside the _updateFlyJump
   flight path whenever this.p.upKeyDown reads false and the player
   is not yet falling, so jump-ring buffered input never fires on
   a key release frame.
Insert vehicle override (isFlying/isShip/isWave/isBird/isDart) directly
inside the slope detection loop, immediately after _floorSlopeHit and
_ceilingSlopeHit assignment. This gives the override access to local
variables (_surfY, _playerRadOnSlope) and lets it continue past the
slope processing. Overrides resolve position, set ground state, wipe
slope flags, and nullify the hit object so the post-loop block is
skipped for these modes.
@aloaf812 aloaf812 requested review from PopsicleYT, genizy and rohanis0000 and removed request for PopsicleYT, genizy and rohanis0000 June 2, 2026 00:04
@Ishanarunarjpriya Ishanarunarjpriya force-pushed the better-geometrical-slope-handling branch 2 times, most recently from 4339726 to 0ed776c Compare June 3, 2026 01:48
Ishan Arun added 3 commits June 3, 2026 11:01
- Wave/dart now slide on slopes instead of dying (matching decompiled GD behavior)
- Inside-slope death now checks mode type instead of objid restriction
@Ishanarunarjpriya

Copy link
Copy Markdown
Author

ok i fixed conflicts

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

now the slope have like a launch when you get off them and ship slopes kinda work

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

ok this pr suck rn im converting to draft

@Ishanarunarjpriya Ishanarunarjpriya marked this pull request as draft June 6, 2026 00:08
@Ameth7st

Ameth7st commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

i know this is still a work in progress but this froze my pc entirely when i tried to run it

@Ishanarunarjpriya

Ishanarunarjpriya commented Jun 6, 2026

Copy link
Copy Markdown
Author

works fine on my laptop but i'll check

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

prob has smth to do woth 3.1gb RAM usage...

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

made a github pages thing in case u want to test without putting on localhost
https://ishanarunarjpriya.github.io/web-dashers.github.io/

@antonfdiaz

Copy link
Copy Markdown
Contributor

Very cool! :)

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

ty!

@Ishanarunarjpriya Ishanarunarjpriya force-pushed the better-geometrical-slope-handling branch from d1b122e to 9664ecb Compare June 6, 2026 23:19
@Piefaceluke

Copy link
Copy Markdown

jumping off slopes doesnt feel right, but the rest is amazing!

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

ty! i know as of right now when u jump of it slope, its snaps the cube back on the slope so u never end up actually jumping off of it

@nationstatesheathcliff-eng

Copy link
Copy Markdown

slopes kill you when your upside down because only the blue block hitbox interacts with it

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

wait tysm i've been trying to figure ts out for like 2 days

@Piefaceluke

Copy link
Copy Markdown

ty! i know as of right now when u jump of it slope, its snaps the cube back on the slope so u never end up actually jumping off of it

no I meant you jump too far when you jump off the edge, but now I notice that too

@Ishanarunarjpriya

Copy link
Copy Markdown
Author

oh ok

@Ishanarunarjpriya Ishanarunarjpriya changed the title Better geometrical slope handling better slope handling possibly maybe Jun 9, 2026
@Ishanarunarjpriya Ishanarunarjpriya force-pushed the better-geometrical-slope-handling branch from a6bfde8 to f731f71 Compare June 11, 2026 16:56
@Ishanarunarjpriya

Copy link
Copy Markdown
Author

ty! i know as of right now when u jump of it slope, its snaps the cube back on the slope so u never end up actually jumping off of it

no I meant you jump too far when you jump off the edge, but now I notice that too

ok i think i fixed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants