Vigilance 0.2.19

dotnet add package Vigilance --version 0.2.19
                    
NuGet\Install-Package Vigilance -Version 0.2.19
                    
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="Vigilance" Version="0.2.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vigilance" Version="0.2.19" />
                    
Directory.Packages.props
<PackageReference Include="Vigilance" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Vigilance --version 0.2.19
                    
#r "nuget: Vigilance, 0.2.19"
                    
#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.
#:package Vigilance@0.2.19
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Vigilance&version=0.2.19
                    
Install as a Cake Addin
#tool nuget:?package=Vigilance&version=0.2.19
                    
Install as a Cake Tool

Vigilance

Vigilance is a 2D game engine/framework for C# and .NET, built on Raylib and focused on developer experience and performance, and it is compatible with Native AOT.

Documentation

The engine documentation and API reference are available at vigilance.samaelheaven.workers.dev.

Features

  • Entity component system: components are stored in sparse sets, so adding, removing, and iterating them stays cheap. Structural changes can be deferred while you iterate, and every add, set, and remove can be observed through events.
  • Scenes: a scene ties everything together. It holds your entity hierarchies and the systems that act on them, and supports names, prefabs, and transitions between scenes.
  • Game loop: the frame runs through update, fixed update, and render phases, each with its own pre and post steps. Transforms are interpolated between fixed updates, so motion stays smooth at any frame rate.
  • Systems: write your logic as ordered systems that hook into any phase. Built-in systems already handle physics, sprite batching, drawables, animations, UI, and more!
  • Rendering: draw sprites, animations, shapes, and text with FreeType fonts, use shaders, render textures, and cameras, and batch sprites through instancing.
  • Physics: Box2D bodies and shapes, with contact and sensor events and ray casts.
  • UI: high-level UI elements laid out with flexbox, usable in both immediate and retained mode.
  • Input: keyboard, mouse, gamepads, and the clipboard.
  • Audio: sounds, music, and audio streams.
  • Utilities: collections, math, tweens, timers, assets, logging, HTTP requests, and more!

Supported platforms

  • Desktop: Windows, Linux, and macOS, running natively.
  • Web: browsers, through WebAssembly.
  • Mobile: Android.

Installation

Vigilance targets .NET 10 and later.

dotnet add package Vigilance

Vigilance.Debug is the same engine with internal assertions enabled, for catching misuse during development. To use it in Debug builds and the regular package in Release builds, add both references to your project, replacing x.y.z with the latest version:

<PackageReference Include="Vigilance" Version="x.y.z" Condition="'$(Configuration)' == 'Release'" />
<PackageReference Include="Vigilance.Debug" Version="x.y.z" Condition="'$(Configuration)' == 'Debug'" />

Benchmarks

The engine's entity operations and queries are compared against Flecs.NET after each release. The ratio column compares each Vigilance benchmark with the Flecs.NET baseline of the same operation; the measurements come from a shared CI machine, so the ratios are more meaningful than the absolute times.

BenchmarkDotNet v0.16.0-preview.2, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon)
AMD EPYC 7763 3.24GHz, 1 CPU, 2 logical cores and 1 physical core
Memory: 7.75 GB Total, 4.46 GB Available
.NET SDK 11.0.100
  [Host]     : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v3
  Job-NHQAEU : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v3

Entities

EnvironmentVariables=DOTNET_TieredCompilation=0 InvocationCount=1 IterationCount=12 UnrollFactor=1 WarmupCount=4

