Skip to content

5.0 Major Release

Latest

Choose a tag to compare

@SoloByte SoloByte released this 24 Apr 06:48
· 9 commits to main since this release

Summary

The 5.0 release is focused on refactoring and cleanup of existing systems while also introducing a selection of targeted new features to make the engine cleaner, faster, and easier to extend.

First of all, the input system was overhauled: there is a new InputActionSettings struct, a redesigned gesture system, and improved gamepad handling. The most notable fix is that gamepads now work on macOS again.

Next, the collision system was decoupled from the spatial-partitioning system to allow custom broadphase implementations. The pathfinding system received several improvements and an optional parallelization mode, allowing path requests to be handled concurrently rather than sequentially. The collision system also gained partial parallelization, allowing parts of the collision-detection algorithm to run in parallel.

A new resource-packer project was added to bundle resources into text or binary packs, and the ShapeEngine content system was updated to support these packs. Alongside this, I cleaned up and modernized the legacy content system and added simple JSON and XML serializer classes to replace the old, JSON-only serializer. I also included example scenes for JSON and XML serialization; these scenes can load custom JSON and XML files to alter scene behavior at runtime.

Many drawing APIs were modernized, renamed, and decluttered. Drawing functions are now all grouped within each shape. New MaskedDrawing* functions were implemented, and StripedDrawing* was overhauled and modernized. Several GitHub workflows were added to simplify repository and engine maintenance.


Changelog

Input System

  • [BREAKING] Input system improvements.
  • [NEW] InputGesture system added  (LongPress, DoubleTap, etc.).
  • [NEW] InputDeviceSettings struct added for easier setup of the input system.
  • [NEW] InputActionSettings struct added for easier setup of input actions.
  • [NEW] Automated system for applying the current gamepad mappings added (gamepads now works on macOS).
  • [UPDATE] Gamepad management improved.

Collision System

  • [BREAKING] Collision system improved.
  • [BREAKING] Collision system separated from spatial partitioning algorithm to allow use of custom algorithms.
  • [NEW] Optional parallelization features for better performance added (allows to run certain parts of the collision detection algorithm concurrently).
  • [NEW] MotionType and BroadphaseType enums added to the collision system.

Pathfinding

  • [BREAKING] Pathfinding system improved.
  • [NEW] Optional parallelization features for PathRequest handling added.

Savegame

  • [BREAKING] Savegame system improved.
  • [NEW] Savegame folder is now automatically created based on ApplicationName and SaveDirectory.
  • [NEW] Automated savegame backup system added (automatically creates a backup folder in the savegame directory and it can create and apply backups).

Docs

  • [NEW] XML summaries added to every class, member, and function that is public.
  • [NEW] Documentation is now build for each release and the main branch. To switch between them a new version selector was added to documentation page.

Drawing

  • [BREAKING] Overhaul of all outline drawing functions of all closed shapes and polyline to allow using transparent colors without overlapping artifacts.
  • [NEW] MaskedDrawing* functions added (Allows to only draw a shape or shape outline within a certain area or outside of a certain area).
  • [NEW] StripedDrawing* overloads added.
  • [UPDATE] Striped drawing functions improved.
  • [UPDATE] Striped drawing functions moved into shape structs/classes.

Workflows

  • [NEW] Workflow added to automatically update the gamepad mappings file once a month (SDL GameController DB is used as source).
  • [NEW] Workflow added to automatically keep ShapeEngines dependencies up to date (raylib and Clipper2).
  • [NEW] Workflow added to automatically attach Example project builds to new releases.
  • [NEW] Workflow added to upload ShapeEngine nuget packages to nuget.org (manually triggered only).

