Skip to content

WIP: Store which threads have been collected - #2693

Draft
wjt wants to merge 7 commits into
mainfrom
wjt/store-collected-threads
Draft

WIP: Store which threads have been collected#2693
wjt wants to merge 7 commits into
mainfrom
wjt/store-collected-threads

Conversation

@wjt

@wjt wjt commented Aug 11, 2026

Copy link
Copy Markdown
Member

wjt added 7 commits August 11, 2026 11:50
Previously we defined InventoryItem resources inline in every scene that
uses them; and we hardcoded the world texture, HUD texture, and colour
for each in the script.

Turn these into properties of the resource. Create 3 on-disk resources
for the memory, imagination, and spirit threads. Add migration code to
collectible_item.gd, and a script to load and save all scenes that reference
collectible_item.tscn. Leave the migration code in-place so that as
out-of-tree quests are merged we can easily update them.

Change the inventory storage to refer to those, rather than saving just
the item type name and reconstructing resources on load.

I think this will make it easier to add collectibles which are not
threads in future, and also to remember which threads have been
collected when loading or replaying a quest, though I haven't attempted
to do that here.
They are not really walls, but they are certainly not "players", the default collision_
@wjt

wjt commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

How to test:

  1. New game.
  2. Skip tutorial.
  3. Go to Dev Archipelago
  4. Talk to the first elder. i've patched him to show the level design quests
  5. Chose the "Optional Threads" quest
  6. On your first playthrough, collect only the green thread on the right. Don't try to avoid the guards.
  7. Go back to Fray's End. Deposit the threads at the Loom. Watch the animation.
  8. Quit to title then continue (works around a bug in this branch)
  9. Go to Dev Archipelago again, and play the quest again. You should see that the green thread has a dither effect on it.
  10. This time, avoid the guards and collect the red thread. Then deliberately allow the guards to catch you.
  11. When you respawn, the red thread should still be gone.
  12. Go back past the guards and collect the (dithered) green thread.
  13. Take the 1 new thread you have collected to the loom.
  14. Repeat step 8
  15. Repeat step 9. You should see that the red thread is missing, and the green thread is stippled.

@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/store-collected-threads/.

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

@wjt

wjt commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

This is a work in progress. I am more interested in review of the gameplay than of the code. The incompatible requirements I am trying to square are:

  1. We want quests to be replayable
  2. We want to be able to have optional threads in quests
  3. You shouldn't be able to collect the same thread more than once (because you'll be able to spend your threads on powerups and otherwise you could just grind an easy quest and unlock the whole tech tree)...
  4. ...but collectible threads are how we link scenes together.

In this branch, the behaviour of a previously-collected thread depends on whether the thread has a "next scene" configured:

  • If it does, then it is shown in-world, but stippled, and collecting it again does not readd it to the inventory
  • If it does not, then it is deleted immediately

The intuition is that optional threads should not link to another scene, while mandatory threads always do. (However I can already imagine cases where we might want to teleport the player after an optional thread...)

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.

1 participant