Method Categories EntityCount Mean Error StdDev Median Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
Vigilance_AddComponent AddComponent 1000 23.01 μs 0.981 μs 0.709 μs 22.79 μs 4.79x faster 0.14x - - - 41408 B NA
Flecs_AddComponent AddComponent 1000 110.08 μs 1.127 μs 0.671 μs 109.84 μs baseline - - - - NA
Vigilance_AddComponent AddComponent 100000 2,214.13 μs 23.263 μs 16.820 μs 2,212.23 μs 5.07x faster 0.16x - - - 4598704 B NA
Flecs_AddComponent AddComponent 100000 11,228.42 μs 471.206 μs 367.887 μs 11,389.39 μs baseline - - - - NA
Vigilance_Create Create 1000 71.71 μs 37.185 μs 29.032 μs 83.66 μs 1.47x slower 0.57x - - - 59608 B NA
Flecs_Create Create 1000 48.66 μs 0.657 μs 0.475 μs 48.69 μs baseline - - - - NA
Vigilance_Create Create 100000 5,724.16 μs 61.534 μs 44.493 μs 5,710.15 μs 1.30x slower 0.01x 1000.0000 1000.0000 1000.0000 6958728 B NA
Flecs_Create Create 100000 4,391.43 μs 35.999 μs 26.030 μs 4,386.56 μs baseline - - - - NA
Vigilance_CreateWithComponents CreateWithComponents 1000 76.86 μs 8.163 μs 5.903 μs 73.68 μs 3.45x faster 0.29x - - - 142424 B NA
Flecs_CreateWithComponents CreateWithComponents 1000 264.14 μs 19.689 μs 14.236 μs 255.81 μs baseline - - - - NA
Vigilance_CreateWithComponents CreateWithComponents 100000 12,024.95 μs 646.825 μs 427.835 μs 11,886.39 μs 2.07x faster 0.07x 2000.0000 2000.0000 2000.0000 16156736 B NA
Flecs_CreateWithComponents CreateWithComponents 100000 24,879.00 μs 245.707 μs 162.520 μs 24,879.26 μs baseline - - - - NA
Vigilance_Destroy Destroy 1000 80.66 μs 0.492 μs 0.355 μs 80.48 μs 1.29x slower 0.31x - - - 8392 B NA
Flecs_Destroy Destroy 1000 67.06 μs 24.623 μs 19.224 μs 53.47 μs baseline - - - - NA
Vigilance_Destroy Destroy 100000 7,404.85 μs 20.285 μs 13.418 μs 7,399.67 μs 1.49x slower 0.01x - - - 1048944 B NA
Flecs_Destroy Destroy 100000 4,979.09 μs 25.005 μs 18.080 μs 4,972.77 μs baseline - - - - NA
Vigilance_RemoveComponent RemoveComponent 1000 19.01 μs 0.339 μs 0.224 μs 19.01 μs 4.13x faster 0.06x - - - - NA
Flecs_RemoveComponent RemoveComponent 1000 78.53 μs 0.969 μs 0.641 μs 78.48 μs baseline - - - - NA
Vigilance_RemoveComponent RemoveComponent 100000 1,851.47 μs 21.683 μs 15.678 μs 1,846.18 μs 4.35x faster 0.20x - - - - NA
Flecs_RemoveComponent RemoveComponent 100000 8,053.37 μs 485.867 μs 379.333 μs 7,863.02 μs baseline - - - - NA

Components

IterationCount=12 WarmupCount=4

Method Categories EntityCount Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Vigilance_Get Get 1000 2.895 μs 0.0205 μs 0.0160 μs 9.02x faster 0.19x - NA
Flecs_Get Get 1000 26.103 μs 0.7103 μs 0.5546 μs baseline - NA
Vigilance_Get Get 100000 292.743 μs 4.6243 μs 3.0587 μs 7.86x faster 0.14x - NA
Flecs_Get Get 100000 2,299.945 μs 43.9585 μs 34.3199 μs baseline - NA
Vigilance_Has Has 1000 1.967 μs 0.0324 μs 0.0253 μs 11.43x faster 0.16x - NA
Flecs_Has Has 1000 22.476 μs 0.2487 μs 0.1798 μs baseline - NA
Vigilance_Has Has 100000 198.726 μs 1.8708 μs 1.2374 μs 11.36x faster 0.17x - NA
Flecs_Has Has 100000 2,257.874 μs 40.7766 μs 31.8357 μs baseline - NA
Vigilance_Set Set 1000 9.692 μs 0.1157 μs 0.0903 μs 3.95x faster 0.06x - NA
Flecs_Set Set 1000 38.313 μs 0.5953 μs 0.4304 μs baseline - NA
Vigilance_Set Set 100000 1,032.452 μs 16.6051 μs 12.9641 μs 3.74x faster 0.05x - NA
Flecs_Set Set 100000 3,858.435 μs 46.9038 μs 33.9145 μs baseline - NA
Vigilance_Write Write 1000 3.752 μs 0.0059 μs 0.0043 μs 6.00x faster 0.04x - NA
Flecs_Write Write 1000 22.499 μs 0.2383 μs 0.1723 μs baseline - NA
Vigilance_Write Write 100000 388.367 μs 2.7206 μs 1.6190 μs 6.64x faster 0.07x - NA
Flecs_Write Write 100000 2,576.779 μs 35.6940 μs 27.8675 μs baseline - NA

Queries

IterationCount=12 WarmupCount=4

