Skip to content

Releases: DaveGreen-Games/ShapeEngine

v4.0.4 Patch Release

30 May 07:42
614bd2b
Compare
Choose a tag to compare

Shape Engine now has dedicated documentation thanks to @SteveSuv !

The docs are still a work in progress and a lot of functions and classes don´t have a summary yet.

What's Changed

  • Add an automated .NET build and dependency update by @hayattgd in #60
  • Potential fix for code scanning alert no. 1: Workflow does not contain permissions by @SoloByte in #61
  • change ShapeEngine.Lib to ShapeEngine.StaticLib by @SteveSuv in #62
  • Added new .yml file for automated nuget upload by @SoloByte in #63
  • Update dotnet.yml by @SoloByte in #65
  • Update LICENSE by @SoloByte in #67
  • OSX Builds Crash Fix by @SoloByte in #66
  • Update README with new docs section. by @SoloByte in #68

New Contributors

Full Changelog: v4.0.2...v4.0.4

v4.0.2 Patch Release

27 May 08:49
Compare
Choose a tag to compare

Added:

  • ShapePhysics CalculateDragFactor functions is now public.
  • ShapeVec added ClampLength(v, max) ClampLength(v, min, max) functions.
  • ShapeMath added IsSignEqual() (int and float) functions.

Fixed:

  • Added missing XML documentation file to the nuget package.

Full Changelog: v4.0.0...v4.0.2

v4.0.0 Major Release

16 May 14:24
Compare
Choose a tag to compare

This release took 4 months to complete. Originally, I just wanted to add the new Ray and Line shapes for drawing and collision detection, but it ended up being much more. I took a look at physics, added some new functions, and cleaned up the PhysicsObject class. DrawCheckered was renamed to DrawStriped, and I added a lot of new variations as well. There were many small changes, bug fixes, and improvements all over ShapeEngine. There are still things I wanted to add, but I decided to release 4.0 right now.

Changelog

  • Line and Ray shapes added. Both are defined by a Point and a Direction.
  • The Line is infinitely long in both directions from the point, and a Ray is infinitely long in one direction from the point.
  • Intersect / Overlap / ClosestPoint functions added to Line and Ray.
  • Intersect / Overlap / ClosestPoint functions overhauled and cleaned up for all remaining shapes (Segments, Points, Triangulation and Collider as well) to make everything consistent.
  • Line and Ray added to Cast/Query Space functions in CollisionHandler.
  • ShapesExample improved. Automated Testing and Projection added.
  • ShapesExample renamed to ShapeIntersectionExample
  • ShapeProjectionExample removed.
  • DrawCheckered renamed to DrawStriped
  • DrawStriped implemented for all closed shapes (Circle, Triangle, Rect, Quad, Polygon)
  • DrawStriped code improved with new line intersection functions
  • DrawStriped function with an outside and an inside shape. The striped lines will fill the outside shape and not the inside shape.
  • DrawShapeOutline example added
  • DrawShapeStriped example added
  • Physics! Example added
  • CurveDataExample added
  • Curve generic class implemented. Allows adding key-value pairs. Each key is time between 0 - 1. Allow sampling for a value at a certain time point. The value will be an interpolation between the values at the key before and after the time point.
  • CurveFloat, CurveInt, CurveVector2, CurveColor are implemented
  • ContainsShape functions overhauled for all closed shapes (Circle, Triangle, Rect, Quad, Polygon)
  • Polygon ContainsShape functions now properly check if the shape is contained. Previously, it would only check if all points are contained within the polygon, but would not check if the edges intersect the polygon.
  • Circle and Polygon have special ContainsShape code that uses intersection tests as well (other shapes just check if all points from the other shape are inside)
  • Raylib Cs bindings updated to 7.0.1
  • Clipper2 updated to 1.5.3
  • Static functions from PhysicsObject moved to the new static ShapePhysics class
  • Friction, Drag, Elastic Collision, Attraction, and Repulsion functions added to the ShapePhysics class
  • DrawArrow functions added to the ShapeDrawing class
  • ShapeDrawing was split into multiple files for each shape type: ShapePointDrawing, ShapeSegmentDrawing, ShapeLineDrawing, ShapeRayDrawing, ShapeTriangleDrawing, ShapeCircleDrawing, ShapeRectDrawing, ShapeQuadDrawing, ShapePolygonDrawing, ShapePolylineDrawing, ShapeDrawing, ShapeCustomDrawing, ShapeRingDrawing, ShapeGappedDrawing, ShapeStripedDrawing,
  • ShapeUIDrawing
  • ShapeEngine.Lib namespace was renamed to ShapeEngine.StaticLib
  • Deferred Drawing System added to the Game class

