![]() |
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.
|
Represents the values stored at a single location on a SceneLayer. More...
Properties | |
| virtual new int | ZOrder [get] |
| Gets the z-order (rendering depth) of this tile within its layer. | |
| override Rectangle | DrawLocationWorld [get] |
| Gets the world-space pixel rectangle where this tile should be drawn. | |
| override bool | IsPositionFixed [get] |
| Gets a value indicating whether this tile's position is fixed within its grid. | |
| override PointF | SceneLayerCoordinates [get] |
| Gets the grid coordinates of this tile within its parent scene layer as a floating-point value. | |
| Point | GridCoordinatesAbs [get] |
| Gets the absolute grid coordinates of this tile within its parent scene layer as integer values. | |
| override SceneLayer | SceneLayer [get] |
| Gets the parent scene layer that contains this tile. | |
| bool | EnableAnimator [get, set] |
| Gets or sets a value indicating whether the tile's animator is enabled. | |
| Properties inherited from Gondwana.Drawing.Tile | |
| static List< Tile > | TilesAnimating = new() [get] |
| Gets the collection of all tiles that are currently animating in the scene. Used to track and update animated tiles during the render cycle. | |
| bool | IsPositionFixed [get] |
| Gets a value indicating whether the tile's position is fixed in screen space (e.g., UI elements) or moves with the world (e.g., game objects). | |
| Rectangle | DrawLocationWorld [get] |
| Gets the tile's draw location in world coordinates as a rectangle. This represents the area occupied by the tile in the game world. | |
| PointF | SceneLayerCoordinates [get] |
| Gets the tile's position within its scene layer using the layer's coordinate system. | |
| SceneLayer | SceneLayer [get] |
| Gets the scene layer that contains this tile. | |
| Guid | Id = Guid.NewGuid() [get] |
| Gets the unique identifier for this tile instance. | |
| string? | Nickname [get, set] |
| Gets or sets an optional friendly name for the tile, useful for debugging and identification. | |
| virtual bool | Visible [get, set] |
| Gets or sets a value indicating whether the tile is visible and should be rendered. Setting this property triggers a refresh of the tile's screen area. | |
| virtual int | ZOrder [get, set] |
| Gets or sets the Z-order (depth) of the tile for rendering priority. Higher values are drawn later (on top of lower values). Setting this property triggers a refresh of the tile's screen area. | |
| virtual Overhang | OverhangPixels [get] |
| Gets the overhang dimensions (in pixels) that extend beyond the tile's primary area. This is typically used for tiles with visual elements that exceed their logical boundaries. | |
| virtual Frame | CurrentFrame [get, set] |
| Gets or sets the current frame being displayed for this tile. Setting this property triggers a refresh of both the old and new tile areas to handle size changes. | |
| virtual Animator | TileAnimator [get] |
| Gets the animator responsible for managing frame transitions and animation sequences for this tile. | |
| virtual bool | PauseAnimation [get, set] |
| Gets or sets a value indicating whether the tile's animation is currently paused. | |
| virtual ? ICollider | Collider [get] |
| Gets the collider used for collision detection with this tile. Returns null if the tile has no collision detection. | |
| virtual Rectangle | CollisionArea [get] |
| Gets the effective collision area of the tile in world coordinates, incorporating any adjustments specified by AdjustCollisionArea. | |
| virtual bool | EnableFog [get, set] |
| Gets or sets a value indicating whether fog of war rendering is enabled for this tile. Setting this property triggers a refresh of the tile's screen area. | |
| virtual Point[] | OutlinePointsWorld [get] |
| Used to determine polygonal area when drawing grid lines or fog. Override this property in a derived class to define custom areas for these effects. | |
| virtual CollisionDetectionAdjustment | AdjustCollisionArea = CollisionDetectionAdjustment.None [get, set] |
| Gets or sets the collision area adjustment values that modify the tile's collision boundaries. Use this to fine-tune the collision detection area relative to the tile's visual bounds. | |
| TypedValueBag | ValueBag = new() [get] |
| Gets the value bag for storing arbitrary typed values associated with this tile. Useful for attaching custom game-specific data without subclassing. | |
Additional Inherited Members | |
| Public Member Functions inherited from Gondwana.Drawing.Tile | |
| virtual RectangleF | GetDrawLocationScreen (View view) |
| Converts the tile's world location to screen coordinates based on the specified view. | |
| virtual RectangleF | GetCollisionAreaScreen (View view) |
| Converts the tile's collision area from world coordinates to screen coordinates. | |
| virtual void | Draw (BackbufferBase backbuffer, RectangleF destRectScreen) |
| Renders the tile to the specified backbuffer at the given screen location. | |
| int | CompareTo (Tile? tile) |
| Compares this tile to another tile for sorting purposes. Fixed-position tiles are rendered first, followed by tiles sorted by Y-coordinate, Z-order, and X-coordinate. | |
| virtual void | Dispose () |
| Releases all resources used by the tile, including removing it from animation tracking, disposing its animator, and clearing collision references. | |
| Protected Attributes inherited from Gondwana.Drawing.Tile | |
| bool | pauseAnimation |
| ICollider? | _collider |
Represents the values stored at a single location on a SceneLayer.
|
get |
Gets the world-space pixel rectangle where this tile should be drawn.
A Rectangle representing the tile's drawing bounds in world pixel coordinates, calculated by the parent layer's coordinate system and including any tile overhang.
This property uses the parent layer's coordinate system to transform the tile's grid coordinates into world-space pixel coordinates. The returned rectangle includes any overhang pixels defined by the tile's tilesheet, ensuring that tall or wide tiles (such as trees or buildings) are rendered with their full graphical extent.
The coordinate transformation depends on the layer's active coordinate system type (orthogonal, isometric, hexagonal, etc.) and accounts for the layer's tile size, origin offset, and other rendering properties.
|
getset |
Gets or sets a value indicating whether the tile's animator is enabled.
true if the tile has an active Animator instance; otherwise, false.
Setting this property to true creates a new Animator instance for this tile if one doesn't already exist, enabling animation cycle playback. Setting it to false disposes the existing animator and stops any active animations.
The animator manages frame cycling for animated tiles, allowing tiles to display animated sequences defined by Cycle definitions. Animations are updated automatically during the engine's background update phase.
Creating animators adds overhead, so this property should only be set to true for tiles that require animation. Static tiles should keep this property as false.
|
get |
Gets the absolute grid coordinates of this tile within its parent scene layer as integer values.
A Point representing the tile's exact column and row position in the layer's grid, where X is the column index and Y is the row index.
This property provides integer-based access to the tile's grid position, which is more appropriate for most tile-based operations than the floating-point SceneLayerCoordinates property. Grid coordinates are zero-based, with (0, 0) representing the top-left tile.
Use this property when you need exact grid indices for array access, adjacency checks, or other grid-based calculations that require integer precision.
|
get |
Gets a value indicating whether this tile's position is fixed within its grid.
Always returns true for scene layer tiles, indicating that they do not move independently from their assigned grid position.
Scene layer tiles are fundamentally different from sprites in that they occupy fixed positions within the layer's tile grid. While the entire layer can be scrolled, individual tiles cannot move to arbitrary positions. This property distinguishes tiles from sprites for rendering and collision detection purposes.
This property overrides Tile.IsPositionFixed to reflect the fixed nature of tiles within scene layers.
|
get |
Gets the parent scene layer that contains this tile.
The Gondwana.Scenes.SceneLayer instance that owns this tile.
This property provides access to the tile's parent layer, which is useful for accessing layer-level properties such as tile size, coordinate system, parallax settings, and other rendering parameters that affect how the tile is displayed.
Every scene layer tile is associated with exactly one parent layer, established when the layer is created. The relationship is immutable for the tile's lifetime.
|
get |
Gets the grid coordinates of this tile within its parent scene layer as a floating-point value.
A PointF representing the tile's column and row position in the layer's grid, where X is the column index and Y is the row index.
This property returns the tile's position in grid space (column, row), not pixel space. Grid coordinates are zero-based, with (0, 0) representing the top-left tile of the layer.
For integer grid coordinates, use GridCoordinatesAbs instead. This property returns a PointF for compatibility with base class APIs that work with fractional coordinates.
|
get |
Gets the z-order (rendering depth) of this tile within its layer.
An integer representing the tile's rendering priority. Lower values render first (behind), higher values render last (in front). For scene layer tiles, this is typically 0.
This property overrides the base Tile.ZOrder property with a new implementation that returns the tile's z-order for rendering within the scene layer. Z-order affects the rendering order when multiple drawable objects occupy overlapping positions.
Implements Gondwana.Drawing.IDrawable.