Skip to content

Latest commit

 

History

629 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonoDreams


MonoDreams — waves & waning moon ASCII logo

A code-first ECS game engine powered by MonoGame

NuGet Version MIT License

Why MonoDreams

  • You own the engine source. Every system, every component lives inside your project. Distributed like shadcn, the source is yours to read and change.
  • Composable. The engine ships as 14 small source modules (foundation, rendering, physics, collision, level-loading, dialogue, audio, …). Use only what you need.
  • ECS-pure. Built on DefaultEcs. Components hold data, systems hold logic. Build performant games easily.
  • Easy learning curve. By using an ECS design, you can focus on only a few components and systems at a time without having to wrap your head around tons of concepts at once.
  • AI-agent friendly. Let AI do the code heavy lifting, so you focus on the vision, the art, and all the creative parts (say no to AI-slop, please?). Source lives where agents can read it. Each module ships with a module.json manifest, and the repo's docs/ directory captures engine invariants per domain, meaning your AI agent will know what to do by itself.

Quickstart

Install the CLI as a .NET global tool:

dotnet tool install -g MonoDreams.Cli

Scaffold a new project (this also installs the foundation module):

monodreams init MyGame
cd MyGame

Add the modules you need:

# A complete preset — procedural shape-driven runner
monodreams add --preset infinite-runner

# Or pick specific modules
monodreams add rendering camera physics collision

Build and run:

dotnet run

monodreams list shows every module and preset; --verbose adds deps and NuGet refs.

Both init and add spell "which project" the same way — --dir <path> (--project still works as a deprecated alias). Unrecognized options are rejected by name rather than mistaken for a module or a path:

$ monodreams add rendering --dryrun
error: unknown option '--dryrun' for `monodreams add`. Did you mean '--dry-run'?
       Run `monodreams add --help` for the options it accepts.

The 14 modules

foundation              required base — installed by `monodreams init`
├── rendering           unified draw stack: sprites + procedural meshes,
│   │                   culling, Y-sort, render targets, Camera class
│   ├── rendering-text  BitmapFont text + revealable typewriter
│   ├── camera          follow-target system (Camera class lives in rendering)
│   ├── cursor          textured cursor with hover types
│   ├── debug           collider/sprite overlays, screenshot capture
│   ├── level-ldtk      load LDtk-exported levels
│   └── ui              flexbox layout, builders, button primitives
│       └── dialogue    YarnSpinner integration
├── physics             velocity + gravity, usable without collision
│   └── collision       AABB + SAT detection, message-based responses
├── level-loading       LoadLevelRequest, EntitySpawnRequest plumbing
├── level-editor        in-game Edit run mode over the real pipeline (scaffold)
└── audio               one-shot SFX, loops, interruptible sources (desktop + web)

Project layout after init + add

MyGame/
  MyGame.csproj
  Program.cs              ← your game entry (scaffolded by `init`)
  monodreams.json         ← records installed modules
  MonoDreams/
    foundation/           ← copied from the engine
      Screen/, State/, Component/, System/, Input/, Util/, ...
    rendering/
    physics/
    ...

Everything under MonoDreams/ is yours. The CLI never reaches back into your code — monodreams add <new-module> only adds new files; modifications are always explicit.

Naming conventions

Browsing a module's source tells you what it contains at a glance:

  • Components end in Component (e.g. TransformComponent, VelocityComponent, DialogueStateComponent).
  • Systems end in System (e.g. HierarchySystem, GravitySystem, MasterRenderSystem).
  • Messages are publish-subscribe events flowing through the ECS world (e.g. CollisionMessage, LoadLevelRequest).

Two reference games

The repo's MonoDreams.Examples/ directory contains two games, each a clean subset of the module graph:

  • LDtk platformer — full stack with dialogue, UI, cursor (monodreams add --preset ldtk-platformer)
  • Infinite runner — procedural shapes, no level files, no UI, just physics + collision (--preset infinite-runner)

They're the proof that the module boundaries are correct: each example is exactly the union of its preset's modules.

Docs

Status

MonoDreams is alpha. Module boundaries and APIs may shift between minor versions — but because you own the source, the changes are diffs against your own code, not surprise breaking changes in a binary you can't see.

License

MIT. See LICENSE.

Special Thanks

This project is intended to support and enable the gamedev community, and to give back. Thanks to:

About

Monogame Daydreams

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages