![]() |
Gondwana Game Engine Version 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Provides the shared Gondwana lifecycle integration for Blazor bitmap and WebGL game hosts. More...
Public Member Functions | |
| void | OnAnimationFrame () |
| Advances the timer-driven bitmap path from Gondwana's browser animation loop. | |
| Public Member Functions inherited from Gondwana.Hosting.GameHostBase | |
| void | Initialize (string? configPath=null, bool? autoSaveConfig=null, LogLevel logLevel=LogLevel.Warning) |
| Initializes the game host by configuring logging, platform services, input, game content, and the Gondwana engine. | |
| void | InitializeWithConfigurationStore (IEngineConfigurationStore configurationStore, bool? autoSaveConfig=null, LogLevel logLevel=LogLevel.Warning) |
| Initializes the game host using a caller-supplied configuration persistence store. | |
| void | Dispose () |
| Releases resources owned by the game host. | |
Protected Member Functions | |||
| BlazorGameHostBase (IJSRuntime jsRuntime) | |||
| Initializes a new instance of BlazorGameHostBase. | |||
| void | BindSceneCore (Scene scene) | ||
| Binds a scene to the concrete typed render-surface host. | |||
| override void | ConfigurePlatform () | ||
| override void | ConfigureKeyboard () | ||
| Configures the keyboard input adapter. | |||
| override void | ConfigureMouse () | ||
| Configures the mouse input adapter. | |||
| override void | ConfigureGamepads () | ||
| Configures the gamepad manager. | |||
| override void | ConfigureTouch () | ||
| Configures the touch input adapter. | |||
| override void | BindScene () | ||
| Binds the current scene to the platform render surface. | |||
| override? SynchronizationContext | GetSynchronizationContext () | ||
Gets the synchronization context used to start the engine.
| |||
| override void | StartEngineCore (SynchronizationContext syncContext) | ||
Starts the engine using the supplied synchronization context.
| |||
| override void | StopEngineCore () | ||
| Performs platform-specific engine shutdown work. | |||
| override void | OnInputConfigured () | ||
| Runs after all input devices have been configured.Platform hosts may override this hook to call InitializeWidgetInput(RenderSurfaceHostBase) once their render surface host is available. | |||
| override void | OnDisposed () | ||
| Runs after managed resources have been disposed. | |||
| virtual void | OnConfigurePlatform () | ||
| Provides a hook for configuring additional Blazor platform settings. | |||
| virtual void | OnKeyboardAdapterInitialized () | ||
| Called after the Blazor keyboard adapter is initialized. | |||
| virtual void | OnMouseAdapterInitialized () | ||
| Called after the Blazor mouse adapter is initialized. | |||
| virtual void | OnConfigureGamepads () | ||
| Provides a hook for configuring browser gamepad support. | |||
| virtual void | OnTouchAdapterInitialized () | ||
| Called after the Blazor touch adapter is initialized. | |||
| virtual void | OnBlazorDisposed () | ||
| Runs after Blazor interop resources have been released. | |||
| Protected Member Functions inherited from Gondwana.Hosting.GameHostBase | |||
| void | InitializeWidgetInput (RenderSurfaceHostBase renderSurfaceHost) | ||
| Initializes widget input routing for the supplied render surface host. | |||
| virtual void | OnInitializing () | ||
| Runs before the host initialization sequence begins. | |||
| void | ConfigureLogging (LogLevel logLevel) | ||
| Configures the logging level used by Gondwana. | |||
| void | ConfigurePlatform () | ||
| Configures platform-specific services, adapters, and render infrastructure. | |||
| void | ConfigureInput () | ||
| Configures keyboard, mouse, gamepad, and touch input. | |||
| void | InitializeGameContent () | ||
| Initializes game-specific content, the scene graph, and scene objects. | |||
| void | LoadContent () | ||
| Loads assets, tilesheets, and animation cycles. | |||
| virtual void | LoadAssets () | ||
| Loads textures, sounds, and other game assets. | |||
| virtual void | LoadTilesheets () | ||
| Loads tilesheet definitions. | |||
| virtual void | LoadAnimationCycles () | ||
| Loads animation cycle definitions. | |||
| void | CreateSceneGraph () | ||
| Creates the initial scene and its views. | |||
| virtual void | OnSceneGraphCreated () | ||
| Runs after the scene graph has been created but before the scene is bound. | |||
| virtual Scene | CreateInitialScene () | ||
| Creates the initial scene for the game. | |||
| virtual void | CreateInitialViews () | ||
| Creates the initial views and viewports used to render the scene. | |||
| virtual void | OnSceneBound () | ||
| Runs after the current scene has been bound to the render surface host. | |||
| void | InitializeSceneObjects () | ||
| Creates sprites and direct drawings for the current scene. | |||
| virtual void | CreateSprites () | ||
| Creates sprite objects for the current scene. | |||
| virtual void | CreateDirectDrawings () | ||
| Creates direct drawings and widgets for the current scene. | |||
| void | InitializeEngine (string? configPath, bool? autoSaveConfig) | ||
| Initializes the Gondwana engine using the default file-backed configuration store. | |||
| void | InitializeEngine (string? configPath, bool? autoSaveConfig, IEngineConfigurationStore? configurationStore) | ||
| Initializes the Gondwana engine. | |||
| virtual void | OnEngineInitialized () | ||
| Runs after the engine has been initialized but before it has been started. | |||
| void | StartEngine () | ||
| Starts the engine using the synchronization context returned by GetSynchronizationContext. | |||
| virtual void | OnEngineStarted () | ||
| Runs after the engine has been started. | |||
| virtual void | OnInitialized () | ||
| Runs after the full host initialization sequence has completed. | |||
| virtual void | UnhookEvents () | ||
| Unhooks custom event handlers during disposal. | |||
| void | StopEngine () | ||
| Stops the engine during host disposal. | |||
| void | DisposeEngine () | ||
| Disposes the engine instance. | |||
| virtual void | OnDisposing () | ||
| Runs before managed resources are disposed. | |||
| void | EnsureNotInitialized () | ||
| Ensures that the host has not already been initialized. | |||
| void | EnsureNotDisposed () | ||
| Ensures that the host has not been disposed. | |||
Properties | |
| BlazorRenderSurfaceComponentBase | RenderSurfaceComponent [get] |
| Gets the concrete Blazor component that supplies DOM input events. | |
| RenderSurfaceHostBase | RenderSurfaceHost [get] |
| Gets the render-surface host used for scene binding and widget input. | |
| virtual bool | RenderSurfaceDrivesBrowserFrames [get] |
| Gets a value indicating whether the render surface itself supplies the browser animation callback that drives the timer-driven engine. | |
| Properties inherited from Gondwana.Hosting.GameHostBase | |
| Engine | Engine [get] |
| Gets the singleton instance of the Gondwana engine. | |
| Scene? | Scene [get, protected set] |
| Gets the current active scene. | |
| WidgetInputRouter? | WidgetInputRouter [get] |
| Gets the widget input router, if widget input has been initialized. | |
Provides the shared Gondwana lifecycle integration for Blazor bitmap and WebGL game hosts.
Browser/WASM targets use timer-driven engine execution. Bitmap hosts are driven by Gondwana's JavaScript requestAnimationFrame loop, while WebGL hosts are driven directly by the SKGLView animation loop so engine advancement and GPU presentation share one browser animation-frame callback. Non-browser targets retain the standard background engine loop supplied by GameHostBase.
Definition at line 20 of file BlazorGameHostBase.cs.
|
protected |
Initializes a new instance of BlazorGameHostBase.
| jsRuntime | The JavaScript runtime used for browser interop. |
| ArgumentNullException | Thrown when jsRuntime is null. |
Definition at line 31 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Binds the current scene to the platform render surface.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 95 of file BlazorGameHostBase.cs.
|
abstractprotected |
Binds a scene to the concrete typed render-surface host.
| scene | The scene to bind. |
|
sealedprotectedvirtual |
Configures the gamepad manager.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 82 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Configures the keyboard input adapter.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 68 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Configures the mouse input adapter.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 75 of file BlazorGameHostBase.cs.
|
sealedprotected |
Definition at line 59 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Configures the touch input adapter.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 88 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Gets the synchronization context used to start the engine.
null when unavailable.Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 105 of file BlazorGameHostBase.cs.
| void Gondwana.Blazor.Hosting.BlazorGameHostBase.OnAnimationFrame | ( | ) |
Advances the timer-driven bitmap path from Gondwana's browser animation loop.
Definition at line 151 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Runs after Blazor interop resources have been released.
Definition at line 214 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Provides a hook for configuring browser gamepad support.
Definition at line 204 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Provides a hook for configuring additional Blazor platform settings.
Definition at line 189 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Runs after managed resources have been disposed.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 174 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Runs after all input devices have been configured.Platform hosts may override this hook to call InitializeWidgetInput(RenderSurfaceHostBase) once their render surface host is available.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 167 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Called after the Blazor keyboard adapter is initialized.
Definition at line 194 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Called after the Blazor mouse adapter is initialized.
Definition at line 199 of file BlazorGameHostBase.cs.
|
protectedvirtual |
Called after the Blazor touch adapter is initialized.
Definition at line 209 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Starts the engine using the supplied synchronization context.
| syncContext | The synchronization context used by the engine. |
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 122 of file BlazorGameHostBase.cs.
|
sealedprotectedvirtual |
Performs platform-specific engine shutdown work.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 158 of file BlazorGameHostBase.cs.
|
getabstractprotected |
Gets the concrete Blazor component that supplies DOM input events.
Definition at line 37 of file BlazorGameHostBase.cs.
|
getprotected |
Gets a value indicating whether the render surface itself supplies the browser animation callback that drives the timer-driven engine.
The bitmap path returns false and uses Gondwana's JavaScript animation loop. The WebGL path returns true because SKGLView owns the browser requestAnimationFrame loop and calls Gondwana.Engine.Tick from its paint callback.
Definition at line 52 of file BlazorGameHostBase.cs.
|
getabstractprotected |
Gets the render-surface host used for scene binding and widget input.
Definition at line 40 of file BlazorGameHostBase.cs.