Madnight Engine
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.
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 aCamerawith fixed, follow, and free-look modes - Rendering — an ordering-table-based
Rendererwith 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 bySkeletonController - Particles & billboards — a lightweight
ParticleEmitter/Billboardsystem for sprite-based effects - UI — a
GameplayHUDfor on-screen text/sprites, and aMenuscene base class for interactive menus with configurable pad bindings - Audio — SPU-backed VAG sample playback via
SoundManager, and MOD tracker music viaModSoundManager - Asset loading — CD-ROM archive loading via
ArchiveHelper(CDRomHelperis deprecated), texture and mesh managers, all built aroundpsyqo::Coroutine - Debug tooling — an in-game debug menu and a performance monitor HUD (FPS, heap usage, rendered object counts)
Where to go next
- New to the engine? Start with Getting Started.
- Working with Blender-exported assets? See the Asset Pipeline Guides.
- Looking up a class or function? Jump to the API Reference.
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.