Frent 0.5.1-beta

This is a prerelease version of Frent.
dotnet add package Frent --version 0.5.1-beta                
NuGet\Install-Package Frent -Version 0.5.1-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Frent" Version="0.5.1-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Frent --version 0.5.1-beta                
#r "nuget: Frent, 0.5.1-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Frent as a Cake Addin
#addin nuget:?package=Frent&version=0.5.1-beta&prerelease

// Install Frent as a Cake Tool
#tool nuget:?package=Frent&version=0.5.1-beta&prerelease                

Frent

NuGet NuGet GitHub commit activity (branch) GitHub Repo stars

A high preformance, low memory usage, archetyped based ECF/ECS library for C#.

Whaaaat?! Aren't there enough ECS libraries out there!

While Frent's implementation is an archetype based ECS, thats not why Frent was made. Frent is primarily an ECF - Entity Component Framework - that allows you to easily use composition for code reuse rather than inheritance with minimal boilerplate. Think Unity's Monobehavior powered by the principles and speed of an ECS, as well as less boilerplate.

Want to write systems anyways? Frent also has a Systems API that allows you to query entities in the style of an ECS.

[!CAUTION] Frent is still in beta and is not completely stable.

Quick Example

using Frent;
using Frent.Components;
using System.Numerics;

using World world = new World();
Entity entity = world.Create<Position, Velocity>(new(Vector2.Zero), new(Vector2.One));

//Call Update to run the update functions of your components
world.Update();

// Position is (1, 1)
Console.WriteLine(entity.Get<Position>());

record struct Position(Vector2 Value);
record struct Velocity(Vector2 Delta) : IComponent<Position>
{
    public void Update(ref Position position) => position.Value += Delta;
}

Wanna learn more? Check out the docs!

There is also a Monogame and Godot sample.

Preformance

Frent is a lot faster than most C# ECS implementations - Benchmark.

Features

Implemented

  • Entity struct the size of a 64 bits
  • Up to 127 components per entity
  • Getting, Adding, and Removing components
  • Classes as components
  • Structs as components
  • Deconstructing entities
  • Component memory stored contiguously (when using structs)
  • Get/Has/TryGet O(1) and highly optimised
  • Pass in uniform data e.g., deltaTime
  • Deconstructing entities
  • Zero reflection
  • AOT Compatible
  • Built in Uniform Provider implementation
  • Non-Generic Entity Creation
  • Entity Tags
  • World Update Filtering
  • Command buffer
  • Component/Tag Add/Remove Events (with generic version)
  • Automatic structual change management during updates

Future

  • Comprehensive docs
  • 100% Test coverage
  • More samples, examples, & explanations!
  • Multithreading
  • EntityMarshal and WorldMarshal for even faster speeds!

Contributing

Wanna help?

Report bugs, suggest APIs, and give general feedback. Just open an issue before starting a large feature.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.1-beta 42 3/9/2025
0.5.0-beta 42 3/9/2025
0.4.2.1-beta 164 3/3/2025
0.4.2-beta 157 3/3/2025
0.4.1.2-beta 64 3/2/2025
0.4.1.1-beta 49 3/1/2025
0.4.1-beta 85 2/24/2025 0.4.1-beta is deprecated because it has critical bugs.
0.4.0-beta 120 2/17/2025 0.4.0-beta is deprecated because it has critical bugs.
0.3.3.3-beta 56 2/3/2025
0.3.3.2-beta 52 1/31/2025
0.3.3.1-beta 47 1/30/2025
0.3.3-beta 47 1/30/2025
0.3.2-beta 53 1/20/2025
0.3.1-beta 69 1/20/2025
0.3.0-beta 50 1/20/2025
0.2.3-alpha 53 1/5/2025
0.2.2-alpha 57 1/5/2025
0.2.1-alpha 49 1/5/2025
0.2.0-alpha 62 1/4/2025
0.1.4-alpha 60 1/4/2025
0.1.3-alpha 62 1/4/2025
0.1.2-alpha 62 1/1/2025
0.1.1-alpha 59 1/1/2025
0.1.0-alpha 73 12/31/2024