Skip to content

Releases: bryanedds/Nu

Specular Anti-Aliasing + Fluid Simulation in PhysicsEngine2d + Bug Fixes

11 Oct 03:51
cb000db

Choose a tag to compare

image image
  • Implemented #1156
  • LiquidSim
  • Got rid of focused flag on styling.
  • WIP edge and chain collision implementation
  • Renamed isButtonClicked to isButtonReleased.
  • Added Gravity2d/3d change events.
  • Add key released detection functions.
  • Applied burley diffusion term for more 'even' lighting.
  • Normalizing when sampling from 16-bit color normal texture.
  • Reorthoganalizing tangent and binormal in shaders.
  • Integrate fluid simlator inside physics subsystem.
  • More standard karis avg impl.
  • Support tags and gravity overrides in particles
  • Made Fluid.png a default asset.
  • Implemented user-controlled exposure and tone-mapping controls.
  • Using higher fidelity FXAA now.
  • Workaround for particles exploding for low particle radius.
  • Renamed Address.makeParent and makeCurrent to Address.parent and current, respectively.
  • Implemented cursor handling as its own subsystem.
  • Added CursorDispatcher.
  • Added default cursor asset.
  • Include all projects in asset propagation scripts so users do not need to edit them for their own projects.
  • Fixed incorrect use of glsl out parameters.
  • Fixed #1164
  • Fixed #1168
  • More terrain patches by default.
  • Ignoring inferred attributes when all of them are marked as unimportant.
  • Utilized AttributesInferred.unimportant on more dispatchers.
  • Also checking for importance in autoBoundsEntity.
  • Reexposed branchless functions on the basis of understanding their being fast post-JIT.
  • Added branchless min and max for singles.
  • Fixed 2D child entity Elevation getting stomped over by NewEntityElevation in Gaia.
  • Adjust SSRR threshold for eyeDistanceFromPlane.
  • Fixed jump box jump speed.
  • Replaced over-specialized map and filter fluid particle functions with choose message.
  • Removed inarticulate World.mapRenderer3dConfig function.
  • Renamed set function to World.configureRenderer3d.
  • Implemented specular anti-aliasing.
  • Report out of bounds particles in FluidEmitterMessage
  • Fixed invalidation issue when viewport changes but not display scalar.
  • Fixed bordered viewport bugs.
  • Fixed #1176
  • Fixed #1173
  • Remaining fix for #1056

Additional thanks to @Happypig375 for many of these!

Full Changelog: v19.6.0...v19.7.0

Screen Space Refraction + Bloom Post-Process + Sand Box 2D Demo + Editor Theme + Inset Viewport

26 Sep 21:13

Choose a tag to compare

Screen space refraction feature! -

image

Bloom post-processing! -

image

Sand Box 2D demo project thanks for @Happypig375! -

image

New editor theme! -

image

New inset viewport editing with F12! -

image

