Skip to content

Add powerup for abilities#2073

Merged
manuq merged 12 commits intomainfrom
powerups
Mar 27, 2026
Merged

Add powerup for abilities#2073
manuq merged 12 commits intomainfrom
powerups

Conversation

@manuq
Copy link
Copy Markdown
Collaborator

@manuq manuq commented Mar 20, 2026

InteractArea: Emit signal when characters start/stop seeing it

Maintain an array of CharacterSight areas and emit the signal when
the array changes.

Add powerup for abilities

The powerup scene gives one ability when picked upon interaction.

It displays a dialogue telling the player about the new ability.
The default dialogue just says "new ability: ABILITY NAME".

It has a collected signal that can be used to display input hints
for the corresponding ability. Or doing other side effects, like
zooming out the camera when the longer thread powerup is picked.

It has a ripple effect that can be colored, so we can have
color codes for the abilities. The asset is a SpriteFrames that
is proxied so it can be customized.

Use powerup in lore and template quests

  • Add Repel powerup to ink_combat_round_1 and NO_EDIT_combat. And display the input hints when collected.
  • Add Grapple powerup to grappling_hook_start. And display the input hints when collected, instead of from cinematic dialogue.
  • Replace longer thread powerup in grappling_hook_powerup with this new component.

Projectile: Export hit speed

The speed after the projectile gets hit.

unify_abilities_test: Add powerups and improve test level

Add the 2 powerups needed. Make the level a bit easier by using a projectile scene with the hit speed set to a low value. Also:

  • Use lore assets: ink drinker character, ink blob, inkwell.
  • Remove unneeded HUD and sign post.
  • Use the new elevation_2 tileset and repaint it as terrain.
  • Paint Void tiles as terrain, so they have the embroidery.
  • Add more Void tiles around to constrain the player.
  • Make the island at the north a 3x2 tiles (was a 2x2 square) so the player has more space for aiming.

Resolve #2057

@github-actions
Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/powerups/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@wjt
Copy link
Copy Markdown
Member

wjt commented Mar 25, 2026

Currently res://scenes/game_elements/characters/player/components/unify_abilities_test.tscn can only be played if you already have the repel + grapple abilities, or enable them in the debug menu. It would be nice to place two powerups (one for each) into this scene! I tried to add a PlayerMode node to this scene as a short-term workaround but it's not enough because we need to enable both, not one or the other.

@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented Mar 25, 2026

Currently res://scenes/game_elements/characters/player/components/unify_abilities_test.tscn can only be played if you already have the repel + grapple abilities, or enable them in the debug menu. It would be nice to place two powerups (one for each) into this scene! I tried to add a PlayerMode node to this scene as a short-term workaround but it's not enough because we need to enable both, not one or the other.

Good point, I will do it as part of this.

Maintain an array of CharacterSight areas and emit the signal when
the array changes.
manuq added 4 commits March 25, 2026 18:39
The powerup scene gives one ability when picked upon interaction.

It displays a dialogue telling the player about the new ability.
The default dialogue just says "new ability: ABILITY NAME".

It has a collected signal that can be used to display input hints
for the corresponding ability. Or doing other side effects, like
zooming out the camera when the longer thread powerup is picked.

It has a ripple effect that can be colored, so we can have
color codes for the abilities. The asset is a SpriteFrames that
is proxied so it can be customized.
- Add Repel powerup to ink_combat_round_1 and NO_EDIT_combat. And display the input hints when collected.
- Add Grapple powerup to grappling_hook_start. And display the input hints when collected, instead of from cinematic dialogue.
- Replace longer thread powerup in grappling_hook_powerup with this new component.
The speed after the projectile gets hit.
Add the 2 powerups needed. Make the level a bit easier by using a projectile scene with the hit speed set to a low value. Also:
- Use lore assets: ink drinker character, ink blob, inkwell.
- Remove unneeded HUD and sign post.
- Use the new elevation_2 tileset and repaint it as terrain.
- Paint Void tiles as terrain, so they have the embroidery.
- Add more Void tiles around to constrain the player.
- Make the island at the north a 3x2 tiles (was a 2x2 square) so the player has more space for aiming.
@manuq manuq marked this pull request as ready for review March 25, 2026 21:56
@manuq manuq requested review from a team as code owners March 25, 2026 21:56
@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented Mar 25, 2026

