Commit graph

65 commits

Author SHA1 Message Date
tachyonwolf
df89fa4ac7 Maze-book labyrinths, sucking one-way entrances, slime movement model
- Regions are now dense labyrinths (recursive backtracker on a coarse grid,
  1-3 tile corridors, braided loops by complexity); tubes run in the rock
  between regions, wall pipes give shortcuts inside a region.
- One-way entrances suck the slime in (player.pull_into_tube); blow zone
  is now 1 tile; blown motes are white. TubeBlower -> TubeAirCurrents.
- Validator: generous "might get to" areas vs strict SlimeMoves model
  (surface slides, corners, wraps, 1-tile gaps, ceiling falls, tubes,
  forced suction/blow tiles as all-outcomes states).
- maze_check: new hand-made blow-zone and suction traps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:15:23 -06:00
tachyonwolf
88c4920fde One-way tube exits blow the slime away; validator models blow zones
- Air blows out of one-way exits: orange motes stream out (TubeAirflow,
  renamed from TubeVacuum, now draws intake and blow) and TubeBlower
  pushes the slime within 2 tiles of the mouth via player.blow_away():
  knocked off walls/ceilings, lifted off the floor.
- Generator: at most one one-way tube comes out in each chamber; no other
  mouth, Start or End inside a blow zone.
- Validator (from tiles, via OneWayTube.find_exits/blow_zone): checks the
  same rules, so each chamber's crawlable boundary stays connected.
- maze_check: also checks Start in a blow zone is rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:52:58 -06:00
tachyonwolf
e7ae22b8cd Add Maze mode with one-way tubes and a soft-lock check
- Main menu "Maze" button opens a setup panel (width, height in screens;
  complexity 1-5) and generates a maze of rock chambers joined by tubes,
  with Start and End pads and a win panel.
- New one-way tube kind: orange tiles that only let the slime in at their
  entrance, with motes drifting into it (OneWayTube, TubeVacuum). The
  auto-tube trace moved to PixelStream.trace_tube so the player and the
  maze validator share it.
- Generation: chamber graph (spanning tree rooted at End, one-way tubes
  only towards End on the route, extra tubes), carved with AStarGrid2D.
  MazeValidator re-derives the chamber graph from the tiles and checks
  that End is reachable from every chamber reachable from Start.
- tests/maze_check.gd: headless batch check (360 mazes) plus a known
  soft-lock the validator must reject. See docs/MAZE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:45:46 -06:00
e7a773e2f4 Added camera transition between levels. 2026-11-16 13:23:51 -08:00
1a7a43ab52 More options to unstick if on two surfaces. 2026-11-16 12:35:03 -08:00
902ed33ee4 Added sprites for attaching to both surfaces. Also code for sticking to wall-to-wall or floor-to-ceiling. 2026-11-14 13:58:57 -08:00
55c249c514 Added shader to smoothly scale up from 640x480 2026-11-12 12:20:01 -08:00
b8e8658b60 - Removed Jump key from options menu.
- Made windowed move not show things beyond the camera.
2026-11-12 11:46:25 -08:00
25ff06f642 Same pixel effects for auto pipe as manual pipe. 2026-11-12 11:27:05 -08:00
e7c2ae657f Add carryable item and wall-press pose; draw tube goo behind tiles
- Carry item (Items/): picked up on touch, rides see-through in the slime's
  center, left behind at the mouth when the slime enters a tube. Has gravity.
  Placeholder Godot icon sprite. One placed in the test level.
- Wall-press sprite (new frame 9, PressWall animation): shown when pushing
  into a wall from the floor or ceiling, into a tube mouth in a wall, or from
  a wall into a floor/ceiling mouth. Flipped/turned and shifted to sit flush.
- Ceiling corners: pushing sideways into a wall keeps the slime on the
  ceiling; holding down moves it onto the wall.
- Tubes: squeezing closes the gap to the mouth; mouths are found a frame
  ahead so climbing past one can't skip it; backing out of a wall mouth
  entered from the floor or ceiling puts the slime on the wall.
- Tube goo draws behind the tiles (shows only through the channel); the
  manual tube's leader circle stays in front.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:28:36 -08:00
7be4eb9e90 Added temporary music by Kevin MacLeod 2026-11-11 12:03:44 -08:00
beeebbf47e Rework manual tubes: steerable goo with a leader indicator
Manual tubes (TubeSteer):
- The slime is pulled fully into the tube on entry; tubes too short for it
  squash it to fit, with a few pixels poking out of each mouth.
