Difference between revisions of "Modules/game/state"

From MSX Game Library

< Modules‎ | game

m (Aoineko moved page Modules/game/main to Modules/game/state without leaving a redirect)
 
Line 1: Line 1:
 
{{MODULE
 
{{MODULE
|name=game/main
+
|name=game/state
 
|category=Gameplay
 
|category=Gameplay
 
|image=raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/sample_game.png
 
|image=raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/sample_game.png

Latest revision as of 13:40, 30 September 2025

game/state

Code: game/state.h

Category: Gameplay

Dependencies:

Samples:

The game module handle program architecture, from program initialization, to update synchronization on the screen display, and features a task management system.

Usage

To use this module, include "game/state.h" in your source code, and add "game/state" to the modules list (LibModules) in your project's configuration file (project_config.js).


Samples

See module use cases in the sample programs:

Settings

Library configuration (msxgl_config.h):

// Game state setting
#define GAME_USE_STATE				TRUE	// Add state machine features
#define GAME_USE_VSYNC				TRUE	// Add vertical synchronization features
#define GAME_USE_LOOP				TRUE	// Add game main loop with call to v-synch and state
#define GAME_USE_SYNC_50HZ			TRUE	// Force 50Hz synchronization on 60Hz machine

Dependencies

Dependency on other modules:

Documentation