Mauve Lamp Engine – OpenGL/GLSL 3D Game Engine
The Mauve Lamp Engine is a data-driven 3D game engine.
When creating a 3D game engine, I took a lot of time to research the best approach. It’s a big task, so good planning is key.
For the engine I decided to make an Entity/Component based system rather than using inheritance as is traditional.
I also created a fairly sophisticated messaging system to enable any parts of the engine to communicate with each other, this has proven to be a very good decision as it has added a lot of flexibility.
All ‘gameplay’ functionality in the demo video is provided using the messaging system.
- Entity/Component design.
- Use of interfaces to strictly define how parts of the engine work.
- Resource manager that caches all resources after they have been loaded.
- .OBJ Model loading.
- JSON based dynamic scene creation – scenes can be reloaded on the fly with any changes instantly displayed.
- JSON based engine configuration.
- Multiple camera support, which can be bound to objects using the messaging system.
- OpenGL based graphics – uses Shaders and Phong lighting with attenuation.
- Textured meshes.
- Basic bone animation.
- Keyboard and mouse control through the messaging system.
- Assert library with built in null pointer asserts and other debug information, only used in debug mode.
- Text rendering using a texture and custom shader.
- Loading screen that shows exactly what is being loaded.
- Messaging system that allows any object to use a function to listen for messages.
- Objects can listen to multiple types of messages.
- Instances of objects are listeners so no static functions are used.
- Object instances are automatically removed as listeners when they are destroyed.
- Messages can be sent containing any data type, just a new message type has to be created.
- Message sending/receiving is all done on the stack.
The scene used is currently just a demo, but a full game is currently being developed using this engine.