Sly 2:Game state: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
TheOnlyZac (talk | contribs) |
TheOnlyZac (talk | contribs) (Wording and layout) |
||
Line 1: | Line 1: | ||
The '''DAG''' ('''D'''irected '''A'''cyclic '''G'''raph) is a data structure used |
The '''DAG''' ('''D'''irected '''A'''cyclic '''G'''raph) is a data structure used to manage the current state of the game world. It was the subject of a 2005 GDC presentation by Bruce Oberg, the Principal Engineer at Sucker Punch.<ref>[https://www.gdcvault.com/play/1020295/The-Picture-Worth-a-Thousand The Picture Worth a Thousand Bugs] - YouTube, 3 April 2021 (archived from a 2005 GDC conference)</ref> |
||
== Tasks == |
== Tasks == |
||
The DAG is a directed graph of nodes, where each node is called a |
The DAG is a directed graph of nodes, where each node is called a ''task''. For instance, <tt>t1_follow_dmitri_on_streets</tt> is the task of tailing Dimitri in the "Follow Dimitri" job (the prefix <tt>t1</tt> indicates that it is a task in Episode 1, and <tt>follow</tt> is the codename for the "Follow Dimitri" job). |
||
=== Task States === |
=== Task States === |
||
Line 15: | Line 15: | ||
=== State Forcing === |
=== State Forcing === |
||
At all times, every task ''before'' an Available task must be Complete or Final. Additionally, every task ''after'' an Available task must be unavailable. It is possible to |
At all times, every task ''before'' an Available task must be Complete or Final. Additionally, every task ''after'' an Available task must be unavailable. It is possible to ''force'' a task to a particular state, which propagates throughout the DAG to ensure those conditions are always met. |
||
== Missions == |
== Missions == |
||
Tasks in the DAG can be grouped into ''missions''. A mission usually refers to a particular job in the game's story. For instance, < |
Tasks in the DAG can be grouped into ''missions''. A mission usually refers to a particular job in the game's story. For instance, <tt>m1_follow</tt>{{check}} is the job "Follow Dmitri" (the prefix <tt>m1</tt> indicates that it is a mission in Episode 1, and <tt>follow</tt> is the codename for the mission). |
||
If a task belongs to a mission and the |
If a task belongs to a mission and the ''exit task'' in that mission is Completed, then all the tasks in that job become Final. |
||
== Checkpoints == |
== Checkpoints == |
||
A task is considered a ''checkpoint task'' if it has some checkpoint data associated with it, including a particular character and location in the game world. When a checkpoint task becomes Available, that checkpoint is set as the ''latest'' checkpoint. |
A task is considered a ''checkpoint task'' if it has some checkpoint data associated with it, including a particular character and location in the game world. When a checkpoint task becomes Available, that checkpoint is set as the ''latest'' checkpoint. |
||
When a rollback occurs, the game uses the latest checkpoint to set the current character and their location. |
|||
== Rollbacks == |
== Rollbacks == |
||
A rollback is when the game rewinds the DAG to an earlier state (such as when the player dies). This is accomplished by: |
A rollback is when the game rewinds the DAG to an earlier state (such as when the player dies). This is accomplished by: |
||
* Resetting the world |
* Resetting the world |
||
* Placing the player at the latest checkpoint |
* Placing the player at the latest checkpoint |
||
* Forcing the checkpoint task to Available (which may result in the states of other tasks being updated) |
* Forcing the checkpoint task to Available (which may result in the states of other tasks being updated) |
||
== See also == |
|||
* [[Sly 1:GS]] - For the game state tracking system in {{Sly 1}}. |
|||
== References == |
== References == |
||
Line 39: | Line 39: | ||
{{Navbox Sly 2}} |
{{Navbox Sly 2}} |
||
{{Navbox Sly 3}} |