Full Changelog: v3.1.0...v4.0.0

v3.1.0 Minor Release

15 Dec 06:59
1d7d377
Compare
Choose a tag to compare

Summary

This release addresses various fixes and improvements that were missed in the 3.0 release. Despite introducing some breaking changes, I decided to classify this as a minor release rather than version 4.0, as all the breaking changes pertain to the same systems as the 3.0 release.

FirstContact / ContactEnded System Overhaul

Previously, the FirstContact was only reported for Colliders and not for CollisionObjects. The system has now been split into two separate systems: one for Collider pairs and one for CollisionObject pairs.

  • CollisionObjects:
    • FirstContact between two CollisionObjects is reported once any Collider of one contacts any Collider of the other CollisionObject.
    • The ContactEnded() function for the CollisionObject is called once all contacts between all of the Colliders have ended.
  • Colliders:
    • FirstContact between two Colliders is reported the first time they contact (no contact in the previous frame).
    • The ColliderContactEnded() function is called once the contact ends (contact in the previous frame but no contact in the current frame).

Other Changes:

  • Namespace Changes:
    • CollisionObject moved to the CollisionSystem namespace.
  • Class Removals:
    • ContactEndedInformation class removed.
    • Contact class removed.
  • Function Parameter Changes:
    • ContactEnded(CollisionObject other) function parameters changed.
    • ColliderContactEnded(Collider self, Collider other) function parameters changed.
  • CollisionInformation Improvements:
    • CollisionInformation now includes a FirstContact member, reported only for the two involved CollisionObjects, separate from any FirstContact reporting between Colliders.
    • General improvements and cleanup of CollisionInformation, including new functions.
    • New functions for Exists, Find, and FindAll CollisionPoints.
    • New functions for finding Closest, Furthest, and Combined CollisionPoint.
  • Collision Improvements:
    • Functions for Exists, Find, and FindAll CollisionPoints added.
  • CollisionPoints:
    • GetClosest/Furthest/FacingTowards functions now skip invalid collision points
  • Renaming:
    • GetAverageCollisionPoint() renamed to GetCombinedCollisionPoint() in multiple classes.
  • ResolveCollision Update:
    • CollisionObject.ResolveCollision() is now called for each generated CollisionInformation instead of receiving a list of CollisionInformation.

Merged Pull Requests


Full Changelog: v3.0.0...v3.1.0

v3.0.0 Major Release

09 Dec 13:33
Compare
Choose a tag to compare

Summary

This release improves how collision/overlap/query information is aggregated and handled.

Before, information was collected on a per-collider basis, and events/functions were called on the active collider involved. This meant the actual collision object and collider parent would not be notified.

Now, all the information is grouped per collision object. The collision/overlap between colliders with all the collision points is still collected together in one class. So, each collision object gets notified of all the collisions/overlaps that happened with any of the child colliders at the end of each frame. A collision without collision points is an overlap!

These changes should help in making it easier to use the collision information. The actual collision detection and data have not changed just how it is grouped together and presented to the involved collision objects/ colliders.

YouTube Video

Changelog

  • Overlap & OverlapInformation classes added
  • CollisionInformation class reworked
  • Collision class improvements
  • Collision System overhaul:
    • CollisionObjects now receive relevant CollisionInformation and can choose to pass it down to involved colliders
    • Collision information is now collected / sorted based on the other involved collision object. This means a collision is now detected and reported for all involved colliders in a collision between 2 collision objects at once. 
    • Functions/ Events involved renamed and reworked to make the system clearer
  • Collision Namespace changed to CollisionSystem
  • Copy() Function added to CollisionInformationOverlapInformationCollisionOverlap, and Intersection classes
  • Filter functions added to CollisionInformation and OverlapInformation
  • Intersection class deleted (replaced by CollisionPoints class)
  • CollisionPoint IsFacing*() functions added to check if normals are facing the correct way
  • QuerySpace*() functions in CollisionHandler renamed to IntersectSpace*
  • IntersectSpace*() functions now return IntersectSpaceResults that replaced the old QueryInfo system.
  • CastSpace now uses CastSpaceResult/CastSpaceEntry classes
  • Direction ToAlignement() Function fixed & ToInvertedAlignement() Function added
  • Deprecated classes removed:
    • Effect
    • Effect Object
    • Particle
    • PhysicsParticle
    • RangeFloat
    • RangeInt
    • SavegameFolder

