Commit graph

17 commits

Author SHA1 Message Date
f9c20f4de9 Merge pull request 'Edge sensors: slide over the edges of floors, walls and ceilings' (#3) from floor-edge-drop into main 2026-10-31 20:47:28 -05:00
0f24145f49 Merge pull request 'Smoothly wrap around ceiling lips and wall tops' (#2) from smooth-edge-wrap into main 2026-10-31 20:47:22 -05:00
01eb5adbd1 Rotate edge sensors with the surface so edges work on walls and ceilings
The edge sensors now live under an EdgeSensors pivot that's rotated to
point into whatever surface the slime is on. Pressing into the surface
(down on floors, up on ceilings, towards the wall on walls) near an edge
slides over it onto the side of the platform. The other axis picks the
side; otherwise facing decides (last direction moved along a wall).

- Ceiling edge -> wall above, wall top -> floor, wall bottom -> ceiling
  underneath, floor edge -> wall below, all through one code path.
- Skip sensors that start inside something (inside corners).
- _begin_wrap takes the normal of the surface to end up on and works
  out the sprite rotation from it; wraps can now end on a ceiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:11:14 -07:00
815444f3af Slide over floor edges onto the wall below when pressing down
Two RayCast2D edge sensors point down into the floor edgeSensorRange to
each side of the slime. When one stops touching floor there's an edge in
range on that side, and pressing down slides to it, swings over the
corner and carries on down the wall so the slime ends flat against it.

- Down + a direction picks that side; down alone goes the way the slime
  is facing, or the other way if only that side has an edge in range.
- Down in the middle of a platform does nothing.
- edgeSensorRange is exported (default 24, tuned with a headless sweep).
- Wraps can now start with a straight move to the arc, and end with a
  move_and_slide so is_on_floor()/is_on_wall() aren't stale afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:02:05 -07:00
b098b78934 Stay on the wall after wrapping around a lip
The wrap ended with the slime level with the corner and WRAP_MARGIN away
from the wall. The wall stick push only covers ~0.33px a frame, so it
often didn't touch the wall on the next move_and_slide, stopped sticking
and fell.

- After the arc, carry on straight up the wall by the radius (or onto the
  platform for wall tops) so the slime ends flat against the surface.
- Close the remaining gap with move_and_collide when the wrap finishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:46:08 -07:00
43380dd72c Smoothly wrap around ceiling lips and wall tops
Instead of relying on physics to slide the round collider around a
corner, find the corner with raycasts and swing the slime around it on
a quarter circle at crawling speed, rotating the sprite along with it.

- Hanging on a ceiling lip + up: swing onto the wall above.
- Climbing up past the top of a wall: swing over onto the floor on top.
- Tapping up up to 0.15s before reaching a lip still counts.
- Falls back to the old behaviour if the corner can't be found or there
  is no room at the end of the swing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:41:11 -07:00
c72708e63e Merge pull request 'Fix climbing from a ceiling lip onto the wall above' (#1) from fix-lip-wall-climb into main
Reviewed-on: #1
2026-10-31 14:38:25 -05:00
485553df3e Fix climbing from a ceiling lip onto the wall above
- Pressing up while hanging on a lip now moves the slime up and back
  towards the platform so it wraps onto the wall instead of staying frozen.
- Only walking off a ceiling edge starts a lip hang (not landing on a
  ceiling or dropping off it with down).
- Don't count the held direction towards unsticking from the wall right
  after climbing on from a lip, until it's released.
- Remove leftover debug print.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:30:08 -07:00
0db36e2526 Added lip climbing 2026-10-30 23:59:38 -07:00
64188a72d3 Revert "blah"
This reverts commit 454624856d1f686e4ce5e3df4e6a5e2b47cfc83d.
2026-10-30 23:16:23 -07:00
f70cc0b97a Added extra code for sticking to the wall or ceiling.
- Slight delay before unsticking from a wall/ceiling.
2026-10-29 14:25:36 -07:00
4df996690e - Removed jumping code
- Add clinging to ceiling upon touch
2026-10-29 01:28:37 -07:00
ca14c26a2d - New placeholder slime sprite
- testing removing jump from player
2026-10-26 23:28:46 -07:00
696a89d1ec Add jump buffering to player slime. 2026-10-18 20:14:18 -07:00
46cac1e3c7 - Added options menu with Claude. Complete with keybindings and volume sliders. 2026-10-18 18:21:27 -07:00
8cb47464dd - Added in-game pausem menu. Generated with Claude! 2026-10-17 23:51:15 -07:00
164aaaaeb7 Initial upload of Slime Platformer. 2026-10-14 01:50:16 -07:00