885
edits
(Created page with "{{AGIWiki}} The '''AGI Studio Template Game''' is a one-room game that serves as a starting point for game authors to build their own games. It features a defau...") |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
The '''AGI Studio Template Game''' is a one-[[AGIWiki/Room|room]] game that serves as a starting point for game authors to build their own games. It features a default [[AGIWiki/View|view]] for [[AGIWiki/Ego|ego]], a blank [[AGIWiki/Picture|picture resource]] that is used by the first [[AGIWiki/Room|room]] in the game, and a default [[AGIWiki/Inventory object|inventory object]]. | The '''AGI Studio Template Game''' is a one-[[AGIWiki/Room|room]] game that serves as a starting point for game authors to build their own games. It features a default [[AGIWiki/View|view]] for [[AGIWiki/Ego|ego]], a blank [[AGIWiki/Picture|picture resource]] that is used by the first [[AGIWiki/Room|room]] in the game, and a default [[AGIWiki/Inventory object|inventory object]]. | ||
Perhaps most importantly, the template game provides a significant amount of code that implements basic functionality such as setting up the game's menus, saving and restoring, and a set of [[AGIWiki/Debugging|debugging] commands. Without the template game, game programmers would have to implement these features themselves. | Perhaps most importantly, the template game provides a significant amount of code that implements basic functionality such as setting up the game's menus, saving and restoring, and a set of [[AGIWiki/Debugging|debugging]] commands. Without the template game, game programmers would have to implement these features themselves. | ||
The template game also provides a file called [/ | The template game also provides a file called [[AGIWiki/defines.txt|defines.txt]] that sets up [[AGIWiki/Defines|defines]] for the [[AGIWiki/Special variables|special variables]], [[AGIWiki/Special flags|special flags]], and other data that are of special meaning to the [[AGIWiki/Interpreter|interpreter]] or that are used by the template game itself. The game's author should use this file to avoid the need to redefine all those items. | ||
[[File:AGIWiki_AGI Studio Template Game.png|right|thumb|320px]] | |||
== Updates to the template game == | == Updates to the template game == | ||
Line 26: | Line 27: | ||
You know if your version of the template game contains the bug if the following code appears in LOGIC.000: | You know if your version of the template game contains the bug if the following code appears in LOGIC.000: | ||
<syntax type="C++"> | |||
if (new_room) { // First interpreter cycle in a new room | if (new_room) { // First interpreter cycle in a new room | ||
// Note: Everything other than logic 0 is discarded | // Note: Everything other than logic 0 is discarded | ||
Line 39: | Line 40: | ||
// on this cycle (if turned on) | // on this cycle (if turned on) | ||
} | } | ||
</syntax> | |||
If this code ''does'' appear in your version of the template game, then you should change it to: | If this code ''does'' appear in your version of the template game, then you should change it to: | ||
<syntax type="C++"> | |||
if (new_room) { // First interpreter cycle in a new room | if (new_room) { // First interpreter cycle in a new room | ||
// Note: Everything other than logic 0 is discarded | // Note: Everything other than logic 0 is discarded | ||
Line 59: | Line 60: | ||
// on this cycle (if turned on) | // on this cycle (if turned on) | ||
} | } | ||
</syntax> | |||
This bug has since been corrected in the template game that is available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the version containing the bug. | This bug has since been corrected in the template game that is available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the version containing the bug. | ||
Line 67: | Line 68: | ||
The biggest trouble with this bug is that once you type "tp" and press Enter there is no way to cancel the teleport. Pressing Enter with a blank entry is the same as entering 0. Fortunately, there is a simple fix. In LOGIC.099, find the code that reads: | The biggest trouble with this bug is that once you type "tp" and press Enter there is no way to cancel the teleport. Pressing Enter with a blank entry is the same as entering 0. Fortunately, there is a simple fix. In LOGIC.099, find the code that reads: | ||
<syntax type="C++"> | |||
if (said("tp")) { | if (said("tp")) { | ||
get.num("new room: ", v255); | get.num("new room: ", v255); | ||
new.room.v(v255); | new.room.v(v255); | ||
} | } | ||
</syntax> | |||
Then change it to: | Then change it to: | ||
<syntax type="C++"> | |||
if (said("tp")) { | if (said("tp")) { | ||
get.num("new room: ", v255); | get.num("new room: ", v255); | ||
Line 85: | Line 86: | ||
} | } | ||
} | } | ||
</syntax> | |||
Alternately, you can eliminate the "Can't tp to room 0" message and change the inner [[AGIWiki/If statement|if statement]] to read: | Alternately, you can eliminate the "Can't tp to room 0" message and change the inner [[AGIWiki/If statement|if statement]] to read: | ||
<syntax type="C++"> | |||
if ( | if (v255 != 0) { | ||
new.room.v(v255); | new.room.v(v255); | ||
} | } | ||
</syntax> | |||
This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game. | This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game. | ||
Line 101: | Line 102: | ||
This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game. | This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game. | ||
== Related == | |||
* [[AGIWiki/AGI Studio|AGI Studio]] |
edits