Mibo 1.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mibo --version 1.5.0
                    
NuGet\Install-Package Mibo -Version 1.5.0
                    
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="Mibo" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mibo" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Mibo" />
                    
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 Mibo --version 1.5.0
                    
#r "nuget: Mibo, 1.5.0"
                    
#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 Mibo@1.5.0
                    
#: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=Mibo&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Mibo&version=1.5.0
                    
Install as a Cake Tool

Mibo

Mibo is a lightweight, Elmish-inspired micro-framework for F# that helps you build games on top of MonoGame (the underlying game framework). It’s designed to stay fun for small games while still providing an upgrade path for bigger projects (ARPG/RTS-style complexity) without forcing you to rewrite your engine.

Key ideas:

  • Keep update pure (MVU)
  • Submit render commands to a RenderBuffer in view
  • Use explicit boundaries (tick ownership, phases, snapshot barriers) when scaling up

If you prefer learning by example, check out the working sample projects:

  • samples/2DSample (2D sample)
  • samples/3DSample (3D sample)

What’s in the box?

  • Elmish runtime for MonoGame games (MVU loop)
    • optional fixed timestep support
    • optional frame-bounded dispatch for stricter frame boundaries
  • Input (raw input + semantic mapping / rebinding-friendly)
  • Assets (loading + caching helpers)
  • Rendering
    • 2D SpriteBatch renderer (layers + multi-camera amenities)
    • 3D renderer with opaque/transparent passes + multi-camera amenities
    • Sprite3D “90% path” for unlit textured quads and billboards
    • escape hatches (DrawCustom) when you need custom GPU work
  • Camera helpers + culling utilities

Documentation

The docs live in docs/ and are intended to be the authoritative reference.

Start here:

  • Architecture
    • Elmish runtime: docs/elmish.md
    • System pipeline (phases + snapshot): docs/system.md
    • Scaling ladder (Simple → Complex): docs/scaling.md
  • Core services
    • Input: docs/input.md
    • Assets: docs/assets.md
  • Rendering
    • Overview / composition: docs/rendering.md
    • 2D: docs/rendering2d.md
    • 3D: docs/rendering3d.md
    • Camera: docs/camera.md

Getting started

Prerequisites:

  • .NET SDK 10
  • A working OpenGL setup (MonoGame DesktopGL)

From the repo root:

dotnet --version
dotnet tool restore
dotnet restore
dotnet build
dotnet test

Templates

Mibo provides project templates to get you started quickly.

Install the templates:

dotnet new install Mibo.Templates

Create a new project:

# 2D Game
dotnet new mibo2d -n My2DGame

# 3D Game
dotnet new mibo3d -n My3DGame

# Multi-Platform (Desktop, Android, iOS)
dotnet new mibo-multi -n MyMultiPlatformGame

Run the samples

2D sample:

dotnet run --project samples/2DSample/MiboSample.fsproj

3D sample:

dotnet run --project samples/3DSample/3DSample.fsproj

Content pipeline tooling

This repo uses local dotnet tools (see .config/dotnet-tools.json) for MonoGame content:

  • mgcb / mgcb-editor-*

If you need to edit a content project:

dotnet tool restore
# Run the editor appropriate for your OS
dotnet mgcb-editor-linux 
# or dotnet mgcb-editor-windows / dotnet mgcb-editor-mac

Build the documentation site (optional)

The repo uses fsdocs-tool.

dotnet tool restore
dotnet fsdocs build

To watch locally while editing:

dotnet tool restore
dotnet fsdocs watch

Repo structure

  • src/Mibo — the core framework library
  • src/Mibo.Tests — unit tests
  • src/Templates — project templates source
  • samples/2DSample — 2D sample game
  • samples/3DSample — 3D sample game
  • docs/ — documentation source

Feedback welcome

If you’re interested in using F# beyond simple 2D games—while still staying in the MonoGame ecosystem—issues and PRs are very welcome.

Product 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 was computed.  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. 
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
1.6.0 113 2/8/2026
1.5.1 100 1/29/2026
1.5.0 105 1/25/2026
1.4.0 96 1/20/2026
1.3.0 100 1/19/2026
1.2.0 104 1/11/2026
1.1.0 102 1/10/2026
1.0.1 99 1/9/2026
1.0.0 101 1/9/2026

### Added

- Rendering: **Enhanced 2D Render Pipeline**. Integrated a multi-pass post-processing system in `Batch2DRenderer` supporting global effects: **Vignette**, **Bloom**, and **Color Grading (3D LUT)**.
- Rendering: **Selective 2D Effects**. Added support for per-batch shader effects using the `SetEffect` command, enabling targeted effects like grayscale on specific entity groups.
- Rendering: **Render Target Pooling**. Introduced `IRenderTargetPool` to efficiently manage intermediate buffers during complex 2D post-processing passes, reducing allocation overhead.
- Rendering: **Layered Compositing**. Added `FinalBlendState` to `Batch2DConfig` to allow 2D layers (including post-processed ones) to composite cleanly over previous 3D or 2D scenes.
- Rendering: **Tiled 2D Lighting System**. Added GPU-accelerated point lighting with screen-space tile binning for efficient multi-light support.
- Rendering: **2D Dynamic Shadows**. Integrated a polar/orthographic shadow atlas system for point and directional lights, supporting soft shadows and occluder segments.
- Rendering: **High-Performance 2D Particles**. Repurposed `BillboardBatch` for 2D space, enabling GPU-accelerated particle systems with rotation and custom UVs.
- Rendering: **2D Primitive Batching**. Added `DrawLine2D`, `DrawRect2D`, and `DrawCircle2D` commands using `LineBatch` for efficient shape rendering.
- Rendering: `PointLight2D` struct with position, color, intensity, radius, and falloff properties.
- Rendering: `DirectionalLight2D` struct with direction, color, and intensity properties for global lighting (e.g., sun/moon).
- Rendering: `Lighting2DConfig` for enabling/disabling 2D lighting with configurable ambient color, tile size, and max lights per tile.
- Rendering: `buffer.PointLight`, `buffer.DirectionalLight`, and `buffer.Occluder` fluent APIs for submitting lighting data to the 2D render pipeline.
- Rendering: Screen-space light transformation for correct world-to-screen light binning when using cameras.
- Shaders: `lighting.fx` and `grayscale.fx` implement the Tiled Lighting Contract with normal map support and light clamping.
- DSL: Updated `sprite` and `text` computation expressions for Improved performance via direct struct-based command submission.

### Fixed

- Rendering: Corrected rendering state management in `Batch2DRenderer` to fix "accumulation trails" by ensuring render targets are set before clearing.
- Rendering: Improved `Batch2DRenderer` to always clear internal pooled targets to `Transparent`, preventing garbage data from persisting across frames while still allowing background preservation via `ClearColor: ValueNone`.
- Rendering: Fixed winding order in `BillboardBatch.draw2D` to prevent culling in 2D (Y-down) coordinate systems.
- Rendering: Improved `DrawParticles` robustness in `Batch2DRenderer` by explicitly handling `BasicEffect` property mapping and camera matrix propagation.