Examples

  • 2 new attacks added to EndlessSpaceExample for testing the new collision system with overlaps (Q/E, LMB/RMB) for triggering the new attacks.
  • GameObjectHandlerExample new overlap circle objects added that change color based on how many collision objects they overlap.
  • Improvements & Fixes in various Example Scenes.

Pull Requests

Full Changelog: v2.4.0...v3.0.0

2.4.0 Minor Release

06 Nov 11:54
Compare
Choose a tag to compare

Transform2D Enhancements:

  • New Functions:
    • UpdateTransform: Updates the transform.
    • GetChildTransform: Retrieves the transform of a child object.

Collider Enhancements:

  • Uses UpdateTransform Function: The Collider now leverages the UpdateTransform function.
  • Cleanup: General cleanup for better performance and maintainability.

Function Changes in Shapes:

  • ApplyTransform/ApplyTransformCopy:
    • Changed to ApplyOffset/ApplyOffsetCopy across all shapes.

New Shape Class:

  • A new Shape class that inherits from IShape.

Collider Inheritance:

  • The Collider now inherits from the Shape class instead of IShape.

ShapeContainer System:

  • Hierarchy System: Parent/Child hierarchy for shapes.
    • ShapeContainer can have a parent and multiple children.
    • Children are updated based on the parent transform and the child offsets.

New Shape Classes:

  • CircleShape
  • TriangleShape
  • SegmentShape
  • RectShape
  • QuadShape
  • PolyShape
  • PolyLineShape
    • All these classes inherit from ShapeContainer.

Merged Pull Requests


Full Changelog: v2.3.1...v2.4.0

v2.3.1 Patch Release

23 Oct 05:53
Compare
Choose a tag to compare

The game reference of a Scene is now set before Activate is called on the Scene.

v2.3.0 Minor Release

21 Oct 06:24
Compare
Choose a tag to compare

Main Changes

  • ScreenTexture macOS scaling fix
  • AudioDevice cleanup and improvements
  • Collider & CollisionObject collision notification system improvements

Changelog

  • ScreenTextures should now properly scale on macOS when an high dpi monitor is used. (Before ScreenTextures in StretchMode would be not as sharp as they should be)
  • Audio Device Cleanup
  • Audio Device more overloads for certain functions added
  • AudioDevice PlaySFX() functions now return bool for success or failure
  • Playlist improvements
  • Game class now has a default AudioDevice initialized from the start
  • ShapeID & IDCounter Reset() and AdvanveTo() functions added
  • An active Scene now has a reference to the parent Game class that activated the Scene
  • CollisionObject now can optionally report collision events like ColliderCollision() & ColliderCollisionEnded(). ReportColliderCollision must be set to true!
  • Transform2d now has a Vector2 Scale2d field. The Scale field stays intact and reports the Scale2d.X value.
  • Collider received are more advanced collision notification system
  • Dimensions now have more operators
  • AlphaCircle shader added to Examples

Pull Request: Audio device overhaul by @SoloByte in #47

Full Changelog: v2.2.0...v2.3.0

v2.2.0 Minor Release

04 Oct 07:02
Compare
Choose a tag to compare

This is a small but very important update. Some small mistakes made their way into the Segment Overlap functions which made them give false results. I fixed this and by testing all shapes again I also found a typo in the Quad ContainsPoint function which led to false results in the Quad OverlapFunctions as well.

  • Segment Overlap functions fixed.
  • Quad ContainsPoint function fixed. (typo was the problem)
  • Polyline improvements / clean up.
  • RangeFloat and RangeInt deprecated. Both classes are still available but will be removed in a future update
  • ValueRange and ValueRangeInt readonly structs implemented to replace RangeFloat and RangeInt classes. They do basically the same but they are readonly structs now.

Full Changelog: v2.1.1...v2.2.0

v2.1.1 Patch Release

11 Sep 06:57
Compare
Choose a tag to compare

Savegame system CombinePath should now work correctly.