WIP: Store which threads have been collected - #2693
Conversation
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_
|
How to test:
|
|
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.) |
|
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:
In this branch, the behaviour of a previously-collected thread depends on whether the thread has a "next scene" configured:
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...) |
|
One reference of optional collectible: the 10-flower coins in Mario Wonder. These are big purple flower-shaped collectibles. There are 3 per level. Once you collect them, they dissapear. The next time you play the same level, they appear stippled. If you re-collect them stippled, they dissapear again. |
|
Noting here the convo from the meeting: removing requirement 4 by having the teleporter interactable threads be "legacy" and new threads going forward just be collectables (with existing levels reworked to accommodate changes) Also noting, have collected threads on replaying level be replaced with bonus buttons to "mark" their collection and also give a slight bonus to players who backtrack to them. |
|
We discussed this in the build review. In summary:
Actually I think we could do the refactoring mechanically:
There are some edge cases to deal with here though:
|


Stacked on:
Helps #2280