Skip to content

Create grapple gym for dev archipelago - #2639

Merged
manuq merged 7 commits into
mainfrom
dev-archipelago-grapple-gym
Aug 3, 2026
Merged

Create grapple gym for dev archipelago#2639
manuq merged 7 commits into
mainfrom
dev-archipelago-grapple-gym

Conversation

@felixwalberg

Copy link
Copy Markdown
Contributor

Design two scenes, grapple_gym_1.tscn and grapple_gym_2.tscn to show off features of the grapple mechanic.

The highlights are:

Gym 1:

  • Simple grappling of pins
  • Traversing gaps/areas with collisions
  • Chaining needles to reach further
  • HookableObjects must be positioned at angles of multiples of 45 degrees
  • Some grappling is asymmetric
  • String asset can be changed

Gym 2:

  • Range of default grapple in the up, down, and left/right directions
  • Grappling from a hookable_needle.tscn has a longer range than default grapple
  • Chaining needles using the all_hooked.gd script can be used to trigger events in the game
  • Range of "longer thread" ability

Gym 2 uses a regular Camera2D and adjusts zoom because the PhantomCamera2D was inconsistent in having the player centered. Since I was working max distances, the targets often were out of frame. I avoided chaining together enough needles that the target would be out of frame as well.

Gym 2 also has text labels to notate distance. Is there an accessibility standard in terms of font size?

Gym 2 is accessible from the end of Gym 1. I think it makes sense to be able to use both, but I thought Gym 2 should also exist as its own quest.tres so that a user in Dev Archipelago can go directly to experimenting with range rather than having to play through additional scenes.

In designing the visual examples of the reach, it made me wish there was an easier way to see the "reachable" area of a hookable_pin.tscn. Since hookable_needle.tscn has its own HookControl node, there is a visual indicator (at least in the positive x direction) of how much further you can reach from it. If it would be possible to have an inverse indicator (something like a marker 200px away from the edge of the HookableArea in each direction (and maybe one for the longer thread as well), then that might help with designing grapple levels with the pins in reach. For finding how far away I had placed the pins, I was printing the global_position of the Player to see how far out I would need to go.

I would love to get some feedback on whether these scenes do enough to get across supportive structure (either through signs or other visual clues) while also still encouraging users to be creative/diverge from the basics.

Resolves #2536, #1788

@felixwalberg felixwalberg added this to the Dev Archipelago MVP milestone Jul 31, 2026
@felixwalberg
felixwalberg requested a review from a team as a code owner July 31, 2026 19:08
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Test build no longer available.

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

The position of this pin is so clever, I tried hard but wasn't able to hook it with keyboard:

Image

One recommendation I would add is to debug collision shapes when doing level design:

Grabacion.de.pantalla.desde.2026-08-02.22-11-58.mp4

Is better to see the ray and the rectangle areas than explaining. In fact what I usually do for level design is, I change the pins/needles positions while the game is running:

Grabacion.de.pantalla.desde.2026-08-02.22-26-07.mp4

# SPDX-License-Identifier: MPL-2.0
extends Node2D

var _player: CharacterBody2D

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not needed, as all happens inside the body_entered signal callback.

Comment on lines +9 to +10
if body.is_in_group("player"):
_player = body

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not needed. The interest is in knowing if the body has a node %PlayerHook that is of class PlayerHook. In the future, we probably need a more solid way of obtaining a character features/capabilities.

Comment on lines +7 to +9
@onready var bridges_unlocked: TileMapLayer = $TileMapLayers/BridgesUnlocked
@onready var water_unlocked: TileMapLayer = $TileMapLayers/WaterUnlocked
@onready var camera_2d: Camera2D = $OnTheGround/Player/Camera2D

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixwalberg

Copy link
Copy Markdown
Contributor Author

Is better to see the ray and the rectangle areas than explaining. In fact what I usually do for level design is, I change the pins/needles positions while the game is running:

I didn't even think about this! I had been toggling between playing in debug and editing the game but never at the same time. I forgot that you can actively see changes you make in the current game instance.

Comment on lines +7 to +8
if body.get_node("%PlayerHook"):
var hook: PlayerHook = body.get_node("%PlayerHook")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if conditional now checks only for the node path, but you dropped the class check. I think is better to do:

Suggested change
if body.get_node("%PlayerHook"):
var hook: PlayerHook = body.get_node("%PlayerHook")
var hook := body.get_node("%PlayerHook") as PlayerHook
if hook:

This way:

  • body.get_node("%PlayerHook") will return null if not found.
  • X as PlayerHook (being X the result of the above) will return null if X is not a PlayerHook
  • if hook: will be false in the 2 cases above because null is falsy (evaluates to false).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This makes sense.

@manuq
manuq merged commit 2338331 into main Aug 3, 2026
6 checks passed
@manuq
manuq deleted the dev-archipelago-grapple-gym branch August 3, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Dev Archipelago: Grappling Level Design

2 participants