BoidEngine is a high-level game engine abstraction built over Processing[1] utilizing an advanced Entity Component System (ECS)[2] for arbitrary virtual object interaction and behavior.
BoidEngine is not a full-stack implementation—it relies on Processing for graphics and is designed as a lightweight abstraction layer. Future enhancements (e.g., more support for user scripting, asset management, redesigned interface) are planned to further extend its capabilities.
-
Game Engine "Unity-like" abstraction:
Efficiently manages diverse game objects via a comprehensive abstraction layer built on Processing, leveraging primitive batching optimizations for rendering performance.
-
Robust ECS Architecture:
Implements a modular ECS design inspired by industry standards, favoring "Composition over inheritance".- Entities: Act as "game objects" in the scene, acting as attachment points for components.
- Components: Hold modular data and state for entities, allowing for arbitrary configuration and behavior.
- Systems: Process and govern behavior through a robust event-driven approach, ensuring scalable and maintainable game logic.
-
Integrated Boid Simulation Demonstration:
Features an interactive boid simulation[3] that showcases the engine’s capabilities. The demo supports several thousand boids—with multiple clans that can be spawned via left, right, or middle mouse clicks. -
Extensibility & Future Roadmap:
Although currently focused on core game object and ECS functionality, BoidEngine is designed with extensibility in mind. Planned enhancements include integrating a consistent and easy-to-use user scripting interface, paving the way for a future comprehensive game engine library built on top of Processing.
Video Demonstration: This interactive boid[3] demonstration showcases the engine’s capabilities by using the ECS game engine to handle all objects, interactions, and behaviors for a flocking simulation.
boid_demo.mp4
Below is the current repository layout. Each .pde file handles a distinct aspect of the ECS and is coupled with a brief description.
├── ProcessingMockup
│ ├── BoidSystems.pde // FUTURE: Implement formal script loader
│ ├── Component.pde // Defines base component
│ ├── Entity.pde // Defines base entity
│ ├── EntityBuilder.pde // Builder for entity-component construction
│ ├── EntityManager.pde // Entity Creation, Deletion, Handling
│ ├── EventManager.pde // Decoupled event system
│ ├── Event.pde // Defines base event
│ ├── ProcessingMockup.pde // "Main"
│ ├── RenderFunction.pde // Base renderer and concrete extentions
│ ├── SystemManager.pde // Manages and updates all systems
│ ├── Systems.pde // Defines base system
│ └── ... (additional files as needed)
├── resources
├── report
├── .gitignore
├── LICENSE
└── README.md
- Entity Component System (ECS) Architecture – Separates data (components) from functionality (systems) to keep entities lightweight.
- Builder Pattern – Easily assemble complex entities using the
EntityBuilderclass. - Event-Driven Architecture – Facilitates loose coupling between components and system logic.
- Strategy Pattern – Used in rendering, providing multiple render strategies for different entity types.
- Composition – Components attach to entities, avoiding deep inheritance hierarchies.
- Dependency Injection – Decouples object creation from usage by injecting required dependencies into components at runtime, enhancing modularity, flexibility, and testability.
- Processing 4.x
- Java Runtime Environment (JRE) 8 or higher
- Install Processing 4.
- Clone or download this repository to your local machine.
- Ensure the
ProcessingMockupdirectory structure remains intact.
- Open Processing.
- Select File > Open.
- Choose ProcessingMockup.pde from the
ProcessingMockupfolder. - Click Run or press Ctrl/Cmd + R.
Use the Processing command line tool processing-java to run the program:
"C:\Program Files\processing-4.x\processing-java" --sketch="%USERPROFILE%\path\to\repo\ProcessingMockup" --runprocessing-java --sketch="$HOME/path/to/repo/ProcessingMockup" --runThis project is licensed under the Mozilla Public License. See the LICENSE file for details.
Feel free to reach out or open an issue! Contributions and suggestions are welcome.
- Processing Main Website - Download, View documentation, and explore Processing.
- Entity Componenent System - ECS Wikipedia Overview.
- Boid Flocking Simulation Wikipedia - Boids Wikipedia Overview.
- Sebastian Lague Boid Demonstration - Inspiration for the project
