Skip to content

Latest commit

 

History

History
71 lines (42 loc) · 3.28 KB

README.md

File metadata and controls

71 lines (42 loc) · 3.28 KB

Samples

Flocking

[Code]

Boids-style flocking and clustering using Garnet ECS and Veldrid.

Flocking

Trixel

[Code]

Trixel editor using Veldrid and Dear ImGUI.

Trixel

Roguelike

[Code]

Classic roguelike using Veldrid. Core logic and types are idiomatic F# with no ECS. FSI script allows for replay and testing.

Roguelike

Processor

[Code]

This experimental utility is intended for asset processing. Currently it's just a packing utility for either assets or game files, using zip as the archive format.

Garnet.Processor is available as a dotnet tool Nuget package here or via the command: dotnet tool install Garnet.Processor.

Background: Asset files (textures, sounds, etc) are often converted and packed into an archive when released with the game. Converting files to an optimal format for the target platform or hardware can make loading faster. Having a small number of packed asset files reduces the overhead of opening individual files and reduces wasted space on the file system.

Numerics

[Code]

This experimental library has a variety of game-centric numerics or related code that isn't already covered by System.Numerics. It has no dependency on other Garnet libraries.

Garnet.Numerics is available as a Nuget package here.

Toolkit

[Code]

Experimental shared code used by samples, including sprite drawing, particles, noise, audio playback, and more. Depends on Veldrid for graphics, OpenTK.OpenAL for audio, ZLogger for logging, and Garnet.Numerics.

Garnet.Toolkit is available as a Nuget package here.

This library has two levels of integration:

  • Graphics/audio/etc: Wrapper or convenience methods over other libraries with no dependence on Garnet ECS
  • Composition: For use with Garnet ECS, the library includes predefined plugin-like systems for the various functionality
static member AddDefaultSystems(c : Container) =
    Disposable.Create [
        c.AddAssetsFolder()
        c.AddTextLoaders()
        c.AddGraphics()
        c.AddAudioDevice()
        c.AddAudioLoaders()
        c.AddTickUpdate()
        ]

The asset system in Garnet.Toolkit can load assets either from a folder (first choice) or from an asset archive file (if no folder is present). The folder option can be convenient for editing assets during development or for allowing modding.

Known issue: Microsoft.CodeAnalysis.* assemblies may be included in build output, but they are not needed and add around 10 MB. They are included because Garnet.Toolkit depends on Veldrid, which depends on SharpDX, which depends on NETCore.App, which depends on the CodeAnalysis assemblies. Workaround: Use Paket, which uninstalls transitive dependencies if no direct dependencies still depend on them.