mini_arcade_core.engine.game

Game core module defining the Game class and configuration.

Classes

Game

Core game object responsible for managing the main loop and active scene.

Module Contents

class mini_arcade_core.engine.game.Game(config: mini_arcade_core.engine.game_config.GameConfig, scene_registry: mini_arcade_core.scenes.registry.SceneRegistry | None = None)

Core game object responsible for managing the main loop and active scene.

config
backend: mini_arcade_core.backend.Backend
settings
managers
services
property running: bool

Check if the game is currently running.

quit()

Request that the main loop stops.

run()

Run the main loop starting with the given scene.

This is intentionally left abstract so you can plug pygame, pyglet, or another backend.

Parameters:

initial_scene_id (str) – The scene id to start the game with (must be registered).

resolve_world() object | None

Resolve and return the current gameplay world.

Returns:

The current gameplay world, or None if not found.

Return type:

object | None