Quest model: a chain of objectives GameState can answer for itself #131
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sub-ticket of #129.
The data behind the quests, with no UI in it.
GameStateowns it, so it survives the space <-> planet-surface scene swap the way everything else does, andreset_new_game()puts it back to the first quest.Done in
397983b.core/Quests.gdholds the chain as data and nothing else;GameStateholds how far along it the player is and answers each goal.Eight goal kinds, each one line in
quest_progress(): a resource total, a building standing, a vessel flying, a vessel unlocked, sectors charted, planets landed on, kinds of world landed on, and planets conquered. Every one is answered from state the autoload already holds - a goal that needed a scene node to ask would be a goal that stops working the moment the player lands on a planet.Latching came out free rather than needing a mechanism. The chain is walked one quest at a time, so the moment a goal is met the index moves on and never comes back: collecting five ore and then spending it cannot un-complete the quest that asked for five, because by the time it is spent nothing is asking. That is what lets goals be phrased against current holdings instead of against a running total that would have to be kept in step by hand.
Two constraints the model enforces rather than hopes for:
reset_new_game()- the same gateintro_activeuses, and the only door into a real game. Instantiating a scene is not by itself a reason to start briefing somebody, which matters for the 110 tests that loadMain.tscnto look at something else.Landing is now recorded (
note_planet_visited, written at the same moment the descent commits), because "flown past" and "set down on" are different questions andexplored_chunksonly answers the first.