![]() |
Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
|
Public Member Functions | |
| DirectComposite (RenderSurfaceHostBase renderSurfaceHost, DirectDrawingMode mode, PointF anchor=default, string? nickname=null) | |
| DirectComposite | Add (DirectDrawingMovableBase child, bool keepCurrentOffset=true, Vector2? explicitLocalOffsetPx=null) |
| Adds a child and stores its local pixel offset from the composite anchor. If keepCurrentOffset is true (default), the offset is computed from the child's current Bounds. Otherwise, pass an explicit local pixel offset. | |
| DirectComposite | Remove (DirectDrawingMovableBase child) |
| DirectComposite | Clear () |
| DirectComposite | SetLocalOffset (DirectDrawingMovableBase child, Vector2 newLocalOffsetPx) |
| Change a specific child's local pixel offset and re-apply its absolute position. | |
| DirectComposite | SetPosition (float x, float y) |
| Set the composite anchor in pixels and reposition all children from their stored local offsets. | |
| Vector2 | GetPosition () |
| Get the current position in the mover's PositionSpace. | |
| void | SetPosition (Vector2 pos) |
| Set the position in the mover's PositionSpace. | |
| RectangleF | GetDrawLocationScreen (View view) |
| Computes the object's destination rectangle in SCREEN pixels for rendering on the Backbuffer, using the provided View to project from world-space. | |
| void | Draw (BackbufferBase backbuffer, RectangleF destRectScreen) |
| Draws the object to the Backbuffer using the provided SCREEN-space destination rectangle. The rectangle is assumed to already be projected into screen-space; no world-to-screen conversion should occur within this method. | |
| void | Update (long tick) |
| Updates the state of the object based on the specified tick value. | |
| DirectComposite | SetZOrder (int z) |
| DirectComposite | SetOpacity (float opacity) |
| DirectComposite | FadeTo (float targetOpacity, float durationSec) |
| DirectComposite | FadeIn (float durationSec) |
| DirectComposite | FadeOut (float durationSec) |
| DirectComposite | SetIsVisible (bool visible) |
| void | Dispose () |
Properties | |
| RenderSurfaceHostBase | RenderSurfaceHost [get] |
| The rendering surface to which this drawable belongs. | |
| ReadOnlyCollection< DirectDrawingMovableBase > | Children [get] |
| MovementController | Movement [get] |
| MovementSpace | PositionSpace [get] |
| Which unit system this mover uses for its position. | |
| Guid | Id = Guid.NewGuid() [get] |
| Auto-assigned unique identifier for the object. | |
| string? | Nickname [get] |
| Optional human-readable name associated with the object. | |
| bool | Visible [get, set] |
| Returns true if any child is visible; setting this sets all children's Visible to the same value. | |
| int | ZOrder [get] |
| Gets the z-order of the element, which determines its visual stacking order relative to other elements. Higher z-order values are drawn on top of lower ones. | |
| Rectangle | ScreenBounds [get] |
| The bounding rectangle of this drawable in SCREEN space. | |
| Rectangle | WorldBounds [get] |
| The bounding rectangle of this drawable in WORLD space. | |
| DirectDrawingMode | Mode [get] |
| Gets the drawing mode that determines where and how this drawable is rendered. | |
Events | |
| EventHandler< IDirectDrawable >? | Disposing |
| Events inherited from Gondwana.Drawing.Direct.IDirectDrawable | |
| EventHandler< IDirectDrawable >? | Disposing |
| Occurs when the object is being disposed. | |
| Gondwana.Drawing.Direct.DirectComposite.DirectComposite | ( | RenderSurfaceHostBase | renderSurfaceHost, |
| DirectDrawingMode | mode, | ||
| PointF | anchor = default, | ||
| string? | nickname = null ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.Add | ( | DirectDrawingMovableBase | child, |
| bool | keepCurrentOffset = true, | ||
| Vector2? | explicitLocalOffsetPx = null ) |
Adds a child and stores its local pixel offset from the composite anchor. If keepCurrentOffset is true (default), the offset is computed from the child's current Bounds. Otherwise, pass an explicit local pixel offset.
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.Clear | ( | ) |
| void Gondwana.Drawing.Direct.DirectComposite.Dispose | ( | ) |
| void Gondwana.Drawing.Direct.DirectComposite.Draw | ( | BackbufferBase | backbuffer, |
| RectangleF | destRectScreen ) |
Draws the object to the Backbuffer using the provided SCREEN-space destination rectangle. The rectangle is assumed to already be projected into screen-space; no world-to-screen conversion should occur within this method.
| backbuffer | The Backbuffer to draw onto. |
| destRectScreen | The destination rectangle in absolute SCREEN pixel coordinates on the Backbuffer. |
Implements Gondwana.Drawing.IDrawable.
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.FadeIn | ( | float | durationSec | ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.FadeOut | ( | float | durationSec | ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.FadeTo | ( | float | targetOpacity, |
| float | durationSec ) |
| RectangleF Gondwana.Drawing.Direct.DirectComposite.GetDrawLocationScreen | ( | View | view | ) |
Computes the object's destination rectangle in SCREEN pixels for rendering on the Backbuffer, using the provided View to project from world-space.
| view | The View providing camera, zoom, parallax, and viewport offsets used to convert the object's world-space bounds into screen-space. |
Implements Gondwana.Drawing.IDrawable.
| Vector2 Gondwana.Drawing.Direct.DirectComposite.GetPosition | ( | ) |
Get the current position in the mover's PositionSpace.
Implements Gondwana.Movement.IMovable.
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.Remove | ( | DirectDrawingMovableBase | child | ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.SetIsVisible | ( | bool | visible | ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.SetLocalOffset | ( | DirectDrawingMovableBase | child, |
| Vector2 | newLocalOffsetPx ) |
Change a specific child's local pixel offset and re-apply its absolute position.
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.SetOpacity | ( | float | opacity | ) |
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.SetPosition | ( | float | x, |
| float | y ) |
Set the composite anchor in pixels and reposition all children from their stored local offsets.
| void Gondwana.Drawing.Direct.DirectComposite.SetPosition | ( | Vector2 | pos | ) |
Set the position in the mover's PositionSpace.
Implements Gondwana.Movement.IMovable.
| DirectComposite Gondwana.Drawing.Direct.DirectComposite.SetZOrder | ( | int | z | ) |
| void Gondwana.Drawing.Direct.DirectComposite.Update | ( | long | tick | ) |
Updates the state of the object based on the specified tick value.
| tick | The current tick value from Engine.Cycle(). |
Implements Gondwana.Drawing.Direct.IDirectDrawable.
|
get |
|
get |
Auto-assigned unique identifier for the object.
Implements Gondwana.Drawing.IDrawable.
|
get |
Gets the drawing mode that determines where and how this drawable is rendered.
The drawing mode defines the coordinate space and rendering lifecycle:
Implements Gondwana.Drawing.Direct.IDirectDrawable.
|
get |
|
get |
Optional human-readable name associated with the object.
Implements Gondwana.Drawing.IDrawable.
|
get |
Which unit system this mover uses for its position.
Implements Gondwana.Movement.IMovable.
|
get |
The rendering surface to which this drawable belongs.
Implements Gondwana.Drawing.Direct.IDirectDrawable.
|
get |
The bounding rectangle of this drawable in SCREEN space.
Implements Gondwana.Drawing.Direct.IDirectDrawable.
|
getset |
Returns true if any child is visible; setting this sets all children's Visible to the same value.
Implements Gondwana.Drawing.IDrawable.
|
get |
The bounding rectangle of this drawable in WORLD space.
Implements Gondwana.Drawing.Direct.IDirectDrawable.
|
get |
Gets the z-order of the element, which determines its visual stacking order relative to other elements. Higher z-order values are drawn on top of lower ones.
Implements Gondwana.Drawing.IDrawable.
| EventHandler<IDirectDrawable>? Gondwana.Drawing.Direct.DirectComposite.Disposing |