Mibo.Raylib
4.1.0
See the version list below for details.
dotnet add package Mibo.Raylib --version 4.1.0
NuGet\Install-Package Mibo.Raylib -Version 4.1.0
<PackageReference Include="Mibo.Raylib" Version="4.1.0" />
<PackageVersion Include="Mibo.Raylib" Version="4.1.0" />
<PackageReference Include="Mibo.Raylib" />
paket add Mibo.Raylib --version 4.1.0
#r "nuget: Mibo.Raylib, 4.1.0"
#:package Mibo.Raylib@4.1.0
#addin nuget:?package=Mibo.Raylib&version=4.1.0
#tool nuget:?package=Mibo.Raylib&version=4.1.0
Mibo
Install the templates:
dotnet new install Mibo.Templates dotnet new mibo-2d -o MyGame cd MyGame dotnet run
NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.
Following that spirit, Mibo keeps it lean, just F# and the Elmish loop with a handful of commodities to get out of your way and let you enjoy the craft.
Mibo is an Elmish-based F# game framework with two interchangeable backends — raylib-cs and MonoGame (DesktopGL/OpenGL and WindowsDX/DirectX) — designed to allow developers to write games using familiar MVU patterns for all kinds of game genres and sizes.
Mibo aims to solve 80/20 of use cases for enabling developers to focus on game logic rather than boilerplate code, providing guidelines and architecture for structuring game code, handling input, rendering, asset management, and time management among others.
What's in the box?
- Elmish runtime (MVU loop) with
Cmd,Sub, optional fixed timestep, and frame-bounded dispatch - Input — raw input (
Keyboard,Mouse) + semantic mapping viaInputMap/ActionState - Assets — texture, font, sound, and model loading caches
- Rendering — Command buffer based rendering:
- 2D batch renderer with layers and multi-camera support
- 3D batch renderer with opaque/transparent passes and custom shader switching
- Escape hatches for custom GPU work
- Camera helpers with screen-to-world, orbit, and ray casting
- Layout — 2D procedural grid layout (
CellGrid2D) with platformer, top-down, and geometric primitives - Layout3D — 3D voxel-style grid layout (
CellGrid3D) with terrain, interior rooms, corridors, stairs, and procedural generation - Animation — sprite sheet slicing,
AnimatedSpritestate machines, and grid-based animation definitions - Input Mapper — Listen to raw input and map it to semantic actions
- Performance — zero-allocation hot paths: spatial grid queries return a single result array per call, and per-frame dictionary lookups, light merging, and render-pipeline bookkeeping allocate nothing
Getting started
Prerequisites:
- .NET SDK 8 or later
- A working OpenGL setup
dotnet --version
dotnet tool restore
dotnet restore
dotnet build
dotnet test
To build the docs site locally:
dotnet tool restore
dotnet fsdocs build
# or for live editing:
dotnet fsdocs watch
Samples
The samples are stored in a separate repository: Mibo.Samples.
You'll find examples of:
2D:
- PlatformerSample - A 2D side-scrolling platformer with procedural world generation, sprite animation, lighting, particles, and sound. Uses Mibo's Elmish architecture with
InputMap,AnimatedSprite,CellGrid2D, andLightContext2D.- Mibo.Raylib targeting Desktop OpenGL
- Mibo.MonoGame targeting DesktopGL (cross-platform)
- SpaceBattle - A turn-based tactical strategy game on a hex grid with fog of war, laser combat, particle effects, faction-based turns (Human + AI), and animated unit movement. Demonstrates complex game state management, hex grid spatial queries, and multi-phase turn resolution.
- Mibo.Raylib targeting Desktop OpenGL
- PingPong - A networked multiplayer Pong game with a client-server architecture over WebSockets. The server runs game logic and broadcasts state; the client renders locally and sends input.
- Mibo.Raylib Client
- Mibo.MonoGame Client
- dotnet app acting as a server running Mibo.Core's headless support
3D:
ThreeDSample - A 3D platformer with procedurally generated voxel terrain, PBR lighting, shadow atlas, 3D character animation, minimap overlay, and physics. Showcases Mibo's
Renderer3D,ForwardPbrPipeline, andAnimation3DState.- Mibo.Raylib targeting Desktop OpenGL
- Mibo.MonoGame targeting DesktopGL (cross-platform)
FPSSample - A first-person shooter featuring enemy AI, weapon systems, health management, and atmospheric lighting. Demonstrates Mibo's composable systems architecture with per-system sub-models, event-driven cross-system communication, and a
Systempipeline with snapshot barriers.- Mibo.Raylib targeting Desktop OpenGL
- Mibo.MonoGame targeting DesktopGL (cross-platform)
- Mibo.MonoGame targeting WindowsDX (Windows only, DirectX)
License
Mibo is distributed under the zlib/libpng License.
Built on
Mibo is built on top of:
- raylib — the cross-platform graphics library that powers the raylib backend's rendering, input, and audio layers
- raylib-cs — the C# bindings that make raylib accessible from .NET
- MonoGame — the cross-platform framework that powers the MonoGame backend (DesktopGL/OpenGL and WindowsDX/DirectX)
Feedback
Issues and PRs are very welcome. If you're interested in using F# for game development beyond simple 2D games, Mibo aims to be a practical, batteries-included framework that scales with your ambition.
| 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. 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. |
-
net10.0
- FSharp.Core (>= 10.1.302)
- FSharp.UMX (>= 1.1.0)
- Mibo.Core (>= 4.1.0)
- Raylib-cs (>= 8.0.0)
-
net8.0
- FSharp.Core (>= 10.1.302)
- FSharp.UMX (>= 1.1.0)
- Mibo.Core (>= 4.1.0)
- Raylib-cs (>= 8.0.0)
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 |
|---|---|---|
| 4.5.0 | 50 | 8/19/2026 |
| 4.4.0 | 82 | 8/18/2026 |
| 4.3.0 | 96 | 8/16/2026 |
| 4.2.0 | 100 | 8/12/2026 |
| 4.1.0 | 82 | 8/10/2026 |
| 4.0.0 | 101 | 8/7/2026 |
| 4.0.0-rc-003 | 94 | 8/3/2026 |
| 4.0.0-rc-002 | 109 | 8/3/2026 |
| 4.0.0-rc-001 | 93 | 8/2/2026 |
| 4.0.0-beta-001 | 91 | 7/28/2026 |
| 3.3.0 | 103 | 7/26/2026 |
| 3.2.0 | 110 | 7/25/2026 |
| 3.1.1 | 105 | 7/23/2026 |
| 3.1.0 | 102 | 7/20/2026 |
| 3.0.0 | 98 | 7/18/2026 |
| 2.2.0 | 101 | 7/16/2026 |
| 2.1.0 | 108 | 7/11/2026 |
| 2.0.1 | 113 | 7/9/2026 |
| 2.0.0 | 115 | 7/9/2026 |
| 2.0.0-rc-003 | 99 | 7/7/2026 |
### Added
- **MonoGame 3D, Raylib 3D:** per-material transparency. Materials with `0 < Opacity < 1` render alpha-blended after all opaque geometry, sorted far-to-near by camera distance, with depth writes off for the sorted pass (depth test stays on) on both backends; `Opacity <= 0` renders nothing. Transparent geometry does not cast shadows and is excluded from the scene-depth pre-pass — the depth pass is binary — so `PostProcessWithDepth` effects (fog, depth-of-field) sample opaque-only depth on both backends. Instanced and `beginEffect`/`endEffect`-scoped transparent draws are not deferred: they render immediately and unsorted, so they may blend incorrectly against sorted transparents — prefer opaque materials for them.
### Changed
- **Breaking (behavioral): MonoGame 3D, Raylib 3D:** models or effects whose albedo/effect alpha is below 1 (e.g. a raylib albedo `Color.A` below 255, or a MonoGame `BasicEffect.Alpha`/`SkinnedEffect.Alpha` below 1) previously rendered fully opaque and cast shadows. They now render alpha-blended and no longer cast shadows or write scene depth. Games that relied on partially-transparent materials rendering as opaque casters must set `Opacity = 1` (raylib: `Color.A = 255`) to restore the previous behavior.
### Fixed
- **Core:** `worldToCell` on square (`Grid2DSpatial`), voxel (`Grid3DSpatial`) and the layer axis of 3D hex (`Hex3DSpatial`) grids now returns the cell that *contains* the world position. They previously snapped to the nearest cell corner, so any point in the second half of a cell (and, because of banker's rounding, the exact center of an odd-indexed cell) reported the next cell over. Hex 2D and the hex (XZ) plane of 3D hex are unchanged — those resolve to the nearest hex center as before.