- A leader slides quickly through the goo without moving it, and drags the
  goo at normal speed once past an end. At covered junctions it can turn into
  another arm, or pull into an empty branch, draining the goo from all sides.
- Only coloured pixels go in; a black outline is drawn around the goo, with
  rounded ends in the tube.
- The leader is a pulsing circle; colour, border colour and radius are set
  under "Tube Indicator" on the Player.

Tiles and level:
- Plain tube tiles are now manual, green ones automatic. Test level tubes
  repainted plain so they stay manual.

Also included (earlier work): goo tube prototype (TubeGoo, purple tiles) and a
max length for the automatic pixel stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:03:12 -08:00
32d82b4bd1 Rework manual tubes: steerable goo with a leader indicator
Manual tubes (TubeSteer):
- The slime is pulled fully into the tube on entry; tubes too short for it
  squash it to fit, with a few pixels poking out of each mouth.
- A leader slides quickly through the goo without moving it, and drags the
  goo at normal speed once past an end. At covered junctions it can turn into
  another arm, or pull into an empty branch, draining the goo from all sides.
- Only coloured pixels go in; a black outline is drawn around the goo, with
  rounded ends in the tube.
- The leader is a pulsing circle; colour, border colour and radius are set
  under "Tube Indicator" on the Player.

Tiles and level:
- Plain tube tiles are now manual, green ones automatic. Test level tubes
  repainted plain so they stay manual.

Also included (earlier work): goo tube prototype (TubeGoo, purple tiles) and a
max length for the automatic pixel stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:36:36 -08:00
d9c86a181d Prototype code for two pipes: one that requires manual movement, and one that automatically moves the player along the path. 2026-11-09 14:52:32 -08:00
f13ca3f44f Add pipe travel 2026-11-08 19:39:40 -08:00
90bd03d194 Added main menu and also dissolve screen transition 2026-11-08 18:54:04 -08:00
ca6cc3a370 Undid some prototype stuff and updated player sprite and animation 2026-11-08 18:42:23 -08:00
98187b6742 Shatter into chunky physics pixels that stack
Each 2x2 block of the slime's frame (black pixels left out) is now a
rotation-locked RigidBody2D on its own layer, so the pieces bounce off the
level, get pushed by the piston and pile up on each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 12:09:00 -08:00
38d7e6d761 Prototype: timed piston hazard that shatters the slime into pixels
The piston winds up, slams down, holds and retracts on a timer. Catching the
slime under the head breaks its current frame into one particle per non-black
pixel, which bounce off and settle on the level. The level reloads afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 11:41:01 -08:00
f1fc198a5b Add custom level tiles and update inAir sprite for slime. 2026-11-04 14:41:43 -08:00
acd25f9909 Stop at ledges with the leading edge sensor at the edge
The slime used to stop with its center on the corner, leaving the flat
side of the sprite floating past the edge. It now stops with the leading
sensor just past the edge, so the sprite's side lines up with it. Holding
on then detaches, and pressing into the surface wraps from there.

