http://wiki.spheredev.org/index.php?title=Game.sgm&feed=atom&action=historyGame.sgm - Revision history2024-03-29T01:39:58ZRevision history for this page on the wikiMediaWiki 1.29.0http://wiki.spheredev.org/index.php?title=Game.sgm&diff=747&oldid=prevApollolux: created2013-06-08T02:34:12Z<p>created</p>
<p><b>New page</b></p><div>{{lowercase title}}<br />
<br />
[[game.sgm]] is a configuration file placed in the root directory of a Sphere project. This file is required for the Sphere engine to load and run a project, as well as allow the various Sphere editors to process a given directory as one containing a Sphere project.<br />
<br />
==Format==<br />
The file's format is similar to that of an [[Wikipedia:INI_file|INI file]], with each line containing a <code>key=value</code> statement. The following keys are initialized automatically upon creation of a new project in the default Sphere editor:<br />
<br />
; name<br />
: The name of the project<br />
; author<br />
: The author or authors of the project<br />
; script<br />
: The first script file to load when searching for the [[game (function)|game function]] to run<br />
; description<br />
: A short description of the project<br />
; screen_width<br />
; screen_height<br />
: The width and height to set the window to when running the project in the engine; these dimensions are base window dimensions and do not take video driver configuration into account<br />
<br />
==Game object==<br />
The <var>name</var>, <var>author</var>, and <var>description</var> keys are stored in a [[API:Game|Game object]] which is retrievable using the [[API:GetGameList|GetGameList]] function. The object also contains a property, <var>directory</var>, which contains the name of the project's root directory. This directory can be passed to the [[API:ExecuteGame|ExecuteGame]] function to load into the engine a project from within an already running project.</div>Apollolux