Method Categories EntityCount IsFragmented Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Vigilance_OneComponent OneComponent 1000 False 724.1 ns 9.70 ns 7.02 ns 1.07x faster 0.01x - NA
Flecs_OneComponent_Each OneComponent 1000 False 778.2 ns 7.02 ns 5.07 ns baseline - NA
Flecs_OneComponent_Iter OneComponent 1000 False 778.0 ns 4.26 ns 3.08 ns 1.00x faster 0.01x - NA
Vigilance_OneComponent OneComponent 1000 True 733.4 ns 12.44 ns 8.99 ns 1.78x faster 0.03x - NA
Flecs_OneComponent_Each OneComponent 1000 True 1,307.6 ns 22.79 ns 15.07 ns baseline - NA
Flecs_OneComponent_Iter OneComponent 1000 True 1,318.5 ns 11.92 ns 8.62 ns 1.01x slower 0.01x - NA
Vigilance_OneComponent OneComponent 100000 False 68,198.0 ns 1,391.22 ns 1,086.17 ns 1.06x slower 0.02x - NA
Flecs_OneComponent_Each OneComponent 100000 False 64,281.5 ns 1,252.51 ns 977.88 ns baseline - NA
Flecs_OneComponent_Iter OneComponent 100000 False 63,701.1 ns 505.40 ns 334.29 ns 1.01x faster 0.02x - NA
Vigilance_OneComponent OneComponent 100000 True 68,190.7 ns 1,161.50 ns 768.26 ns 1.01x slower 0.02x - NA
Flecs_OneComponent_Each OneComponent 100000 True 67,473.6 ns 1,227.40 ns 958.27 ns baseline - NA
Flecs_OneComponent_Iter OneComponent 100000 True 65,604.9 ns 485.10 ns 378.73 ns 1.03x faster 0.02x - NA
Vigilance_ThreeComponents ThreeComponents 1000 False 562.4 ns 7.70 ns 5.56 ns 1.12x faster 0.02x - NA
Flecs_ThreeComponents_Each ThreeComponents 1000 False 627.5 ns 9.08 ns 7.09 ns baseline - NA
Flecs_ThreeComponents_Iter ThreeComponents 1000 False 544.5 ns 8.06 ns 4.80 ns 1.15x faster 0.02x - NA
Vigilance_ThreeComponents ThreeComponents 1000 True 573.2 ns 10.57 ns 8.25 ns 1.72x faster 0.03x - NA
Flecs_ThreeComponents_Each ThreeComponents 1000 True 988.4 ns 13.97 ns 10.10 ns baseline - NA
Flecs_ThreeComponents_Iter ThreeComponents 1000 True 1,128.7 ns 6.11 ns 4.42 ns 1.14x slower 0.01x - NA
Vigilance_ThreeComponents ThreeComponents 100000 False 53,911.0 ns 248.21 ns 164.17 ns 1.06x slower 0.01x - NA
Flecs_ThreeComponents_Each ThreeComponents 100000 False 50,717.4 ns 320.68 ns 231.87 ns baseline - NA
Flecs_ThreeComponents_Iter ThreeComponents 100000 False 42,881.7 ns 382.10 ns 276.29 ns 1.18x faster 0.01x - NA
Vigilance_ThreeComponents ThreeComponents 100000 True 54,354.6 ns 350.38 ns 253.35 ns 1.05x slower 0.01x - NA
Flecs_ThreeComponents_Each ThreeComponents 100000 True 51,735.4 ns 341.23 ns 225.70 ns baseline - NA
Flecs_ThreeComponents_Iter ThreeComponents 100000 True 44,842.1 ns 432.64 ns 337.78 ns 1.15x faster 0.01x - NA
Vigilance_TwoComponents TwoComponents 1000 False 1,021.2 ns 14.31 ns 10.35 ns 1.23x slower 0.01x - NA
Flecs_TwoComponents_Each TwoComponents 1000 False 832.9 ns 5.39 ns 3.90 ns baseline - NA
Flecs_TwoComponents_Iter TwoComponents 1000 False 827.1 ns 2.14 ns 1.55 ns 1.01x faster 0.00x - NA
Vigilance_TwoComponents TwoComponents 1000 True 1,019.0 ns 8.22 ns 5.94 ns 1.52x faster 0.01x - NA
Flecs_TwoComponents_Each TwoComponents 1000 True 1,543.9 ns 12.24 ns 8.85 ns baseline - NA
Flecs_TwoComponents_Iter TwoComponents 1000 True 1,780.1 ns 30.73 ns 20.33 ns 1.15x slower 0.01x - NA
Vigilance_TwoComponents TwoComponents 100000 False 95,300.5 ns 734.95 ns 573.80 ns 1.35x slower 0.01x - NA
Flecs_TwoComponents_Each TwoComponents 100000 False 70,676.7 ns 790.17 ns 571.34 ns baseline - NA
Flecs_TwoComponents_Iter TwoComponents 100000 False 70,955.5 ns 857.19 ns 669.24 ns 1.00x slower 0.01x - NA
Vigilance_TwoComponents TwoComponents 100000 True 95,137.7 ns 556.10 ns 330.93 ns 1.27x slower 0.01x - NA
Flecs_TwoComponents_Each TwoComponents 100000 True 74,788.1 ns 690.89 ns 539.40 ns baseline - NA
Flecs_TwoComponents_Iter TwoComponents 100000 True 75,442.8 ns 469.79 ns 366.78 ns 1.01x slower 0.01x - NA

License

Vigilance is licensed under the zlib License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
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.2.19 0 11/26/2026
Loading failed