Frent 0.1.2-alpha
See the version list below for details.
dotnet add package Frent --version 0.1.2-alpha
NuGet\Install-Package Frent -Version 0.1.2-alpha
<PackageReference Include="Frent" Version="0.1.2-alpha" />
paket add Frent --version 0.1.2-alpha
#r "nuget: Frent, 0.1.2-alpha"
// Install Frent as a Cake Addin #addin nuget:?package=Frent&version=0.1.2-alpha&prerelease // Install Frent as a Cake Tool #tool nuget:?package=Frent&version=0.1.2-alpha&prerelease
Frent
A high preformance archetyped based ECS/ECF library for C#. Zero unsafe code and optimized to be just as fast.
Whaaaat?! Isn't there enough ECS libraries out there!
While Frent at its core is an archetype based ECS library, thats not why Frent was made. Frent is also 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 but powered by the principles and speed of an ECS.
🚧 Warning
Frent is still in alpha, with an incomplete feature set. I'll try my best to not change any APIs and squash as many bugs, but no guarantees
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();
//Alternatively, run a system by providing a delegate or a struct
world.Query((ref Position pos, ref Velocity vel) => pos.Value += vel.Delta);
// Position is <1,1>
Console.WriteLine(entity.Get<Position>().Value);
record struct Position(Vector2 Value);
record struct Velocity(Vector2 Delta) : IUpdateComponent<Position>
{
public void Update(ref Position position) => position.Value += Delta;
}
Features
Implemented
- Entity struct the size of a 64 bits
- Up to 16 components per entity
- Getting, Adding, and Removing components
- Zero unsafe code
- Classes as components
- Structs as components
- Deconstructing entities
- Component memory stored contiguously (when using structs)
- All entity functions are O(1) and highly optimised
- Pass in uniform data e.g.,
deltaTime
- Deconstructing entities
- Zero reflection
- AOT Compatible
Future
- Multithreading
- Entity relationships
- Programmical Entity Creation
- Tests
- Built in Uniform Provider implementation
- Entity Tag
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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. |
-
net8.0
- No dependencies.
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.4.0-beta | 62 | 2/17/2025 |
0.3.3.3-beta | 42 | 2/3/2025 |
0.3.3.2-beta | 38 | 1/31/2025 |
0.3.3.1-beta | 35 | 1/30/2025 |
0.3.3-beta | 35 | 1/30/2025 |
0.3.2-beta | 38 | 1/20/2025 |
0.3.1-beta | 45 | 1/20/2025 |
0.3.0-beta | 34 | 1/20/2025 |
0.2.3-alpha | 48 | 1/5/2025 |
0.2.2-alpha | 52 | 1/5/2025 |
0.2.1-alpha | 44 | 1/5/2025 |
0.2.0-alpha | 57 | 1/4/2025 |
0.1.4-alpha | 52 | 1/4/2025 |
0.1.3-alpha | 55 | 1/4/2025 |
0.1.2-alpha | 58 | 1/1/2025 |
0.1.1-alpha | 57 | 1/1/2025 |
0.1.0-alpha | 71 | 12/31/2024 |