Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
agi-game:leisuresuitlarry:reference-timer [2021/05/02 18:22] – frater | agi-game:leisuresuitlarry:reference-timer [2022/06/09 20:37] (Version actuelle) – [In game Time] frater | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Timing and Timers ====== | + | ====== |
- | Larry is using a lot of timing | + | Larry utilise beaucoup de "timing" et de "timer", ils sont tous gérer à partir de la logic_0 |
- | Due to the " | + | <code c> |
+ | #define varTimeLastElapsedSeconds | ||
+ | #define varTimingDelay | ||
+ | #define varClearStatusSeconds | ||
+ | #define varTimerSpraySeconds | ||
+ | #define varTimerSprayMinutes | ||
+ | #define varTimerBreathSpraySeconds | ||
+ | #define varSecondsSinceKeystroke | ||
+ | #define varGameTimeSecond | ||
+ | #define varGameTimeMinute | ||
+ | #define varGameTimeHour | ||
+ | </ | ||
+ | |||
+ | A cause de l' | ||
+ | Pour éviter les Bugs, le programmeur a décider de déclencher ses actions quand le timer atteint | ||
===== In game Time ===== | ===== In game Time ===== | ||
- | The timing Handler increase seconds | + | Les Timing sont incrémentaux, et quand ils atteignent |
<code c> | <code c> | ||
- | #define varGameTimeHour | ||
- | #define varGameTimeMinute | ||
#define varGameTimeSecond | #define varGameTimeSecond | ||
+ | #define varGameTimeMinute | ||
+ | #define varGameTimeHour | ||
</ | </ | ||
- | The Time is also handled by variables v119 [H], v116 [M] and v115 [S] those variables are set to start the ingame clock at 10pm and has a special even if reach 4am (larry' | ||
- | To reach this bad ending the player should wait +6h in real time, some screens/logics doesn't affect change in-game time (title, BadEnding and Questionnaires) but the seconds counter is always incremented byte the timeloop. | + | L'//Heure// dans le jeu est gérer par 3 variables, et débutent à 10pm (10 00 00). |
+ | Il y a un test pour définir si l'heure est suppérieur à 4h du matin; dans ce cas, le jeu lance la cinématique de BAD ending | ||
- | According to the source code; it can be an issue if you're in that room (seconds could be over 60) but those 3 screens aren't really play screen. | + | Pour atteindre cet fin, le joueur doit laisser passer (en temps réel) plus de 6h de jeu; (il peut se déplacer dans la ville, mais les temps de chargement (non calculé) vont augmenter encore ce temps. |
+ | |||
+ | Il est intéressant de voir que ce //Temps// n'augmente pas pour certaines Room (title, BadEnding and Questionnaires). | ||
===== Timers ===== | ===== Timers ===== | ||
- | Leisure suit larry is using at least 4 differents | + | Leisure suit larry utilise |
==== varTimingDelay [v67] ==== | ==== varTimingDelay [v67] ==== | ||
- | This timer only raise (Set) the boolTimingDelayOut [f75] when reach 1 second left (not 0, to avoid loop to 255 (-1) value). | ||
- | The logic change the variable to what value they want to wait, and pool the boolTimingDelayOut | + | <code c> |
+ | #define varTimingDelay | ||
+ | </ | ||
- | The timing Handler decrease the value until it's reach 1. | + | Ce Timer est un timer générique, |
- | ==== v68 ==== | + | Quand le temps est écoulé (qu'il ne reste qu'une seconde), le Timer Set le flag // |
+ | Toutes les Room Logic peuvent changer ce timer, il est même conseiller de le spécifier dans la section //NewRoom// du script, et d' | ||
- | This timer clear part of the line #24 when reach 1 second left. | + | ==== varClearStatusSeconds [v68] ==== |
- | It's used to clear bottom line. | + | Quand ce Timer est écoulé, il efface une partie de la ligne #24 de l'écran. |
- | ==== v72 & v71 ==== | + | <code c> |
+ | if (varClearStatusSeconds | ||
+ | { | ||
+ | clear.text.rect(24, | ||
+ | } | ||
+ | </ | ||
- | The timing Handler decrease the v71 value until it's reach 0 (it can'nt be negative). | + | ==== varTimerSprayMinutes [v72] & varTimerSpraySeconds [v71] ==== |
- | If the v72 is > 0; the handler decrease v72, and reset v71 to 60. | + | Ce Timer est initialisé à 10 minutes (10:00). |
- | It's somehow related to alcool usage (0:04) and breath spray (10:00)... | + | Haa le //Breath Spray// tout un programme; quand ce timer est épuisé, il affiche un message pris dans la liste des messages de 157 à 160. |
- | when v71 == 1 and v72 == 0 (timer is over), then handler raise flag f107 and reset f66. | + | Si la valeur de // |
- | it display message 157 to 160, and preset the next message in the list, loop to 157 if message > 160. | + | |
- | ==== v80 ==== | + | Quand // |
- | The timing Handler decrease the value until it's reach 1. | + | |
- | It's started when Larry use his breath spray when boolDisabledRoomJump (f48) is set or in the currentRoom 0. | + | * Set le flag // |
+ | * Reset le flag // | ||
- | When this timer hit 1 second left, the player re-gain the larry' | + | <code c> |
+ | if (varTimerSprayMinutes > 0 && | ||
+ | varTimerSpraySeconds <= 0) | ||
+ | { | ||
+ | | ||
+ | varTimerSpraySeconds = 60; | ||
+ | } | ||
+ | |||
+ | |||
+ | if (varTimerSpraySeconds == 1 && | ||
+ | varTimerSprayMinutes <= 0) | ||
+ | { | ||
+ | reset(boolMouthOK); | ||
+ | set(boolMouthSmellBad); | ||
+ | print.v(varMouthMessage); | ||
+ | ++varMouthMessage; | ||
+ | if (varMouthMessage > 160) | ||
+ | { | ||
+ | varMouthMessage = 157; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
- | it's also reset f34 flag. | + | ==== varTimerBreathSpraySeconds [v80] ==== |
+ | |||
+ | Le gestionnaire décrémente ce timer jusqu'à 1. | ||
+ | |||
+ | Sa valeur est définie quand Larry utilise son spray; quand le flag // | ||
+ | |||
+ | Quand ce timer est expiré (valeur == 1), | ||
+ | * Le joueur récupère le controle de Larry. | ||
+ | * Le flag // | ||
+ | |||
+ | <code c> | ||
+ | if (varTimerBreathSpraySeconds == 1) | ||
+ | { | ||
+ | reset(boolDisabledRoomJump); | ||
+ | reset(boolKeepCycling); | ||
+ | set.view(ego, | ||
+ | start.motion(ego); | ||
+ | reset(boolDisablePlayer); | ||
+ | accept.input(); | ||
+ | print(" | ||
+ | } | ||
+ | </ |