Changes in detail -

  • Added Sand Box 2d physics demo project by @Happypig375
  • Improved CSMs.
  • Convenience API for use of quaternions in a 2D context.
  • Make capsules respect rotation by @Happypig375
  • Expanded directional light cull frustum in attempt to fix vol fog pop…
  • Supporting rotation for 2d BoxShape.
  • Using a pool of text texture ids.
  • Added GcDebug for surfacing LOH churn.
  • Recycling displaced render tasks in order to avoid thrashing LOH in o…
  • Fixed incorrect use of X to specify angular velocity and torque (Z us…
  • Fixed body ground detection in cases like standing on circles.
  • Eliminated need for users to consolidate Nu dependency changes.
  • Fixed text offset regression from recent text rasterization caching.
  • Fixed World.EntitiesIndexed not getting updated with the new type key…
  • Updated ReCast library.
  • Implementing screen-space refraction.
  • Renamed SSR to SSRF to disambiguate from SSRR (refraction).
  • SSRF globally enabled by default.
  • Applied ssrr intensity to ambient color.
  • Updated Jolt Physics.
  • Fixed #1141.
  • Fixed #1143.
  • Don't need to handle panel left mouse up in any case.
  • Fixed missing layout refresh bugs.
  • Swapped margin definitions of DockTop and DockBottom.
  • Added missing presentation buffer destruction.
  • Implemented bloom post-process (on by default).
  • Disabling FXAA by default since bloom seems to do most of its job a b…
  • Removed the Relation type, using relative Addresses instead.
  • Swapped Address.resolve parameters. BREAKING CHANGE
  • Ability to parse empty addresses to and from "[]" s-expr unit.
  • Made "[]" the empty address (s-expr unit).
  • Implemented exponential fogs.
  • Fixed incorrect blit dimensions causing issues in light maps.
  • Prevented density from being 0 for any Aether shape.
  • GameTime-based interpolation for TraversalInterpolatedFacet by @Happypig375
  • Made tile map and terrain collision detection type configurable.
  • Removed dead type parameters is Signal methods.
  • Added Assets folder inclusion to project files.
  • Added missing WantCaptureKeyboardGlobal checks in WorldInputModule.
  • Exposed API for joint target angle.
  • Added operator to for non-reinitializing properties (|= for ImSim, != for MMCC).
  • Fixed GameTime.ToString () implementation.
  • Added do functions for non-entity simulants.
  • Fixed mount opt bugs with minor architectural refactoring.
  • Added some custom cimgui interop to access dock window size.
  • Implemented non-overly mode where game view is insetted into center dock (toggle with F12).
  • Applied styling to Gaia via ImThemes.

Full Changelog: v19.5.0...v19.6.0

Added 2D Physics Debug Drawing + Wax Scattering + Fixes!

05 Sep 05:55

Choose a tag to compare

image image
  • Fixed #1094
  • Using a configurable constant value for spine skeleton scalar.
  • Fixed inappropriate negation in Presence.DepthCutoff.
  • Imposter DepthCutoff fix.
  • Tuned animated surface ALBEDO_ALPHA_MIN to improve hair rendering.
  • Add CI
  • Cascaded shadows now showing up!
  • Add AI Documentation section to ReadMe
  • Found magic string to disable windows DPI.
  • Merge pull request #1101
  • Theta now <= ground angle max.
  • Added missing constant configs.
  • Merged csm branch with minor fixes.
  • Fixed relative gui rendering.
  • Updated Magick.NET.
  • Simplified params of Quaternion.CreateLookAt.
  • Formalized the meaning of a BodyShape being a primitive via IsPrimitive property.
  • Logging opengl driver vendor name.
  • Fixed imgui x to y operations.
  • Physics Debug Rendering for 2D entities thanks to @Happypig375!
  • Merge pull request #1116
  • Merge pull request #1117
  • Made imGuiCircles2dPlus radius match display.
  • Merge pull request #1118
  • Implemented terrain patches.
  • Merge pull request #1119
  • Add edge and contour shape to physics engine
  • Manually merged some fixes from #1120
  • Fixed 'TraversalInterpoledFacet' name typo.
  • Exposed 2d physics converters via joint creation lambda.
  • Added World.setGravity function.
  • Added gravity accessor.
  • Workaround what appears to be OpenGL driver bug on Linux AMD and Intel via Mesa.
  • Added ClipOpt for 2D facets.
  • Added back Log.warn to Quadtree when elements go out of bounds.
  • Refactored physics methods for explicit 2d and 3d separation rather than using an is2d parameter.
  • Implemented #1122
  • Implemented FXAA filter toggle.
  • Fixed TF attack handler bug.
  • Fixed definition of DestroySpriteBatchEnv.
  • Fixed forward shadow cast not invalidating properly.
  • Implemented wax scattering.
  • Reloading all shaders now in Gaia.
  • Fixed sort priority constant bug.
  • Applying proper physics / pixel conversion to joint breakpoints for 2d.
  • Added ShapeCast API and majority of 3D implementation.
  • Fix 2D raycast to convert between physics engine values and pixel values
  • Merge pull request #1124
  • Enabled recursive coroutines.
  • Fixed #1050
  • Made chain monad take world by capture.
  • More precise discrimination in spatial queries.
  • Merge pull request #1125
  • Merge pull request #1127

Full Changelog: v19.4.0...v19.5.0

Performance Improvements, Fixes, and Minor Enhancements.

18 Aug 23:23

Choose a tag to compare

Mostly just performance improvements, fixes, and minor enhancements this release!

Significant changes -

  • Added ShadowDisplayScalarMax to try to keep rendering performant above 1440p.
  • Fix for #832.
  • Optimized away tile strips that are out of view.
  • Implementation for #1021.
  • Populating specular scalar slot for deferred surfaces for consistency.
  • Fix for #1066.
  • Made Xtension.imperative function match F# collection nomenclature.
  • Added comprehensive QuadtreeTests.fs and OctreeTests.fs via Copilot.
  • Made physics renderer 3D optional for unit test fix.
  • Updated Magick.NET deps due to vulnerability.
  • Internalized AmbientState API, removing redundant doc comments.
  • Added gh-pages support for API documentation.
  • Moved several types to their related System namespace, particularly in Nu.Math.
  • Now able to configure freezers to ignore global freezer commands.
  • Fixed Permafreeze serialization by adding new representation.
  • Optimized frozen entities further.
  • Fixed flow layout issue.
  • Hack to fix spatial tree bugs.
  • Fixed issue with mouse button events going to Nu while in Gaia Capture Mode is active.
  • Added fallback functionality to format checking.
  • More precise categorization of render formats.
  • Unit test fix.
  • Removed the Liveness type (now using a boolean instead for simplicity).
  • Manual application of ShalokShalom's "Update GetProcAddressOS.cs" changes.
  • Linux setup fixes.
  • Implemented #1089.
  • Removed launchSettings.json in order to (mysteriously) fix code reload perf regression.
  • Handling empty DefineConstants gracefully in code reload.
  • Now loading dependent plugin assemblies for user-defined dispatcher and facet types.
  • Retermed Bundle to PreBatch to free up name for upcoming feature.

What's Changed

  • Add comprehensive unit test suites for Quadtree and Octree spatial data structures by @Copilot in #1079

New Contributors

  • @Copilot made their first contribution in #1079

Full Changelog: v19.3.0...v19.4.0

Performance + Fixes + New Indexed Entity API!

21 Jul 14:52

Choose a tag to compare

image

Other than perf and fixes, we have a new API for efficiently querying entities according to either their dispatcher type or a facet they use -

        /// Get all the entities in a group with the given dispatcher type.
        static member getEntitiesAs<'d when 'd :> EntityDispatcher> (group : Group) (world : World) : Entity USet =
            match world.EntitiesIndexed.TryGetValue struct (group, typeof<'d>) with
            | (true, entities) -> entities
            | (false, _) -> USet.makeEmpty HashIdentity.Structural (World.getCollectionConfig world)

        /// Get all the entities in a group that have a given facet type.
        static member getEntitiesWith<'f when 'f :> Facet> (group : Group) (world : World) : Entity USet =
            match world.EntitiesIndexed.TryGetValue struct (group, typeof<'f>) with
            | (true, entities) -> entities
            | (false, _) -> USet.makeEmpty HashIdentity.Structural (World.getCollectionConfig world)

As you can tell, the engine automatically updates these indices, making these sorts of queries constant-time. Additionally, since they return USets, you can do efficient set operations at frame time.

Additionally, we're now guaranteeing a policy of merging master to mutable at every release - which has also been done this release! Keeping the mutable branch up to date has little cost but many upsides that more than pay for it. This makes mutable Nu now an officially supported API!

Significant Changes -

  • Changed default vehicle wheel configuration to something with more reasonable initial vehicle handling.
  • Fixed lack of use of CastShadow for frozen forward surfaces.
  • Added missing light config focus checks in editor.
  • Increased interactive input text box size until I make it resizable.
  • Fix for #1067.
  • Fixed incorrect semantics when 3D rendering is used but then ceases to be used.
  • Fixed initial entity mounting behavior.
  • Added missing layout case field names.
  • Floating child gui entities above parent when mounting.
  • Optimized static surface rendering to avoid distance culling on fragments via discard in shader unless Clipped = true.
  • Implemented 2D texture filtering support.
  • Fixed file path API usage and factored out check.
  • Now emphasizing ImSim projects over MMCC.
  • New indexed entities API.
  • Added TryGetAlbedoImage API for editor eval use.
  • Changed World.getEntities to use undefined entity order and created new World.getEntitiesDepthFirst with its original semantics.
  • Updated Prime with fix for hash regression.

Full Changelog: v19.2.0...v19.3.0

Rendering Optimization, Improvement, and Other Fixes.

10 Jul 18:36

Choose a tag to compare

SSR now gives us an additional light bounce!

image

It looks much nicer now!

image

Additional Significant Changes -

  • Added PlanarProperty to billboard facets
  • Exposed OrientUp flag and implemented behavior for planar interactions
  • Made coroutine operators manually opened.
  • More comments in Jump Box.
  • Added missing handling for stale light probes being admitted.
  • Exposed some Jolt wheel API.
  • Fixed bug with user definition of vehicle properties being ignored.
  • Added begin / end batching for forward render shaders.
  • Deriving g-buffer position from depth.
  • Fixed global fog regression.
  • Normalized depth pipeline to composition buffer.
  • Using viewProjection uniforms to potentially speed up vertex shaders.
  • Renamed Swap to RequestSwap for semantic clarity.
  • Optimized categorization operations.
  • Fixed normal transform for forward static surfaces.
  • Fixed shadow regression from recent RenderPass optimization.
  • Made MountOpt [Some ^] by default to improve mount editing workflow.
  • Implemented surface bundles.
  • Got rid of automatic world stringization.
  • Fixed Gaia exception when selected entity changes type midstream.
  • Ripped out Permasplit feature since it now only pessimizes.
  • Gaia Interactive exception fix.
  • Removed unecessary param from runWithoutCleanUp.
  • Split up lighting shader for purposed of optimization and SSR improvement.
  • Checking all internal formats to attempt to surface driver issues on AMD.
  • Refactored ssr lighting variables.
  • Utilizing discard for screen quad rendering.
  • Temporary fix for saturate.
  • Fixed 25cbf6f
  • Fixed e119c04

What's Changed

New Contributors

Full Changelog: v19.1.0...v19.2.0

Jolt Physics Vehicle Support!

27 Jun 18:33

Choose a tag to compare

Thanks to collaboration from @amerkoleci, we've exposed a new Vehicle rigid body type that enables wheeled vehicle gameplay!

image

Significant Changes -

  • Implement vehicle functionality.
  • More standard out-of-box wheel configuration.
  • Renamed ApplyPhysics for consistency with model-specific overload
  • Re-org'd Nu project a bit.
  • Placed |> on the left hand side in conformance with settled F# style.
  • Removed ToString defn from world types.
  • Made AssetGraph and Overlayer constructable without files.
  • Updated Jolt and other dependencies.
  • World.make API changes.

Full Changelog: v19.0.0...v19.1.0

Nu API Revamp + Coroutines!

23 Jun 01:50

Choose a tag to compare

This release features a very large Nu API revamp that makes interfacing with the engine and writing game code significantly more ergonomic and streamlined!

Previously, the World value had to be manually threaded through every API call that caused the world to change in any way. Because of how pervasive state transformation are in games - even immutable transformations! - this meant you often ended up having to write code in a much more verbose style. This release changes all that, making the World type just a handle to the underlying immutable new WorldState value. This is a very enabling thing, and not just for code ergonomics! Because of that change, we are now enabled to provide you a Unity-style coroutines programming model as well - https://github.com/bryanedds/Nu/wiki/Frame%E2%80%90Based-Behavior-with-Coroutines

Additionally, writing ImSim code becomes so much easier and to the point. In stead of having to user ternary if expressions and folds everywhere, ImSim code becomes composed of imperative style ifs and for loops - almost like you're writing Python scripting code but with the power of declarative and functional programming!

Here's some ImSim code from the Breakout ImSim project before this API change -

        // declare bricks
        let world =
            Seq.fold (fun world (brickName, brick) ->
                World.doBlock2d brickName
                    [Entity.Position .= brick.Position
                     Entity.Size .= brick.Size
                     Entity.Sensor .= true
                     Entity.Color @= brick.Color
                     Entity.StaticImage .= Assets.Default.Brick] world |> __c)
                world (gameplay.GetBricks world).Pairs

        // declare score
        let world = World.doText "Score" [Entity.Position .= v3 248.0f 136.0f 0.0f; Entity.Text @= "Score: " + string (gameplay.GetScore world)] world

        // declare lives
        let world = World.doText "Lives" [Entity.Position .= v3 -240.0f 0.0f 0.0f; Entity.Text .= "Lives"] world
        let world =
            List.fold (fun world i ->
                World.doStaticSprite ("Life+" + string i)
                    [Entity.Position .= v3 -240.0f (single (inc i) * -16.0f) 0.0f
                     Entity.Size .= v3 32.0f 8.0f 0.0f
                     Entity.StaticImage .= Assets.Default.Paddle] world)
                world [0 .. dec (gameplay.GetLives world)]

        // declare message
        let messageText = if gameplay.GetLives world <= 0 then "Game over!" elif (gameplay.GetBricks world).Count = 0 then "You win!" else ""
        let world = World.doText "Message" [Entity.Text @= messageText] world

        // declare quit button
        let (clicked, world) = World.doButton "Quit" [Entity.Position .= v3 232.0f -144.0f 0.0f; Entity.Text .= "Quit"] world
        let world = if clicked then gameplay.SetGameplayState Quit world else world

Certainly more succinct than imperative or OO code, but here it is after -

        // declare bricks
        for (brickName, brick) in (screen.GetBricks world).Pairs do
            World.doBlock2d brickName
                [Entity.Position .= brick.Position
                 Entity.Size .= brick.Size
                 Entity.Sensor .= true
                 Entity.Color @= brick.Color
                 Entity.StaticImage .= Assets.Default.Brick] world |> ignore

        // declare score
        let scoreText = "Score: " + string (screen.GetScore world)
        World.doText "Score" [Entity.Position .= v3 248.0f 136.0f 0.0f; Entity.Text @= scoreText] world

        // declare lives
        World.doText "Lives" [Entity.Position .= v3 -240.0f 0.0f 0.0f; Entity.Text .= "Lives"] world
        for i in 0 .. dec (screen.GetLives world) do
            World.doStaticSprite ("Life+" + string i)
                [Entity.Position .= v3 -240.0f (single (inc i) * -16.0f) 0.0f
                 Entity.Size .= v3 32.0f 8.0f 0.0f
                 Entity.StaticImage .= Assets.Default.Paddle] world

        // declare message
        let messageText = if screen.GetLives world <= 0 then "Game over!" elif (screen.GetBricks world).Count = 0 then "You win!" else ""
        World.doText "Message" [Entity.Text @= messageText] world

        // declare quit button
        if World.doButton "Quit" [Entity.Position .= v3 232.0f -144.0f 0.0f; Entity.Text .= "Quit"] world then
            screen.SetGameplayState Quit world

No longer to new users have to spend time learning the ropes of writing interwrited folds and babysitting the world value for reasons that are necessarily initially apparent. New users can now get up to speed on Nu game development both quickly and have more fun over the game dev process due to this significant reduction in development friction!

More and more benefits are being hatched based on the new API as well, which we'll surface as we discover and prove them out!

What's Changed

  • Use implicit yields for Coroutine, elide unit argument for sleep and cancel by @Happypig375 in #1051

New Contributors

Full Changelog: v18.17.0...v19.0.0

Stability Release before Large Scale API Refactoring.

20 Jun 02:59

Choose a tag to compare

Coming up on the scheduled next release will be a very large Nu API refactoring that makes interfacing with Nu much more ergonomic and streamlined! However, as you can infer, that will include many many shallow but breaking changes. Therefore, this release is a stability release meant to work for those who haven't yet had the time to convert their existing project code to the new API.

Noteworthy Changes -

  • Fixed the launchSettings files that I didn't even want in the first place...
  • Increased shadow seam size to fix shadow rendering out of bounds.
  • Showing selected light frustums in Gaia.
  • Conditionals around shadowTexCoords vec3 for potentially better accuracy.
  • Using a more standard shadow depth representation for directional shadows.
  • Renamed light matrix / frustum compute functions to reflect they refer to shadows specifically.
  • Renamed GaiaState.txt to Nu.Gaia.State.txt.
  • ImGui windows now processed in layout order.
  • Bit of UI arrange in Gaia.
  • Implemented World.mapRenderer3dConfig for basic convenience.
  • Now sharing render/framebuffers among light maps.
  • Increased SsrDistanceCutoffDefault to make it easier for users to get started working with SSR.
  • Changed method of defining VAOs.
  • Terrain crash fix.
  • Fixed batching regression.
  • Fixed text rendering regression.
  • Might as well have 9 forward lights if we have 9 shadows in it!
  • Update .NET dependencies and Jolt physics.
  • Updated Prime and CSV dependencies.
  • Fixed lack of Omnipresent specification for non-generic GuiDispatcher.
  • Fixed spatial tree bugs.
  • Reverted code to fix regression in #1048.

Full Changelog: v18.16.0...v18.17.0

Fixes + Project Race Game Prototype Sample

25 May 22:37

Choose a tag to compare

I've been working on a race game demo for a couple weeks, most of that time spent exposing the absent vehicle API for the JoltPhysicsSharp wrapper -

image

In this build, I've only just got the vehicle physics simulating and responding to input. There's a few bugs, the car is still too stiff imo, and the game startup is very slow because assets haven't been optimized... but the car drives surprisingly fun once you learn how and when to drift (HINT: it's mostly like a Drift type vehicle like in Ridge Racer). Finally, this build should only work on x64 Windows since I've only got a local Jolt Physics build to deploy with as of yet.

Controls are as follows -

Up = Accelerate
Down = Reverse
Left / Right = Steer
Space = Brake
Ctrl = Hand Brake
R = Reset Car Orientation (sometimes helps if you get stuck)

Nu Game Engine changes -

  • DisplayScalar now 2 by default for better deployment diagnostics.
  • Uplifted to latest opengl since we use features from 4.3 anyway.
  • SSVF improvements for point and spot lights.
  • Revised Gaia layout for 2x display scalar.
  • AnimatedModel idle animation fix.
  • Scaled up alpha via fogging in forward renderers.
  • Increased FarPlaneDistanceExterior default.
  • Increased Collision3dContactConstraintsMax default.
  • Optimized generateEntitySequentialName.
  • Optimized address / simulant look ups.
  • First pass of Ambient Boost feature.
  • Updated .NET version in sh files.
  • [Introduced and reduced ALBEDO_ALPHA_MIN to fix overly thinning behavior.
  • Reverted removal of EntityCachedOpt due to perf regression.
  • Made Entity.Imperative unchangable.
  • Made World type fit in two cache lines again.
  • Applying global gaussian blur on top of FXAA for better AA.
  • Reduced allocation in to/fromEventName fns.
  • Properly exposed doEntityFromFile and related.
  • Fixed imsim group and entity naming.
  • Attempt to fix issue where code reload break eval.

Full Changelog: v18.15.0...v18.16.0