![]() |
Gondwana Game Engine Development (master) - 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 shared Windows Forms host behavior for Gondwana game hosts. More...
Protected Member Functions | |
| WinFormsGameHostBase (Control renderSurface, Action< Scene, bool > bindScene) | |
| Initializes a new instance of the WinFormsGameHostBase class. | |
| override void | ConfigurePlatform () |
| Configures Windows Forms-specific platform features, including audio format support. | |
| override void | ConfigureKeyboard () |
| Configures the keyboard adapter for the Windows Forms render surface. | |
| override void | ConfigureMouse () |
| Configures the mouse adapter for the Windows Forms render surface. | |
| override void | ConfigureGamepads () |
| Configures gamepad support. By default, this method initializes the XInput gamepad manager, but it can be overridden in derived classes to provide custom gamepad configuration. | |
| override void | ConfigureTouch () |
| Configures touch input. By default, this method does not perform any actions, but it can be overridden in derived classes to set up touch input handling. | |
| override void | BindScene () |
| Binds the current scene to the render surface host. | |
| override void | OnSceneBound () |
| Called after the current scene has been bound to the Windows Forms render surface host. | |
| virtual void | OnConfigurePlatform () |
| Provides a hook for configuring platform-specific settings during initialization. | |
| virtual void | OnKeyboardAdapterInitialized () |
| Called after the keyboard adapter has been initialized. Override to perform additional keyboard setup. | |
| virtual void | OnMouseAdapterInitialized () |
| Called after the mouse adapter has been initialized. Override to perform additional mouse setup. | |
| virtual void | OnGamepadManagerInitialized () |
| Called after the gamepad manager has been initialized. Override to perform additional gamepad setup. | |
| virtual void | OnTouchAdapterInitialized () |
| Called after the touch adapter has been initialized. Override to perform additional touch setup, such as attaching gesture recognizers. | |
| 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. | |
| virtual void | OnInputConfigured () |
| Runs after all input devices have been configured. | |
| 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. | |
| 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 | StartEngineCore (SynchronizationContext syncContext) |
| Starts the engine using the supplied synchronization context. | |
| virtual ? SynchronizationContext | GetSynchronizationContext () |
| Gets the synchronization context used to start the engine. | |
| 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. | |
| virtual void | StopEngineCore () |
| Performs platform-specific engine shutdown work. | |
| void | DisposeEngine () |
| Disposes the engine instance. | |
| virtual void | OnDisposing () |
| Runs before managed resources are disposed. | |
| virtual void | OnDisposed () |
| Runs after managed resources have been disposed. | |
| void | EnsureNotInitialized () |
| Ensures that the host has not already been initialized. | |
| void | EnsureNotDisposed () |
| Ensures that the host has not been disposed. | |
Additional Inherited Members | |
| 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. | |
| 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 shared Windows Forms host behavior for Gondwana game hosts.
Definition at line 10 of file WinFormsGameHostBase.cs.
|
protected |
Initializes a new instance of the WinFormsGameHostBase class.
| renderSurface | The control used for input handling. |
| bindScene | The scene-binding callback for the render surface host. |
| ArgumentNullException | Thrown when renderSurface or bindScene is null. |
Definition at line 21 of file WinFormsGameHostBase.cs.
|
sealedprotectedvirtual |
Binds the current scene to the render surface host.
| InvalidOperationException | Thrown when no scene has been created. |
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 77 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Configures gamepad support. By default, this method initializes the XInput gamepad manager, but it can be overridden in derived classes to provide custom gamepad configuration.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 58 of file WinFormsGameHostBase.cs.
|
sealedprotectedvirtual |
Configures the keyboard adapter for the Windows Forms render surface.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 39 of file WinFormsGameHostBase.cs.
|
sealedprotectedvirtual |
Configures the mouse adapter for the Windows Forms render surface.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 48 of file WinFormsGameHostBase.cs.
|
sealedprotected |
Configures Windows Forms-specific platform features, including audio format support.
Definition at line 30 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Configures touch input. By default, this method does not perform any actions, but it can be overridden in derived classes to set up touch input handling.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 68 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Provides a hook for configuring platform-specific settings during initialization.
Definition at line 96 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Called after the gamepad manager has been initialized. Override to perform additional gamepad setup.
Definition at line 111 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Called after the keyboard adapter has been initialized. Override to perform additional keyboard setup.
Definition at line 101 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Called after the mouse adapter has been initialized. Override to perform additional mouse setup.
Definition at line 106 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Called after the current scene has been bound to the Windows Forms render surface host.
Reimplemented from Gondwana.Hosting.GameHostBase.
Definition at line 88 of file WinFormsGameHostBase.cs.
|
protectedvirtual |
Called after the touch adapter has been initialized. Override to perform additional touch setup, such as attaching gesture recognizers.
Definition at line 117 of file WinFormsGameHostBase.cs.