mini_arcade_core¶
Entry point for the mini_arcade_core package. Provides access to core classes and a convenience function to run a game.
get_version method needs to be removed
Submodules¶
Classes¶
Core game object responsible for managing the main loop and active scene. |
|
Configuration options for the Game. |
Functions¶
|
Convenience helper to bootstrap and run a game with a single scene. |
Package Contents¶
- class mini_arcade_core.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
- class mini_arcade_core.GameConfig¶
Configuration options for the Game.
- Variables:
(str) (initial_scene) – Identifier of the initial scene to load.
(int) (fps) – Target frames per second.
None) (backend (Backend |) – Optional Backend instance to use for rendering and input.
int]) (virtual_resolution (tuple[int,) – Virtual render resolution.
(PostFXConfig) (postfx) – Configuration for post-processing effects.
- initial_scene: str = 'main'¶
- fps: int = 60¶
- backend: mini_arcade_core.backend.Backend | None = None¶
- virtual_resolution: tuple[int, int] = (800, 600)¶
- postfx: PostFXConfig¶
- enable_profiler: bool = False¶
- mini_arcade_core.run_game(game_config: engine.game_config.GameConfig | None = None, scene_registry: scenes.registry.SceneRegistry | None = None)¶
Convenience helper to bootstrap and run a game with a single scene.
- Parameters:
game_config (GameConfig | None) – Optional GameConfig to customize game settings.
scene_registry (SceneRegistry | None) – Optional SceneRegistry for scene management.
- Raises:
ValueError – If the provided game_config does not have a valid Backend.