Releases: kadir014/nova-physics
Releases · kadir014/nova-physics
1.0.0
🎉 Major Rewrite!
After wrapping up last year's term, I started rewriting Nova in summer break. The API is now rehauled, more consistent, easier to use and the general performance is a touch better. There are also quite a few big additions.
Highlights
- Compound shapes
- Now it is possible to have multiple shapes per body. Allowing for much complex scenes.
- Constraints
- Upgraded all constraints APIs.
- Distance constraint now can be a soft-constraint which allows for spring behaviour.
- New constraint: Spline path.
- Better contact caching
- Fixed all bugs related to contact caching & warmstarting.
- There are also now three contact events you can listen to.
- Better error handling
- Most functions now returns a documented status integer that you can check for errors.
nv_get_errorto get the last error message.
- And many more!
Changelog
The rewrite is too big to list all changes here, so you can browse the commits from rewrite branch start to merge.
Full changelog: 0.7.0...1.0.0
0.7.0
Happy late new year! 🥳
Nova Physics is back with a massive optimization update!
Highlights 🌟
- Collision detection optimizations.
- AABB caching.
- Polygon transformed vertices caching.
- SIMD enhancements.
- Nova now uses AVX operations for integrating velocities & positions. Even though this might not have a huge impact on the overall performance, it's a start for vectorizing all simulation components!
- Multi-threading!
- A very experimental module that utilizes OS-threads to schedule tasks. This is only used to parallelize SHG for now.
- This is pretty inconsistent on Linux.
- Huge API changes.
- Now the whole codebase uses
nvStructandnvEnumnamings for every struct and enum. - Helper functions for body creation is now gone. You have to create shapes manually and pass them. Although, there is new better shape API.
- Now the whole codebase uses
Fixes
- Fixed the bug where attractive forces behaved differently with substeps.
- Fixed platform error messages in build script.
- All broad-phase warnings are gone.
- Fixed Fedora segfault in exampel demos.
Changelog
- Improved constraints API for expandability.
- New constraint: Hinge joint.
- Added descriptions in
constants.h(and few new constants). nvBody_reset_velocitiesmethod for clearing body's velocities.nvArray_clearmethod.- Tracy profiler support.
- Build with
--enable-tracyargument to start profiling with Tracy.
- Build with
- Renamed
nvBroadPhaseAlg_...enum for readability. - New polygon functions:
- Convex hull generation now uses Graham Scan algorithm. Which should be faster than the previous Gift Wrapping implementation.
- Winding order function.
- Build system is rewritten.
- Object file caching for faster compilation times.
- Better dependency management.
- Better CLI and argument parsing.
- Animated progress bar for downloading dependencies.
- Better and more extendible compiler support.
--target=...argument for targeting a specific compiler.--no-profilerargument for disabling built-in profiler.--no-simdargument for disabling usage of SIMD intrinsics.- It is now possible to build & run unit tests.
- Example system reworked.
- Now all examples demos can be viewed from the same window.
- Each example demo has its own settings.
- Code should be easier to read and extend.
- Benchmark base refactored.
Full changelog: 0.6.0...0.7.0
0.6.0
Highlights 🌟
- Build script now supports parallel compiling and Visual Studio build tools.
- Reworked current constraints API and solvers. They are more stable.
- Shape factory methods for generating convex hulls or other common shapes.
- Groups, categories and masks for filtering collisions.
Issue Fixes
- Fixed the long standing impulse caching bug where systems with high restitution instantly exploded.
- Fixed Linux warnings for
example_base.h. - Space now has an internal ID counter to avoid same IDs getting assigned to bodies after removing and adding.
Changes & Additions
- New examples added:
cloth.candhull.c- Also improved some other examples.
- Reworked the examples README page, and the demo UI.
- In the collision resolutions,
nv_Contantstruct is now used to store contact point information. - Bodies now have
gravity_scaleattribute that indicates how are they affected by gravity. - Shape factory functions.
nv_ShapeFactory_Rect&Boxto create rectangle shapes.nv_ShapeFactory_NGonto create regular n-gon shapes.nv_ShapeFactory_ConvexHullto create a convex hull from an array of points.
nv_Space_set_broadphasemethod to change the current broadphase algorithm.- Collision groups, categories and masks to filter which bodies collide with each other.
nv_Body.collision_group,nv_Body.collision_categoryandnv_Body.collision_maskare 32-bit unsigned integers, last two are used as bitmasks.
- Parallel build support for GCC in the build script for faster compilation time and MSVC support.
- Use the
-j<n>option to set the number of processed fired ton - Use the
-xoption to target MSVC.
- Use the
- Constraints are moved to their own modules.
- Constraints now link to the world by passing
NULLto body parameter. The anchor point should be changed to world-space. - Improved current constraint solvers.
- Math module is now only header-only.
nv_Profilerstructs hold information about simulation's various profiling data.- The documentation is improved and started to write getting started section.
0.5.2
Updatelog
- Improved collision persistance.
- Completely reworked the hash map implementation.
- Fixed SHG losing collision persistance. However this affects the performance.
- New
nv_Space.collision_persistanceattribute defines the number of frames a collision resolution stays alive for.
- New methods
nv_Space_remove&nv_Space_kill - Added kill boundaries (
nv_Space.kill_bounds&nv_Space.use_kill_bounds). - New examples:
varying_friction.canddomino.c - Matrix API has been refactored and moved to its own header.
- Improved docs.
- Better platform detection in
nova_builder.pybuild script.
0.5.1
0.5.0
Highlights 🌟
- Improved broad-phase!
- Nova Physics now has a Spatial Hash Grid implementation.
- Body shapes.
- Now shapes has their own interface. This makes it easier to have multiple shapes and concave polygons in the future.
- Improved contact point generation.
Updatelog
- There are two separate broad-phase algorithms now. SHG (Spatial Hash Grid) and Brute-force. Developer can choose whichever they want.
nv_BroadPhase_SPATIAL_HASH_GRID&nv_BroadPhase_BRUTE_FORCE.
- New shape interface with
nv_Shape&nv_ShapeType. - Polygon contact generation now uses polygon clipping for more accurate contact points.
- Presolver functions in the solver API has been renamed to
nv_presolve_... - Most, if not all, of the compiler warnings are fixed.
- New example
fountain.c.- Also improved all examples.
- Improved documentation..
0.4.0
What's new? 🎉
- New Vector2 API.
- Utility macros like
NV_VEC2(),NV_VEC2_NEW,NV_TO_VEC2,NV_TO_VEC2P
- Utility macros like
- Nova Physics now uses an iterative sequential impulse solver with accumulated impulses.
- A custom build system for Nova Physics that simplifies everything.
- Learn how to use it here.
Updatelog
- Nova Physics now uses a custom floating point type
nv_floatwhich can be configured while building by the developer. - Solver can be configured to use different functions for coefficient mixing.
nv_Body_apply_impulse(andnv_Body_apply_pseudo_impulse) methods are used in the solver.nv_Space_clearmethod to clear all the Space content.nv_Space -> warmstartingfield to toggle warm-starting accumulated impulses.- Improved example base and new examples demos.
- Improved sleeping.
nv_Space -> sleep_energy_thresholdfield to determine sleeping energy thresholdnv_Space -> sleep_timer_thresholdfield to determine sleeping time thresholdnv_Space -> wake_energy_thresholdfield to determine waking energy threshold
0.3.1
0.3.0
Changes
- New material API for setting bodies' material properties like density, friction, etc..
nv_Materialstruct and presets likenv_Material_STEEL,nv_Material_WOOD, etc..
- Constraint support and solvers
- New constraint: Spring! 🎉
- New examples and improved example base
- Bugs & function documentation fixes