Create grapple gym for dev archipelago - #2639
Conversation
|
Test build no longer available. |
manuq
left a comment
There was a problem hiding this comment.
This is great!
The position of this pin is so clever, I tried hard but wasn't able to hook it with keyboard:
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 |
There was a problem hiding this comment.
This variable is not needed, as all happens inside the body_entered signal callback.
| if body.is_in_group("player"): | ||
| _player = body |
There was a problem hiding this comment.
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.
| @onready var bridges_unlocked: TileMapLayer = $TileMapLayers/BridgesUnlocked | ||
| @onready var water_unlocked: TileMapLayer = $TileMapLayers/WaterUnlocked | ||
| @onready var camera_2d: Camera2D = $OnTheGround/Player/Camera2D |
There was a problem hiding this comment.
Please add unique names to these nodes and use them here. Check: https://github.com/endlessm/threadbare/wiki/Contributing#use-unique-names-to-reference-nodes-in-scripts
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. |
| if body.get_node("%PlayerHook"): | ||
| var hook: PlayerHook = body.get_node("%PlayerHook") |
There was a problem hiding this comment.
This if conditional now checks only for the node path, but you dropped the class check. I think is better to do:
| 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 returnnullif not found.X as PlayerHook(being X the result of the above) will returnnullif X is not a PlayerHookif hook:will be false in the 2 cases above becausenullis falsy (evaluates to false).
There was a problem hiding this comment.
Thank you! This makes sense.
Design two scenes,
grapple_gym_1.tscnandgrapple_gym_2.tscnto show off features of the grapple mechanic.The highlights are:
Gym 1:
Gym 2:
hookable_needle.tscnhas a longer range than default grappleall_hooked.gdscript can be used to trigger events in the gameGym 2 uses a regular
Camera2Dand adjusts zoom because thePhantomCamera2Dwas 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.tresso 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. Sincehookable_needle.tscnhas its ownHookControlnode, 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 theHookableAreain 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 theglobal_positionof thePlayerto 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