Header menu logo Mibo

Mibo: A Functional Game Framework for F#

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 — no editors, no pipelines, no wizards. 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 a lightweight, Elmish-based game framework built on a backend-agnostic core with pluggable rendering backends. It brings the power of the Model-View-Update (MVU) architecture to game development, encouraging pure game logic and predictable state management — and lets you choose the graphics backend that fits your target platform.

The Mibo packages

Mibo is split into three packages so your game logic stays portable while the rendering backend stays swappable:

Mibo.Core          ← the shared core (Cmd, Sub, System, GameTime, Program, IRenderer,
                     GameContext, IInput/IInputMapper contracts, IAssetCache,
                     HeadlessProgram, Layout/Layout3D)
Mibo.Raylib        ← the raylib backend (host: RaylibGame, GLSL shaders)
Mibo.MonoGame      ← the MonoGame backend (host: MiboGame, HLSL .fx shaders)

The guiding rule: if it is a contract that the Program builder, a runtime host, the headless runner, or portable user code needs, it lives in Mibo.Core. Backend-specific implementations and any type that leaks a backend handle stay in the backend.

Backend

Host

Shaders

Best for

Mibo.Raylib

RaylibGame<'Model,'Msg>

GLSL

Cross-platform Desktop OpenGL; lean, no content pipeline

Mibo.MonoGame

MiboGame<'Model,'Msg>

HLSL (.fx → .mgfx)

Windows Desktop DirectX 11, plus OpenGL cross-platform via MonoGame

Both backends ship the same rendering surface: a 2D batch renderer and a 3D Forward PBR pipeline with a shadow atlas, post-processing, and built-in shaders — so your Draw/Draw3D view code is portable between them.

Getting Started

To get started, you need the dotnet SDK installed. The Mibo.Templates package includes raylib templates (mibo-2d, mibo-3d) and MonoGame templates (mibo-mg-2d, mibo-mg-3d, each with a shared library and DesktopGL/OpenGL, DesktopVK/Vulkan, and WindowsDX12/DirectX 12 thin clients):

dotnet new install Mibo.Templates
dotnet new mibo-2d -o MyGame
cd MyGame
dotnet run

A minimal program looks the same regardless of backend — only the host type and the package reference change:

open Mibo.Elmish

let program =
  Program.mkProgram init update
  |> Program.withConfig (fun cfg ->
      { cfg with Width = 1280; Height = 720; Title = "My Game"; TargetFPS = 60 })
  |> Program.withRenderer (fun () -> Renderer2D.create view)

// raylib:
let game = new RaylibGame<Model, Msg>(program)
game.Run()

// MonoGame:
// let game = new MiboGame<Model, Msg>(program)
// game.Run()

You can then start building your game using any of the following:

Samples

The samples developed for the initial Raylib version and the new MonoGame Samples are stored in their own repository. Mibo.Samples is the place to visit.

You'll find examples of

2D::

3D:

Why Mibo?

Traditional game engines often rely heavily on complex object hierarchies, vendor specific tooling and no specific architecture guidance. Mibo offers an alternative:

Built on

Mibo is built on top of:

Type something to start searching.