Wall tops now stop the same way, instead of carrying straight on into the
wrap, and walls show the ReachX animation while held at an edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:10:26 -08:00
e6aaf57ec6 Added new animations for slime. 2026-11-01 16:23:36 -08:00
346f87831b Merge branch 'main' of https://forgejo.smhub.duckdns.org/SnekInAScarf/SlimePlatformer.git into main 2026-11-01 11:15:37 -08:00
db04dfc045 Testing out slight name change. 2026-11-01 11:14:51 -08:00
762b25c70b Testing out slight name change. 2026-11-01 10:25:40 -08:00
571196f292 Merge pull request 'Simplify the edge wrap: 8 state variables instead of 15' (#9) from simpler-wrap into main 2026-11-01 02:19:40 -06:00
06789e2f36 Simplify the edge wrap: 8 state variables instead of 15
Store only what can't be worked out: the corner, the surface normals we
leave and land on, where we started, where the arc begins, and the speed
and distance travelled. Arc radius and length, entry length, the exit
move and the sprite rotations are now small _wrap_... helpers.

_begin_wrap takes (corner, fromNormal, ontoNormal[, arcStartAngle])
instead of five loosely related values.

Same behaviour, except the wall-top wrap now always uses the arc's radius
(a straight sub-pixel entry instead of easing it during the arc) and turns
the sprite from the wall's rotation rather than wherever it was: at most
~0.5px and ~4 degrees different mid-wrap, ending in the same place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 01:13:01 -07:00
cfea34861f Some adjustments to naming and comments to player.gd 2026-11-01 01:05:32 -07:00
8fe449099b - Added animated sprite for slime player.
- Made slime face proper direction on walls.
2026-10-31 22:53:42 -07:00
bec85cefe3 Merge pull request 'Make player.gd easier to read for newer programmers' (#8) from beginner-readability into main 2026-10-31 20:47:57 -05:00
e5bdc85293 Merge pull request 'Remove the lip hang, which the edge hold has made unreachable' (#7) from remove-lip into main 2026-10-31 20:47:51 -05:00
90186a6c2e Merge pull request 'Clean up player.gd: names, comments, grouping, smaller _physics_process' (#6) from player-cleanup into main 2026-10-31 20:47:45 -05:00
4eb50988ea Merge pull request 'Hop across to a surface within a tile (floor, walls and ceilings)' (#5) from floor-hop into main 2026-10-31 20:47:40 -05:00
809c308a09 Merge pull request 'Smoother movement feel, plus landing/wrap sounds and splat particles' (#4) from movement-feel into main 2026-10-31 20:47:34 -05:00
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
cb0ce427aa Trim player.gd comments: shorter, and none that restate the code
Only comments and blank lines changed (the code with comments stripped
is identical). Shortened the overview, section headers and longer
explanations, and removed comments that just describe the next line.
Kept the ones explaining why or non-obvious maths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:32:13 -07:00
804a7a76c9 Make player.gd easier to read for newer programmers
No behaviour change (the 1180-frame scripted trace is identical before
and after, and all headless tests pass).

- Overview at the top: what the slime can do, how a frame runs, and a
  glossary (y points down, delta, normal, tangent, dot product, raycast).
- Big section headers; every setting has a plain-English comment.
- No backslash line continuations or dense one-line if/elses: long
  conditions are split into named bools (climbedPastWallTop, holdingDown,
  standingStill, hitHeadOn, ...), one-line ifs are full blocks.
- Explicit checks instead of truthiness (== 0.0, .is_empty(), == null).
- The maths is explained: the hop speed formula (now _get_hop_speed),
  exponential smoothing, arc length, the wall-hop arc.
- Clearer names: pos -> currentPosition, line -> justInsideSurface,
  step -> distanceThisFrame, along -> inputAlongSurface, offset ->
  fromCorner, wrapTravelled -> wrapDistanceTravelled, and the wrap angle
  parameters -> arcStartAngle/arcEndAngle.
- Letting go of walls and ceilings split out of the movement steps into
  _update_wall_letting_go and _update_ceiling_letting_go.
- Keeps the "FX resources" grouping of the sound/particle nodes and
  landSounds from the working copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:09:43 -07:00
6622544acb Remove the lip hang, which the edge hold has made unreachable
The edge hold stops the slime before it leaves a ceiling, so the lip
(hanging just past a ceiling edge after leaving it) never started any
more: 0 times in 116 ceiling-edge crawls covering both directions, many
starting points and thin/thick platforms. Removes its state,
_start_lip_wrap, CLIMB_INPUT_BUFFER and timeSinceUpPressed.

_start_wall_top_wrap keeps its own raycasts: it runs after we've passed
the corner, where _find_edge_corner can't see it. Comment added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:44:49 -07:00
693df2f2cf Clean up player.gd: names, comments, grouping, smaller _physics_process
No behaviour change (a 1180-frame scripted trace is identical before and
after, and all headless tests pass).

- Renames: MAX_SECS_TO_UNSTICK -> HOLD_TIME (it times holds, hops and
  lips too), HOP_MAX_HEIGHT -> HOP_REACH (also sideways/down),
  ROTATE_TO_WALL_SPEED -> ROTATE_TO_SURFACE_SPEED, isClimbingLip ->
  isHangingOnLip, timeSpentUnstickingLip -> timeSpentOnLip, plus
  n/dir -> wallNormal/direction.
- CLIMB_SPEED and CEILING_STICK_SPEED are positive like the other speeds,
  with the direction applied where they're used.
- Missing type annotations added (including sprite: Sprite2D).
- Constants and state grouped by feature; magic numbers for sensor depth
  and landing pitch named.
- _physics_process split into _update_facing, _update_vertical_movement,
  _update_floor_hop, _update_horizontal_movement, _update_wall_sticking
  and _update_ceiling_sticking; _finish_wrap split out of _update_wrap.
- _accelerate/_air_steer take delta like the other helpers.
- Stale and vague comments fixed (lip push marked as a fallback, the
  resolved note at the top removed, typos).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:43:17 -07:00
f167c74204 Only let go of walls and ceilings when not moving along them
Holding away from a wall while climbing, or down on a ceiling while
moving left/right, no longer counts towards MAX_SECS_TO_UNSTICK; the
timer starts over once you stop. Same rule as the floor hop, and it
covers both letting go and hopping across.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:31:14 -07:00
f9f196d8c6 Fix falling off the wall right after a floor-edge wrap on right ledges
When a wrap finishes, Godot still thinks we're on the floor we started
from. On the finishing move_and_slide it then snapped us down onto it
(floor_snap_length) and counted the wall we were pushed into as floor
(floor_block_on_wall), so we landed as "on floor", stuck to nothing,
and fell the next frame. It only happened on right-hand ledges because
of how the contact lined up. Turn both off for the finishing move unless
the wrap ends on a floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:24:11 -07:00
e8cf70e6e5 Hop across from walls and ceilings too
Holding away from a wall or ceiling for MAX_SECS_TO_UNSTICK, while not
moving along it, now hops straight across to a surface within
HOP_MAX_HEIGHT on that side and sticks to it. With nothing in reach (or
while moving along the surface) it lets go as before.

- Wall hops go at crawling speed on an arc that lands at the same height,
  with no air steering until they land.
- Ceiling hops push down onto the floor below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:16:48 -07:00
4b96d21add Only hop when not moving left/right; hop reach is one tile
- Holding left or right resets the hop timer, so the 0.5s hold only
  counts while standing still.
- HOP_MAX_HEIGHT is now 32 (one tile), as adjusted by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:27:44 -07:00
935ee797dc Hop up to the ceiling after holding up on the floor
Holding up on the floor for MAX_SECS_TO_UNSTICK hops just high enough to
reach a ceiling up to HOP_MAX_HEIGHT (64px) above the slime's top, where
it then sticks. With no ceiling in reach it does a little 16px hop.
Against a wall, up still climbs it instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:21:31 -07:00
31f1de7d68 Halve edgeSensorRange to 12 so edge wraps need the slime at the edge
Pressing into a surface now only wraps around its edge when the slime's
center is within 12px of it, i.e. the slime is touching the edge (about
1px gap), instead of up to 13px away with the old 24. Walking up to an
edge still always works, since the edge hold stops the slime there.

Measured with a headless sweep of 24/16/14/12/10/8/6/4 on floors,
ceilings and wall bottoms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:54:34 -07:00
ad9e8d62fa Stop the edge sensors from hitting the player's own collider
Since the sensors moved under the EdgeSensors pivot, exclude_parent
excludes the pivot rather than the player. With edgeSensorRange equal to
the slime's radius the rays start on the edge of its circle and hit it,
so edge wraps never triggered. Add the player as an exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:54:15 -07:00
c212748b8d Don't treat tile seams or the foot of a wall as an edge
The level's TileMapLayer is made of separate collision shapes, and the
ray that looks for the side of a platform could hit the inside face of
a neighbouring tile. That made walking along the floor stop and "hold"
at tile seams and next to walls. A corner now only counts as an edge if
there's empty space just past it, behind the surface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:14:07 -07:00
e5c176f1f6 Hold at the edge of any surface before letting go
Moving along a floor, ceiling or down a wall towards its edge now stops
at the edge, and only carries on over it after holding towards it for
MAX_SECS_TO_UNSTICK. Before, only ceilings had this (the lip, which
started after leaving), so walking off a floor sideways or crawling off
the bottom of a wall dropped instantly. Climbing up past a wall top
still swings over onto it straight away.

- While holding at an edge, pressing into the surface still wraps
  around it.
- After wrapping onto a ceiling, a held down doesn't count towards
  letting go until it's released (like walls already did).
- Pull the corner finding out of _try_edge_wrap into _find_edge_corner.
- project.godot: settings re-sorted by the editor, no change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:02:33 -07:00
20f4785d56 Smoother movement feel, plus landing/wrap sounds and splat particles
- Accelerate to full speed in 4 frames and stop in 6, on floors, walls
  and ceilings, instead of snapping.
- Keep momentum when leaving a surface; air steering is gentler and
  extra speed fades slowly. Fall speed capped at 400.
- Edge wraps ease in from a standstill and carry their speed out onto the
  new surface.
- Pull back onto a wall/ceiling that's drifted up to 4px away instead of
  falling off (floor_snap_length matches).
- Physics interpolation and pixel-snapped 2D transforms. Sprite rotation
  moved into _physics_process and made frame-rate independent.
- Squish sound + slime particles on landing, bubble sound on wraps.
  Placeholder CC0 sounds by rubberduck from OpenGameArt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:37:54 -07:00