Made with love, learning, and long sleepless nights.
PiEngine is a modular, component-based Java game engine built from scratch for 2D and (eventually) 3D games. It was created as a college project with a focus on learning, customization, and full control over the game development pipeline.
Comprehensive documentation is available in the docs/ folder. It covers:
- Math utilities (Math)
- GameObject/entity system (GameObject)
- Components (Components)
- Core engine systems (Core)
- Rendering pipeline (Render)
- Engine internals (Engine)
- Editor features (Editor)
- Asset and texture management (Manager)
- Scripting and runtime compilation (Scripting)
- Utility classes (Utils)
Each section includes function/property tables, usage examples, best practices, and cross-references. Start with docs/README.md for an index of all docs.
Acknowledgment
Much of the documentation for PiEngine was generated with the help of GitHub Copilot (AI), under the supervision and review of the core developers (Shri Hari (TanPi) and Gunavarthan). As a small team with limited time, we used AI tools to accelerate the writing process and ensure comprehensive, high-quality docs for the community. All content was checked and curated by us.
- Component-based architecture (just extend
Component) - Built-in ImGui editor (Scene view, Game view, Inspector)
- Node-based rendering pipeline with external GLSL shader support
- Modular JSON-based scene saving and prefab system
- Hot-loadable components (runtime script loading)
- Input abstraction system
- Asset loader for 2D sprites/images
- Fully open-source under MIT License
Pi-Engine/
├── src/
│ └── main/
│ └── java/
│ └── org/PiEngine/ # Core engine code
├── resources/
│ ├── shaders/ # External GLSL shaders
│ └── Test.json # Sample scene
├── docs/ # Engine documentation (see above)
├── build.gradle # Gradle setup
- Java 17 or newer
- Gradle
- Windows (tested; Linux/Mac support unverified)
git clone https://github.com/ItsTanPI/Pi-Engine.git
cd Pi-Engine
./gradlew runlternatively, run the Main.java file from your IDE.
To create a new component, extend the Component base class and implement your logic. Components are automatically serialized and can be hot-loaded during runtime.
Scenes are saved as hierarchical JSON files. Prefabs are supported by saving a scene and instancing it as an object. Object references are path-based (e.g. /main/player/hand/weapon).
Example: resources/Test.json
- Node-based render passes (input/output images and shaders)
- Uses external GLSL shader files (
resources/shaders/) - Basic passes available; system is designed to be extended easily
- Built with future 3D support in mind
- Physics system
- 3D model import (GLTF/OBJ)
- Scene transitions
- UI system
- Audio support
- Cross-platform testing
- Scripting (interpreter-based)
- Vulkan + C++ rewrite in the future
PiEngine is a personal and collaborative project created with dedication, curiosity, and lots of late nights.
Developed by:
We started this project as part of our college work, and it became a dream journey into game engine development. This engine represents our first step toward learning how real engines are built — and we’re excited to keep improving it with the help of the open-source community.
This project is open-source and we welcome contributions. If you're interested:
- Fork the repository
- Make your changes
- Submit a pull request
We (the original developers) will review and merge contributions. The goal is to build a community-driven, custom game engine like Blender or Godot.
This project is licensed under the MIT License. See the LICENSE file for details.

