Compare commits

...

5 commits
maze ... main

Author SHA1 Message Date
df467b469d - Added extra frame when pressing towards a surface while attached to two surfaces. 2026-11-20 16:02:50 -08:00
16c5a2b96d - Made neutral "sticking to two surfaces" show briefly when already pressing towards a surface.
- Made separate variable for how long to unstick from ledge.
2026-11-18 13:16:22 -08:00
c7229f1fba Added frames for squishing left/right while connected to two walls. 2026-11-17 23:46:57 -08:00
e916c5611b Add some extra sprites for pressing up or down while attached to both floor and ceiling. 2026-11-16 22:19:33 -08:00
bb3dc29f48 Merge branch 'maze' into main
Maze mode: generated tube mazes with one-way tubes, blow and suction
zones, a soft-lock validator, and manual tubes only (goo tubes removed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:04:26 -08:00
4 changed files with 229 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -24,8 +24,11 @@ const CEILING_STICK_SPEED = 20.0
const WALL_STICK_SPEED = 20.0 const WALL_STICK_SPEED = 20.0
const SURFACE_SNAP_DISTANCE = 4.0 # Drift off a wall/ceiling by up to this and we pull back on. const SURFACE_SNAP_DISTANCE = 4.0 # Drift off a wall/ceiling by up to this and we pull back on.
# How long to hold before letting go, going over an edge, or hopping. # How long to hold before letting go or hopping.
const HOLD_TIME = 0.5 const HOLD_TIME = 0.33
# How long to hold towards an edge we've stopped at before going over it.
# 0 never stops us at edges at all.
const EDGE_HOLD_TIME = 0.1
# How close an edge must be (from our center) for an edge wrap. # How close an edge must be (from our center) for an edge wrap.
const EDGE_SENSOR_RANGE := 12.0 const EDGE_SENSOR_RANGE := 12.0
@ -81,9 +84,33 @@ const PRESS_WALL_SPRITE_SHIFT = 6.0
# exactly that long, always drawn the same way round and centred between the # exactly that long, always drawn the same way round and centred between the
# surfaces (see _align_press_wall_sprite). # surfaces (see _align_press_wall_sprite).
const BRIDGE_FRAME = 10 # Wall to wall. Drawn upright, so it's turned a quarter. const BRIDGE_FRAME = 10 # Wall to wall. Drawn upright, so it's turned a quarter.
const BRIDGE_VERTICAL_FRAME = 11 # Floor to ceiling. # Wall to wall, leaning towards the wall we're holding towards. Drawn upright
# and turned like BRIDGE_FRAME, so the frame's top ends up on the right.
const BRIDGE_LEAN_RIGHT_FRAME = 11 # Most of us bunched at the top.
const BRIDGE_LEAN_LEFT_FRAME = 12 # Most of us bunched at the bottom.
const BRIDGE_VERTICAL_FRAME = 13 # Floor to ceiling.
# Floor to ceiling, leaning towards the surface we're holding towards: most of
# us down on the floor, or up on the ceiling.
const BRIDGE_VERTICAL_DOWN_FRAME = 15
const BRIDGE_VERTICAL_UP_FRAME = 17
# Halfway into each lean. The lean animations open on these, then go on to the
# full lean.
const BRIDGE_LEAN_RIGHT_MID_FRAME = 18
const BRIDGE_LEAN_LEFT_MID_FRAME = 19
const BRIDGE_VERTICAL_DOWN_MID_FRAME = 14
const BRIDGE_VERTICAL_UP_MID_FRAME = 16
# Every column frame, all centred between the surfaces (see _align_press_wall_sprite).
const BRIDGE_FRAMES = [
BRIDGE_FRAME, BRIDGE_LEAN_RIGHT_FRAME, BRIDGE_LEAN_LEFT_FRAME,
BRIDGE_LEAN_RIGHT_MID_FRAME, BRIDGE_LEAN_LEFT_MID_FRAME,
BRIDGE_VERTICAL_FRAME, BRIDGE_VERTICAL_DOWN_FRAME, BRIDGE_VERTICAL_UP_FRAME,
BRIDGE_VERTICAL_DOWN_MID_FRAME, BRIDGE_VERTICAL_UP_MID_FRAME,
]
const BRIDGE_GAP = 32.0 # One tile. const BRIDGE_GAP = 32.0 # One tile.
const BRIDGE_GAP_TOLERANCE = 1.5 const BRIDGE_GAP_TOLERANCE = 1.5
# How long we show the plain bridge frame after attaching before leaning towards
# the surface we're holding towards.
const BRIDGE_SETTLE_TIME = 0.15
const IN_AIR_FRAME = 8 # The InAir animation's frame. const IN_AIR_FRAME = 8 # The InAir animation's frame.
############### ###############
@ -154,6 +181,10 @@ var bridgeAxis := Vector2.RIGHT # RIGHT between walls, DOWN between floor and ce
var bridgeHoldSide := 0.0 # Which way along bridgeAxis we're holding (1, -1), or 0. var bridgeHoldSide := 0.0 # Which way along bridgeAxis we're holding (1, -1), or 0.
var timeSpentLeavingBridge := 0.0 var timeSpentLeavingBridge := 0.0
var timeSpentDroppingFromBridge := 0.0 var timeSpentDroppingFromBridge := 0.0
# Between floor and ceiling, which one we're holding towards: -1 up, 1 down, or 0.
# Read by the AnimationTree to lean the column that way.
var bridgeLean := 0
var bridgeSettleTimeLeft := 0.0 # Until this runs out we don't lean (see BRIDGE_SETTLE_TIME).
var carriedItem: CarryItem = null # The item riding in our center, or null. Tubes drop it. var carriedItem: CarryItem = null # The item riding in our center, or null. Tubes drop it.
@ -206,7 +237,7 @@ func _ready() -> void:
# they reform as from the sprite's offset, and that must not carry the shift. # they reform as from the sprite's offset, and that must not carry the shift.
func _align_press_wall_sprite() -> void: func _align_press_wall_sprite() -> void:
var targetPosition := spriteBasePosition var targetPosition := spriteBasePosition
if sprite.frame == BRIDGE_FRAME or sprite.frame == BRIDGE_VERTICAL_FRAME: if sprite.frame in BRIDGE_FRAMES:
# The sprite's offset lifts it off the surface we're on. Undo that so the # The sprite's offset lifts it off the surface we're on. Undo that so the
# column sits centred on us, between the surfaces. # column sits centred on us, between the surfaces.
targetPosition -= sprite.offset.rotated(sprite.rotation).round() targetPosition -= sprite.offset.rotated(sprite.rotation).round()
@ -636,21 +667,39 @@ func _begin_bridge(normal: Vector2, ownPoint: Vector2, otherPoint: Vector2) -> v
# We're still holding away from the surface we left, towards the one across. # We're still holding away from the surface we left, towards the one across.
# Keep holding and we cross over to it after HOLD_TIME, like any other hold. # Keep holding and we cross over to it after HOLD_TIME, like any other hold.
bridgeHoldSide = signf(normal.dot(bridgeAxis)) bridgeHoldSide = signf(normal.dot(bridgeAxis))
bridgeSettleTimeLeft = BRIDGE_SETTLE_TIME
_update_bridge_lean()
velocity = Vector2.ZERO velocity = Vector2.ZERO
# Halfway between the surfaces, staying put the other way. # Halfway between the surfaces, staying put the other way.
var middle := (ownPoint + otherPoint) / 2.0 var middle := (ownPoint + otherPoint) / 2.0
global_position += bridgeAxis * (middle - global_position).dot(bridgeAxis) global_position += bridgeAxis * (middle - global_position).dot(bridgeAxis)
# Always drawn the same way round, whichever surface we came from, unflipped. _show_bridge_pose()
# Between walls, turned as for the left wall, which puts the frame's flat
# side on top. Between floor and ceiling, upright.
# Shows the bridge frame for bridgeAxis and bridgeLean, turned to suit.
# Always drawn the same way round, whichever surface we came from, unflipped.
func _show_bridge_pose() -> void:
sprite.flip_h = false sprite.flip_h = false
if bridgeAxis == Vector2.RIGHT: if bridgeAxis == Vector2.RIGHT:
# Turned as for the left wall, which puts the frame's flat side on top
# and its top on the right.
_set_sprite_rotation(_rotation_for(Vector2.RIGHT)) _set_sprite_rotation(_rotation_for(Vector2.RIGHT))
_show_pose(&"Bridge", BRIDGE_FRAME) if bridgeLean < 0:
_show_pose(&"BridgeLeanLeft", BRIDGE_LEAN_LEFT_MID_FRAME)
elif bridgeLean > 0:
_show_pose(&"BridgeLeanRight", BRIDGE_LEAN_RIGHT_MID_FRAME)
else:
_show_pose(&"Bridge", BRIDGE_FRAME)
else: else:
# Upright.
_set_sprite_rotation(0.0) _set_sprite_rotation(0.0)
_show_pose(&"BridgeVertical", BRIDGE_VERTICAL_FRAME) if bridgeLean < 0:
_show_pose(&"BridgeVerticalUp", BRIDGE_VERTICAL_UP_MID_FRAME)
elif bridgeLean > 0:
_show_pose(&"BridgeVerticalDown", BRIDGE_VERTICAL_DOWN_MID_FRAME)
else:
_show_pose(&"BridgeVertical", BRIDGE_VERTICAL_FRAME)
# Holding towards either surface for HOLD_TIME sticks us to it and lets go of # Holding towards either surface for HOLD_TIME sticks us to it and lets go of
@ -669,6 +718,11 @@ func _update_bridge(delta: float, moveInput: Vector2) -> void:
else: else:
timeSpentLeavingBridge = 0.0 timeSpentLeavingBridge = 0.0
bridgeHoldSide = side bridgeHoldSide = side
bridgeSettleTimeLeft = maxf(bridgeSettleTimeLeft - delta, 0.0)
var previousLean := bridgeLean
_update_bridge_lean()
if bridgeLean != previousLean:
_show_bridge_pose() # The frame and its turn change together.
# Between walls only down drops us (bridgeAxis.orthogonal() is up there). # Between walls only down drops us (bridgeAxis.orthogonal() is up there).
var holdingToDrop := along == 0.0 and across != 0.0 var holdingToDrop := along == 0.0 and across != 0.0
@ -685,6 +739,13 @@ func _update_bridge(delta: float, moveInput: Vector2) -> void:
_drop_from_bridge() _drop_from_bridge()
# Leans the column towards the surface we're holding towards. The hold side is
# along bridgeAxis: -1 left, 1 right between walls; -1 up, 1 down between floor
# and ceiling. Straight for a moment after attaching (BRIDGE_SETTLE_TIME).
func _update_bridge_lean() -> void:
bridgeLean = 0 if bridgeSettleTimeLeft > 0.0 else int(bridgeHoldSide)
# Lets go of both surfaces and falls from where we are. # Lets go of both surfaces and falls from where we are.
func _drop_from_bridge() -> void: func _drop_from_bridge() -> void:
isBridging = false isBridging = false
@ -809,7 +870,7 @@ func _find_edge_corner(normal: Vector2, direction: Vector2, reach: float) -> Var
return corner return corner
# Stops us with our leading sensor at an edge, until we've held towards it for HOLD_TIME. # Stops us with our leading sensor at an edge, until we've held towards it for EDGE_HOLD_TIME.
func _hold_at_edge(delta: float) -> void: func _hold_at_edge(delta: float) -> void:
var normal := _get_surface_normal() var normal := _get_surface_normal()
var tangent := normal.orthogonal() var tangent := normal.orthogonal()
@ -828,7 +889,7 @@ func _hold_at_edge(delta: float) -> void:
timeSpentHoldingEdge = 0.0 timeSpentHoldingEdge = 0.0
return return
if timeSpentHoldingEdge >= HOLD_TIME: if timeSpentHoldingEdge >= EDGE_HOLD_TIME:
return return
timeSpentHoldingEdge += delta timeSpentHoldingEdge += delta

View file

@ -29,6 +29,38 @@ tracks/0/keys = {
"values": [10] "values": [10]
} }
[sub_resource type="Animation" id="Animation_BridgeLeanRight"]
resource_name = "BridgeLeanRight"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [18, 11]
}
[sub_resource type="Animation" id="Animation_BridgeLeanLeft"]
resource_name = "BridgeLeanLeft"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [19, 12]
}
[sub_resource type="Animation" id="Animation_BridgeVertical"] [sub_resource type="Animation" id="Animation_BridgeVertical"]
resource_name = "BridgeVertical" resource_name = "BridgeVertical"
length = 0.2 length = 0.2
@ -43,7 +75,39 @@ tracks/0/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 1, "update": 1,
"values": [11] "values": [13]
}
[sub_resource type="Animation" id="Animation_BridgeVerticalDown"]
resource_name = "BridgeVerticalDown"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [14, 15]
}
[sub_resource type="Animation" id="Animation_BridgeVerticalUp"]
resource_name = "BridgeVerticalUp"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [16, 17]
} }
[sub_resource type="Animation" id="Animation_Crouch"] [sub_resource type="Animation" id="Animation_Crouch"]
@ -181,7 +245,11 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_slime"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_slime"]
_data = { _data = {
&"Bridge": SubResource("Animation_Bridge"), &"Bridge": SubResource("Animation_Bridge"),
&"BridgeLeanLeft": SubResource("Animation_BridgeLeanLeft"),
&"BridgeLeanRight": SubResource("Animation_BridgeLeanRight"),
&"BridgeVertical": SubResource("Animation_BridgeVertical"), &"BridgeVertical": SubResource("Animation_BridgeVertical"),
&"BridgeVerticalDown": SubResource("Animation_BridgeVerticalDown"),
&"BridgeVerticalUp": SubResource("Animation_BridgeVerticalUp"),
&"Crouch": SubResource("Animation_Crouch"), &"Crouch": SubResource("Animation_Crouch"),
&"Idle": SubResource("Animation_Idle"), &"Idle": SubResource("Animation_Idle"),
&"InAir": SubResource("Animation_InAir"), &"InAir": SubResource("Animation_InAir"),
@ -195,9 +263,21 @@ _data = {
[sub_resource type="AnimationNodeAnimation" id="AnimNode_Bridge"] [sub_resource type="AnimationNodeAnimation" id="AnimNode_Bridge"]
animation = &"Bridge" animation = &"Bridge"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeLeanLeft"]
animation = &"BridgeLeanLeft"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeLeanRight"]
animation = &"BridgeLeanRight"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeVertical"] [sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeVertical"]
animation = &"BridgeVertical" animation = &"BridgeVertical"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeVerticalDown"]
animation = &"BridgeVerticalDown"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeVerticalUp"]
animation = &"BridgeVerticalUp"
[sub_resource type="AnimationNodeAnimation" id="AnimNode_Crouch"] [sub_resource type="AnimationNodeAnimation" id="AnimNode_Crouch"]
animation = &"Crouch" animation = &"Crouch"
@ -394,15 +474,87 @@ advance_expression = "isPressingIntoSurface and not isCrawling and not isHolding
advance_mode = 2 advance_mode = 2
advance_expression = "not isBridging" advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_Bridge_BridgeLeanLeft"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean < 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_Bridge_BridgeLeanRight"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean > 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanLeft_Bridge"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean == 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanLeft_BridgeLeanRight"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean > 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanLeft_Idle"]
advance_mode = 2
advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanRight_Bridge"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean == 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanRight_BridgeLeanLeft"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean < 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeLeanRight_Idle"]
advance_mode = 2
advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVertical_Idle"] [sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVertical_Idle"]
advance_mode = 2 advance_mode = 2
advance_expression = "not isBridging" advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVertical_BridgeVerticalUp"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean < 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVertical_BridgeVerticalDown"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean > 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalUp_BridgeVertical"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean == 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalUp_BridgeVerticalDown"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean > 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalUp_Idle"]
advance_mode = 2
advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalDown_BridgeVertical"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean == 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalDown_BridgeVerticalUp"]
advance_mode = 2
advance_expression = "isBridging and bridgeLean < 0"
[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVerticalDown_Idle"]
advance_mode = 2
advance_expression = "not isBridging"
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_slime"] [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_slime"]
states/BridgeVertical/node = SubResource("AnimNode_BridgeVertical") states/BridgeVertical/node = SubResource("AnimNode_BridgeVertical")
states/BridgeVertical/position = Vector2(1150, 300) states/BridgeVertical/position = Vector2(1150, 300)
states/BridgeVerticalDown/node = SubResource("AnimNode_BridgeVerticalDown")
states/BridgeVerticalDown/position = Vector2(1400, 400)
states/BridgeVerticalUp/node = SubResource("AnimNode_BridgeVerticalUp")
states/BridgeVerticalUp/position = Vector2(1400, 200)
states/Bridge/node = SubResource("AnimNode_Bridge") states/Bridge/node = SubResource("AnimNode_Bridge")
states/Bridge/position = Vector2(900, 300) states/Bridge/position = Vector2(900, 300)
states/BridgeLeanRight/node = SubResource("AnimNode_BridgeLeanRight")
states/BridgeLeanRight/position = Vector2(1000, 500)
states/BridgeLeanLeft/node = SubResource("AnimNode_BridgeLeanLeft")
states/BridgeLeanLeft/position = Vector2(800, 500)
states/Crouch/node = SubResource("AnimNode_Crouch") states/Crouch/node = SubResource("AnimNode_Crouch")
states/Crouch/position = Vector2(150, 300) states/Crouch/position = Vector2(150, 300)
states/Idle/node = SubResource("AnimNode_Idle") states/Idle/node = SubResource("AnimNode_Idle")
@ -418,7 +570,7 @@ states/ReachX/position = Vector2(650, 300)
states/ReachY/node = SubResource("AnimNode_ReachY") states/ReachY/node = SubResource("AnimNode_ReachY")
states/ReachY/position = Vector2(400, 300) states/ReachY/position = Vector2(400, 300)
states/Start/position = Vector2(150, 100) states/Start/position = Vector2(150, 100)
transitions = ["Start", "Idle", SubResource("Transition_Start"), "Idle", "Moving", SubResource("Transition_Idle_Moving"), "Idle", "InAir", SubResource("Transition_Idle_InAir"), "Idle", "ReachX", SubResource("Transition_Idle_ReachX"), "Idle", "ReachY", SubResource("Transition_Idle_ReachY"), "Idle", "Crouch", SubResource("Transition_Idle_Crouch"), "Moving", "Idle", SubResource("Transition_Moving_Idle"), "Moving", "InAir", SubResource("Transition_Moving_InAir"), "Moving", "ReachX", SubResource("Transition_Moving_ReachX"), "Moving", "ReachY", SubResource("Transition_Moving_ReachY"), "Moving", "Crouch", SubResource("Transition_Moving_Crouch"), "InAir", "Idle", SubResource("Transition_InAir_Idle"), "InAir", "Moving", SubResource("Transition_InAir_Moving"), "InAir", "ReachX", SubResource("Transition_InAir_ReachX"), "InAir", "ReachY", SubResource("Transition_InAir_ReachY"), "InAir", "Crouch", SubResource("Transition_InAir_Crouch"), "ReachX", "Idle", SubResource("Transition_ReachX_Idle"), "ReachX", "Moving", SubResource("Transition_ReachX_Moving"), "ReachX", "InAir", SubResource("Transition_ReachX_InAir"), "ReachX", "ReachY", SubResource("Transition_ReachX_ReachY"), "ReachX", "Crouch", SubResource("Transition_ReachX_Crouch"), "ReachY", "Idle", SubResource("Transition_ReachY_Idle"), "ReachY", "Moving", SubResource("Transition_ReachY_Moving"), "ReachY", "InAir", SubResource("Transition_ReachY_InAir"), "ReachY", "ReachX", SubResource("Transition_ReachY_ReachX"), "ReachY", "Crouch", SubResource("Transition_ReachY_Crouch"), "Crouch", "Idle", SubResource("Transition_Crouch_Idle"), "Crouch", "Moving", SubResource("Transition_Crouch_Moving"), "Crouch", "InAir", SubResource("Transition_Crouch_InAir"), "Crouch", "ReachX", SubResource("Transition_Crouch_ReachX"), "Crouch", "ReachY", SubResource("Transition_Crouch_ReachY"), "Idle", "PressWall", SubResource("Transition_Idle_PressWall"), "Moving", "PressWall", SubResource("Transition_Moving_PressWall"), "InAir", "PressWall", SubResource("Transition_InAir_PressWall"), "ReachX", "PressWall", SubResource("Transition_ReachX_PressWall"), "ReachY", "PressWall", SubResource("Transition_ReachY_PressWall"), "Crouch", "PressWall", SubResource("Transition_Crouch_PressWall"), "PressWall", "Idle", SubResource("Transition_PressWall_Idle"), "PressWall", "Moving", SubResource("Transition_PressWall_Moving"), "PressWall", "InAir", SubResource("Transition_PressWall_InAir"), "PressWall", "ReachX", SubResource("Transition_PressWall_ReachX"), "PressWall", "ReachY", SubResource("Transition_PressWall_ReachY"), "PressWall", "Crouch", SubResource("Transition_PressWall_Crouch"), "Bridge", "Idle", SubResource("Transition_Bridge_Idle"), "BridgeVertical", "Idle", SubResource("Transition_BridgeVertical_Idle")] transitions = ["Start", "Idle", SubResource("Transition_Start"), "Idle", "Moving", SubResource("Transition_Idle_Moving"), "Idle", "InAir", SubResource("Transition_Idle_InAir"), "Idle", "ReachX", SubResource("Transition_Idle_ReachX"), "Idle", "ReachY", SubResource("Transition_Idle_ReachY"), "Idle", "Crouch", SubResource("Transition_Idle_Crouch"), "Moving", "Idle", SubResource("Transition_Moving_Idle"), "Moving", "InAir", SubResource("Transition_Moving_InAir"), "Moving", "ReachX", SubResource("Transition_Moving_ReachX"), "Moving", "ReachY", SubResource("Transition_Moving_ReachY"), "Moving", "Crouch", SubResource("Transition_Moving_Crouch"), "InAir", "Idle", SubResource("Transition_InAir_Idle"), "InAir", "Moving", SubResource("Transition_InAir_Moving"), "InAir", "ReachX", SubResource("Transition_InAir_ReachX"), "InAir", "ReachY", SubResource("Transition_InAir_ReachY"), "InAir", "Crouch", SubResource("Transition_InAir_Crouch"), "ReachX", "Idle", SubResource("Transition_ReachX_Idle"), "ReachX", "Moving", SubResource("Transition_ReachX_Moving"), "ReachX", "InAir", SubResource("Transition_ReachX_InAir"), "ReachX", "ReachY", SubResource("Transition_ReachX_ReachY"), "ReachX", "Crouch", SubResource("Transition_ReachX_Crouch"), "ReachY", "Idle", SubResource("Transition_ReachY_Idle"), "ReachY", "Moving", SubResource("Transition_ReachY_Moving"), "ReachY", "InAir", SubResource("Transition_ReachY_InAir"), "ReachY", "ReachX", SubResource("Transition_ReachY_ReachX"), "ReachY", "Crouch", SubResource("Transition_ReachY_Crouch"), "Crouch", "Idle", SubResource("Transition_Crouch_Idle"), "Crouch", "Moving", SubResource("Transition_Crouch_Moving"), "Crouch", "InAir", SubResource("Transition_Crouch_InAir"), "Crouch", "ReachX", SubResource("Transition_Crouch_ReachX"), "Crouch", "ReachY", SubResource("Transition_Crouch_ReachY"), "Idle", "PressWall", SubResource("Transition_Idle_PressWall"), "Moving", "PressWall", SubResource("Transition_Moving_PressWall"), "InAir", "PressWall", SubResource("Transition_InAir_PressWall"), "ReachX", "PressWall", SubResource("Transition_ReachX_PressWall"), "ReachY", "PressWall", SubResource("Transition_ReachY_PressWall"), "Crouch", "PressWall", SubResource("Transition_Crouch_PressWall"), "PressWall", "Idle", SubResource("Transition_PressWall_Idle"), "PressWall", "Moving", SubResource("Transition_PressWall_Moving"), "PressWall", "InAir", SubResource("Transition_PressWall_InAir"), "PressWall", "ReachX", SubResource("Transition_PressWall_ReachX"), "PressWall", "ReachY", SubResource("Transition_PressWall_ReachY"), "PressWall", "Crouch", SubResource("Transition_PressWall_Crouch"), "Bridge", "Idle", SubResource("Transition_Bridge_Idle"), "Bridge", "BridgeLeanLeft", SubResource("Transition_Bridge_BridgeLeanLeft"), "Bridge", "BridgeLeanRight", SubResource("Transition_Bridge_BridgeLeanRight"), "BridgeLeanLeft", "Bridge", SubResource("Transition_BridgeLeanLeft_Bridge"), "BridgeLeanLeft", "BridgeLeanRight", SubResource("Transition_BridgeLeanLeft_BridgeLeanRight"), "BridgeLeanLeft", "Idle", SubResource("Transition_BridgeLeanLeft_Idle"), "BridgeLeanRight", "Bridge", SubResource("Transition_BridgeLeanRight_Bridge"), "BridgeLeanRight", "BridgeLeanLeft", SubResource("Transition_BridgeLeanRight_BridgeLeanLeft"), "BridgeLeanRight", "Idle", SubResource("Transition_BridgeLeanRight_Idle"), "BridgeVertical", "Idle", SubResource("Transition_BridgeVertical_Idle"), "BridgeVertical", "BridgeVerticalUp", SubResource("Transition_BridgeVertical_BridgeVerticalUp"), "BridgeVertical", "BridgeVerticalDown", SubResource("Transition_BridgeVertical_BridgeVerticalDown"), "BridgeVerticalUp", "BridgeVertical", SubResource("Transition_BridgeVerticalUp_BridgeVertical"), "BridgeVerticalUp", "BridgeVerticalDown", SubResource("Transition_BridgeVerticalUp_BridgeVerticalDown"), "BridgeVerticalUp", "Idle", SubResource("Transition_BridgeVerticalUp_Idle"), "BridgeVerticalDown", "BridgeVertical", SubResource("Transition_BridgeVerticalDown_BridgeVertical"), "BridgeVerticalDown", "BridgeVerticalUp", SubResource("Transition_BridgeVerticalDown_BridgeVerticalUp"), "BridgeVerticalDown", "Idle", SubResource("Transition_BridgeVerticalDown_Idle")]
graph_offset = Vector2(0, -150) graph_offset = Vector2(0, -150)
[node name="Player" type="CharacterBody2D" unique_id=150873177] [node name="Player" type="CharacterBody2D" unique_id=150873177]
@ -428,7 +580,8 @@ landSounds = Array[AudioStream]([ExtResource("3_land1"), ExtResource("4_land2"),
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=402647784] [node name="Sprite2D" type="Sprite2D" parent="." unique_id=402647784]
texture = ExtResource("5_4m0gv") texture = ExtResource("5_4m0gv")
offset = Vector2(0, -6) offset = Vector2(0, -6)
hframes = 12 hframes = 5
vframes = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1379572123] [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1379572123]
shape = SubResource("CircleShape2D_eovys") shape = SubResource("CircleShape2D_eovys")

View file

@ -2,7 +2,7 @@ extends Camera2D
class_name RoomCamera class_name RoomCamera
# Splits the level into screen-sized rooms and snaps to whichever room the # Splits the level into screen-sized rooms and snaps to whichever room the
# target is in, VVVVVV style: the camera never scrolls, it just cuts to the # target is in: the camera never scrolls, it just cuts to the
# next screen when the target crosses a room border. # next screen when the target crosses a room border.
# #
# Room (0, 0) has its top-left corner at the level's origin, room (1, 0) is the # Room (0, 0) has its top-left corner at the level's origin, room (1, 0) is the