Currently res://scenes/game_elements/characters/player/components/unify_abilities_test.tscn can only be played if you already have the repel + grapple abilities, or enable them in the debug menu. It would be nice to place two powerups (one for each) into this scene! I tried to add a PlayerMode node to this scene as a short-term workaround but it's not enough because we need to enable both, not one or the other.

Good point, I will do it as part of this.

This is how it looks now. @Zer0LoL what do you think? I changed the level a bit and slowed down the projectiles to make it a bit easier:

https://youtu.be/4ofVEtuDLEI

(YouTube unlisted video because direct upload didn't work)

Comment on lines +40 to +41
## The speed after the projectile gets hit.
@export_range(10., 100., 5., "or_greater", "or_less", "suffix:m/s") var hit_speed: float = 100.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍🏻

@@ -7,5 +7,4 @@ do animation_player.animation_finished
Moss the Monk: Oh, look! The Void is blooming fast here.
Moss the Monk: You’ll need a [b]grappling hook[/b] to get to LinenVille. Take mine.
do GameState.set_ability(Enums.PlayerAbilities.ABILITY_B, true)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you meant to remove this line so that the player-character has to pick it up?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or if not, the powerup should not be in the scene?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh I thought I did it, but it looks like I forgot to add the change to Git. Thanks!

_tween.kill()
_tween = create_tween()
var width: float = 0.8 if interact_area.is_being_observed else 0.4
_tween.tween_property(highlight_effect, "material:shader_parameter/width", width, 1.0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Because the material is not local to scene, observing any powerup causes every powerup to glow:

Screencast.From.2026-03-27.10-38-25.mp4

I'll push a fixup.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the fixup.

[node name="ScreenOverlay" type="CanvasLayer" parent="." unique_id=1976326993]
[node name="RepelPowerup" parent="OnTheGround" unique_id=1795462717 instance=ExtResource("17_w66m4")]
position = Vector2(-307, 1622)
highlight_color = Color(0, 0, 1, 1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This colour appears darker than the yellow one below (see in the video above). Not a blocker, just an observation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes I will make it a lighter blue. It is hard to pick colors for these because we also have the color code for the memory/imagination/spirit (yellow/green/red). Maybe when we have actual assets for the powerups it will be better.


func _on_abilities_changed() -> void:
var has_ability := GameState.has_ability(ability)
ground_collision.disabled = has_ability
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was hoping to see this. I have been sceptical of objects in the world that you can walk through (e.g. arguing that the collectible threads should have a collider) but in this case I think it makes sense for the powerup to become a ghost once you have collected it, because it lets us barricade a pathway with a mandatory powerup.

position = Vector2(-549, 805)
ability = 32
ability_name = "Longer Thread"
interact_action = "Collect Longer Thread"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I quite liked the way that you previously had to use the grappling hook to pick up the powerup! This is fine though.

How about res://scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling_round_2.tscn? It has another "make the thread longer" powerup.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It will be trivial to add a HookableArea to it, let me do it!

Also good catch, I totally forgot about the same powerup in the following level. In the current form it will appear as ghost, because the ability has been already granted. I will just do that rather than removing it. As discussed in private, in the future we may split this quest in 2, for collecting the longer thread modifier in a separate quest.

@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented Mar 27, 2026

@wjt ready for review again!

@manuq manuq marked this pull request as draft March 27, 2026 14:58
@manuq
Copy link
Copy Markdown
Collaborator Author

manuq commented Mar 27, 2026

Actually one more thing: I can improve the zoom-out when longer thread is collected using the GameState.abilities_changed signal. Otherwise if the ability is already taken (case of void_grappling_round_2) there is no zoom-out and the level is unplayable.

@manuq manuq marked this pull request as ready for review March 27, 2026 16:29
@manuq manuq merged commit cb417f8 into main Mar 27, 2026
6 checks passed
@manuq manuq deleted the powerups branch March 27, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add powerup collectible to gain abilities

2 participants