Difference between revisions of "Room"
(Created page with "A '''room''' in an AGI game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know that ego has ...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | A '''room''' in an [[AGI|AGI]] game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know that [[Ego|ego]] has gone to a new room when the background [[Picture|picture]] changes. | + | A '''room''' in an [[AGI|AGI]] game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know that [[AGI Ego|ego]] has gone to a new room when the background [[AGI Picture Resource|picture]] changes. |
− | In a technically accurate sense, to be "in a room" means that the current value of <code>v0</code> is the number of the room that you are in. Normally, the [[ | + | In a technically accurate sense, to be "in a room" means that the current value of <code>v0</code> is the number of the room that you are in. Normally, the [[AGI Logic Resource|logic resource]] with the same number as the current room number will be called on each [[AGI Interpreter cycle|interpreter cycle]] (this does not happen automatically, however; the [[AGI Studio Template Game|AGI Studio Template Game]] has already included the appropriate code to do this in [[AGI Logic 0|logic 0]]). This gives each room its own behavior. When the game switches to a new room, the [[AGI Flag|flag]] <code>f5</code> is set to indicate that this is the first interpreter cycle in the new room. |
There is a limit of 255 rooms in an AGI game. Logic 0 is special, so a room number of 0 is not valid, but logics 1-255 are available. It should be noted, however, that the AGI Studio Template Game uses logics 90-99 for additional game functions and logic 1 for the game's introduction. | There is a limit of 255 rooms in an AGI game. Logic 0 is special, so a room number of 0 is not valid, but logics 1-255 are available. It should be noted, however, that the AGI Studio Template Game uses logics 90-99 for additional game functions and logic 1 for the game's introduction. |
Latest revision as of 13:42, 24 March 2019
A room in an AGI game is, roughly, a division between areas in the game. A room might also be called a "screen." In a loose sense, you know that ego has gone to a new room when the background picture changes.
In a technically accurate sense, to be "in a room" means that the current value of v0
is the number of the room that you are in. Normally, the logic resource with the same number as the current room number will be called on each interpreter cycle (this does not happen automatically, however; the AGI Studio Template Game has already included the appropriate code to do this in logic 0). This gives each room its own behavior. When the game switches to a new room, the flag f5
is set to indicate that this is the first interpreter cycle in the new room.
There is a limit of 255 rooms in an AGI game. Logic 0 is special, so a room number of 0 is not valid, but logics 1-255 are available. It should be noted, however, that the AGI Studio Template Game uses logics 90-99 for additional game functions and logic 1 for the game's introduction.
See also