Skip to main content

Madnight Engine

AI Disclaimer

AI usage in this repository has been limited to tooling and documentation generation. AI was not used to author any engine code, however existing logic in some areas may have been refactored with AI assistance.

Madnight Engine is a reusable engine layer for PlayStation 1 homebrew, built on top of the psyqo / nugget framework. It's the engine behind Madnight Games' PS1 projects, open-sourced so anyone can build a game on top of it.

Early days

This engine is in an ALPHA state, however it is at the point where you should be able to at least get some form of 3D game working with it. My unreleased tech demo of Supermarket Sweep runs off of it. Pull requests with fixes and improvements are very welcome.

What it gives you​

  • Object & scene management — GameObject / GameObjectManager, plus a Camera with fixed, follow, and free-look modes
  • Rendering — an ordering-table-based Renderer with GTE-accelerated fog, ambient lighting, textured/Gouraud quads, and automatic subdivision of large polys
  • Collision & physics primitives — AABB and SAT (OBB) collision tests, raycasting against tagged game objects, and CD-baked collision meshes (.COLBIN)
  • Skeletal animation — quaternion-based skeletons and bone tracks (.ANIMBIN) driven by SkeletonController
  • Particles & billboards — a lightweight ParticleEmitter/Billboard system for sprite-based effects
  • UI — a GameplayHUD for on-screen text/sprites, and a Menu scene base class for interactive menus with configurable pad bindings
  • Audio — SPU-backed VAG sample playback via SoundManager, and MOD tracker music via ModSoundManager
  • Asset loading — CD-ROM archive loading via ArchiveHelper (CDRomHelper is deprecated), texture and mesh managers, all built around psyqo::Coroutine
  • Debug tooling — an in-game debug menu and a performance monitor HUD (FPS, heap usage, rendered object counts)

Where to go next​

Credits​

Huge thanks to the PSX.Dev Discord and Nicolas Noble for their help getting this engine off the ground and for all things psyqo / PS1 hardware.