Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Jun 04:26
· 4 commits to main since this release

Added

  • Grid2DSpatial — Spatial helpers for CellGrid2D: neighbors4, neighbors8, distanceManhattan, distanceChebyshev, distanceEuclidean, worldToCell, inRange, lineOfSight, lineOfSightCells, floodFill, findPath (A* pathfinding with min-heap).
  • Hex2DSpatial — Spatial helpers for HexGrid: offsetToCube, cubeToOffset, cubeRound, neighbors, distance, worldToCell, inRange, ring, spiral, lineOfSight, lineOfSightCells, floodFill, findPath. Supports both PointyTop and FlatTop orientations.
  • Grid3DSpatial — Spatial helpers for CellGrid3D: neighbors6, neighbors26, distanceManhattan, distanceChebyshev, distanceEuclidean, worldToCell, inRange, lineOfSight, lineOfSightCells, floodFill, findPath (A* pathfinding).
  • Hex3DSpatial — Spatial helpers for HexGrid3D: neighbors, neighborsHex, distance, worldToCell, inRange, lineOfSight, floodFill, findPath. Supports both PointyTop and FlatTop orientations.
  • 275 unit tests for spatial helpers covering both PointyTop and FlatTop hex orientations, property-based correctness tests (triangle inequality, offset-cube roundtrip, A* optimality vs BFS, flood fill completeness), adversarial/edge cases (1x1 grids, OOB inputs, boundary worldToCell, goal-blocked LOS), and non-square grid validation.
  • HexGrid<'T> — 2D hex grid with flat-array storage. Supports both PointyTop and FlatTop orientations via HexOrientation DU. Module functions: create, set, get, clear, getWorldPos, iter, iterVisible.
  • HexLayout — Full layout DSL for HexGrid matching Layout module API surface: run, section, padding, paddingEx, center, flowX, flowY, set, setIfEmpty, repeatX, repeatY, fill, border, rect, corners, clear, generate, iter, map, replace, replaceScatter, line, circle, polygon, checker, checkerBorder, scatter, scatterBorder, scatterLine, scatterStamp.
  • LayeredHexGrid<'T> — Layered variant with Dictionary<int, HexGrid<'T>> layers and LayeredHexLayout.layer for composable per-layer DSL.
  • HexGrid3D<'T> — 3D hex grid with hexagonal positioning in the XZ plane and linear layer height on the Y axis. Supports both PointyTop and FlatTop orientations.
  • HexLayout3D — Full layout DSL for HexGrid3D matching Layout3D API surface: run, section, padding, paddingEx, center, flowX, flowY, flowZ, set, setIfEmpty, repeatX, repeatY, repeatZ, column, fill, clear, floorHex, wallXY, wallYZ, shell, edges, line, sphere, cylinder, generate, generateHexLayer, generateXY, generateYZ, iter, map, replace, replaceScatter, scatter3D, scatterHexLayer, scatterXY, scatterYZ, scatterShell, scatterEdges, scatterStamp, checker3D, checkerHexLayer, checkerXY, checkerYZ, checkerShell.
  • LayeredHexGrid3D<'T> — Layered variant with Dictionary<int, HexGrid3D<'T>> layers and LayeredHexLayout3D.layer for composable per-layer DSL.
  • HexGrid3DRenderer — Rendering functions for hex grids: render, renderVolume, renderWithIndices, renderInstanced, renderVolumeInstanced.
  • Non-uniform dimension tests for 2D, Hex2D, and 3D grids validating correct face/edge positions for shell, border, corners, scatterShell, and scatterBorder functions.
  • Hex grid documentation: comprehensive guides for 2D and 3D hex grids covering orientation, coordinates, adjacency, pathfinding, elevation patterns, instanced rendering, and complete game examples (strategy maps, Civilization-style maps).
  • KeyCombo of Set<KeyboardKey> trigger type for simultaneous key combinations in the input mapper.
  • InputMap.keyCombo helper for binding actions to key combos (e.g., |> InputMap.keyCombo Save (Set [KeyboardKey.LeftControl; KeyboardKey.S])).
  • GameConfig DSL functions: withWidth, withHeight, withMinWidth, withMinHeight, withTitle, withTargetFPS.
  • Resizable window support via GameConfig.MinWidth and GameConfig.MinHeight — when set, enables ConfigFlags.ResizableWindow and calls Raylib.SetWindowMinSize.
  • 4 unit tests for key combo functionality (combo starts, releases, partial hold, multiple combos per action).
  • Cmd.signalExit for programmatic window exit from update functions. Signals the runtime to exit after the current frame completes. Window close via X button or Alt+F4 continues to work independently.

Changed

  • Breaking: Default exit key disabled (SetExitKey(KeyboardKey.Null)). The ESC key no longer closes the window. Games must handle window close via the OS close button (X) or Alt+F4. To re-enable a custom exit key, call Raylib.SetExitKey(key) in your init or use a subscription to dispatch a quit message.
  • Breaking: Cmd<'Msg> discriminated union has new Quit case. Users with exhaustive pattern matches on Cmd<'Msg> must handle the new case (or add a wildcard match).
  • Breaking: GameConfig struct has new fields (MinWidth: int voption, MinHeight: int voption). Users constructing GameConfig records directly must add these fields. Users using GameConfig.defaultConfig or the DSL functions are unaffected.
  • Breaking: Trigger discriminated union has new KeyCombo of Set<KeyboardKey> case. Users with exhaustive pattern matches on Trigger must handle the new case (or add a wildcard match).
  • GameContext.WindowWidth and GameContext.WindowHeight now update automatically when the window is resized (e.g., via OS resize or fullscreen toggle). Previously these were set once at creation and never changed.