game.sgm

From Spherical
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

Format

The file's format is similar to that of an INI file, with each line containing a key=value statement. The following keys are initialized automatically upon creation of a new project in the default Sphere editor:

name
The name of the project
author
The author or authors of the project
script
The first script file to load when searching for the game function to run
description
A short description of the project
screen_width
screen_height
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

Game object

The name, author, and description keys are stored in a Game object which is retrievable using the GetGameList function. The object also contains a property, directory, which contains the name of the project's root directory. This directory can be passed to the ExecuteGame function to load into the engine a project from within an already running project.