Core

  • [NEW] ApplicationName property added (used for setting up the savegame folder).
  • [NEW] ShapeEngine now handles capping of FrameRate to the set FrameRateLimit.
  • [NEW] AdaptiveFpsLimiter class added.
  • [NEW] MacOS app bundling and packaging support for Examples added.
  • [NEW] New VsyncMode enum added. (Disabled, Half, Normal, Double, Quadruple)
  • [UPDATE] VSync now works better and no longer disrupts fullscreen (If VSyncMode is enabled the FrameRateLimit is automatically set to the refresh rate of the current monitor based on the VsyncMode).
  • [NEW] New AdaptiveFpsLimiter classed implemented. Automatically adjust fps limit to find highest frame rate that can be sustained without dips. Works with all VsyncModes and with uncapped frame rate limit (frame rate limit <= 0).
  • [NEW] Idle detection implemented. Engine now detects if no input was received for a certain amount of time and idle mode will be triggered. (GameSettings parameter added to customize behavior)
  • [NEW] Idle frame rate limit system implemented. When idle mode is triggered and GameSettings.IdleFrameRateLimit is set, the engine will be limited to this frame rate until the idle mode ends.
  • [NEW] Unfocused frame rate limit system implemented. When the window looses focus and WindowSettings.UnfocusedFrameRateLimit is set, the engine will be limited to this frame rate until the window gains focus again.
  • [NEW] Added new FixedDelta property to the GameTime class to properly distinguish between fixed and open delta values.
  • [BREAKING] Added a new FramerateSettings struct. Framerate specific settings from GameSettings and WindowSettings were moved to FramerateSettings.
  • [NEW] Dynamic substepping properties added to FramerateSettings. Dynamic substepping splits up large frame deltas into multiple smaller update cycles. It works similar to fixed update but it only comes into play with extreme frame rate drop to keep the update delta consistent. 
  • [NEW] MaxDelta property added to FramerateSettings. The MaxDelta value is used to cap the maximum allowed frame delta each frame.
  • [BREAKING] Reworked the entire fixed update system.
  • [NEW] Added HandleInput() method to the game loop hierarchy (Game, Scene, CustomEvent)
  • [BREAKING] Clipper2 wrapper system completely overhauled and improved (cleaner api, less memory allocations, moved to Path64 from PathD for better accuracy, and much more)
  • [UPDATE] .net 8.0 updated to .net 10.0

Shapes

  • [NEW] Polygon GetIncircle() function added
  • [NEW] Polygon Round()/RoundCopy() functions added
  • [NEW] Polygon ToAbsolute() function added
  • [NEW] Polygon GetPreviousVertex()/GetNextVertex() and GetPreviousIndex()/GetNextIndex() functions added.
  • [NEW] Polygon GenerateOutlineTriangulation function added
  • [NEW] Polygon Triangulate() overload added with ref parameter (reduce allocations)
  • [NEW] Various new  geometric functions added to certain Shapes.

Misc

  • [BREAKING] Pool System overhauled and drastically simplified.
  • [NEW] PerlinNoise class added (thanks to Fixin).
  • [NEW] ResourcePacker project added - Allows packing/ unpacking of resources to text or binary files. 
  • [NEW] DebugLogger class added (allows to print information to console and/or to a log file).
  • [UPDATE] A lot of misc fixes, improvements, and clean up.
  • [UPDATE] Better polygon bounding circle algorithm implemented.
  • [UPDATE] Clipper2 library updated to v2.0
  • [NEW] PerformanceMeasureWatch class added.
  • [NEW] MacOS app bundling added

Example Scenes

  • [NEW] New Savegame Example Scene added.
  • [NEW] New XML / JSON serialization systems added.
  • [NEW] New XML / JSON Example Scenes added.
  • [FIX] EndlessSpaceExampleScene no longer updates the CollisionHandler twice each frame and properly makes use of FixedUpdate() when FixedPhysicsFramerate is enabled.
  • [NEW] New shaders added
  • [UPDATE] Existing shaders improved / fixed.
  • [NEW] New Shockwave Shader is used in EndlessSpaceCollision example scene now.
  • [NEW] Resources are now packed and copied to output directory on build.

And many more miscellaneous  changes, additions and fixes that would be too much to put them all here!

Merged Pull Requests

  • osx automated app package bundling by @SoloByte in #69
  • Bump Clipper2 from 1.5.3 to 1.5.4 by @dependabot[bot] in #70
  • Docs XML Summary Update 1 by @SoloByte in #71
  • Shape Struct/Classes partial system by @SoloByte in #72
  • Xml summary update2 by @SoloByte in #73
  • CollisionPoint & CollisionPoints renamed by @SoloByte in #74
  • Collision System Collider enabled checks added. by @SoloByte in #75
  • Polygon & Polyline Improvements by @SoloByte in #76
  • Shape fixes by @SoloByte in #77
  • Refactor: Pool improvements. by @SoloByte in #78
  • Refactor: Pool fixes by @SoloByte in #79
  • Normalized float by @SoloByte in #80
  • Game Class Improvements by @SoloByte in #81
  • Input System Overhaul by @SoloByte in #83
  • Input System and gamepad detection improvements by @SoloByte in #84
  • New Input Gesture System by @SoloByte in #85
  • Polygon Cutout/Compound Functionality by @SoloByte in #86
  • Xml support by @SoloByte in #87
  • Add controller db update automation workflow file by @SoloByte in #88
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #89
  • Binary Drawer Replacement by @SoloByte in #90
  • Debug logger by @SoloByte in #91
  • Savegame example scene by @SoloByte in #92
  • ResourcePacker and improved content management by @SoloByte in #95
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #96
  • Feat: Add GitHub Action to update dependency-versions.txt from csproj by @SoloByte in #97
  • Update dependency-versions.txt from csproj by @github-actions[bot] in #98
  • Workflow added to automatically attach Example and ResourcePack project builds to ShapeEngine releases by @SoloByte in #99
  • Simple Savegame Slot & Savegame Backup System by @SoloByte in #100
  • Collisionhandler Broadphase System by @SoloByte in #101
  • Bump Raylib-cs from 7.0.1 to 7.0.2 by @dependabot[bot] in #102
  • Update dependency-versions.txt from csproj by @github-actions[bot] in #103
  • CollisionHandler Parallel Processing Option by @SoloByte in #104
  • Cell Collision System by @SoloByte in #105
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #107
  • Pathfinding Parallelization by @SoloByte in #106
  • Pool System Overhaul by @SoloByte in #108
  • Striped Segments Generation Functions by @SoloByte in #109
  • Polygon Minimal Bounding Circle by @SoloByte in #110
  • Masked Outline Drawing by @SoloByte in #111
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #113
  • Fix Sequencer.StartSequence to avoid LINQ dependency causing CI build failure by @Copilot in #114
  • Add Trigonometry and PerlinNoise by @fixin0 in #112
  • Vsync framerate fix by @SoloByte in #115
  • Adaptive Fps Limiter by @SoloByte in #119
  • Bump Clipper2 from 1.5.4 to 2.0.0 by @dependabot[bot] in #118
  • Update dependency-versions.txt from csproj by @github-actions[bot] in #120
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #123
  • Vsync Mode System by @SoloByte in #122
  • Idle Detection & Idle/Unfocused Frame Rate Limit by @SoloByte in #124
  • FixedPhysics now uses Double instead of Float for increased precision. by @SoloByte in #140
  • Overhaul fixed update system by @SoloByte in #144
  • New HandleInput() loop added to the main game loop. by @SoloByte in #146
  • Readme Minimal Project Setup Code Update by @SoloByte in #148
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #149
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #150
  • Shape Drawing Improvements by @SoloByte in #116
  • Automated monthly update of gamecontrollerdb.txt by @github-actions[bot] in #151
  • 5.0 release polish by @SoloByte in #154
  • 5.0 readme updates by @SoloByte in #155

New Contributors

Full Changelog: v4.0.4...v5.0.0