Fireworks Engine
A Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping.
Basically a HelloWorld but this time it's for an entire game engine.
- Checkout branch LD47 for my ludum dare submissoin using fireworks engine, a lot of experimental features were added during the jam that will soon be integrated into the engine.
Follow the public Trello Board for reature request and current development status.
Currently working on Core 3D rendering and extending the API.
Also see : Fireworks Engine update thread
- 2D rendering pipeline
- 2D Physics Engine (Box2D backend)
- Can render upto 60, 000 Sprites, textures using batch rendering
- Sprite Sheet Animations (can change frame or frame rate manually, supports 2 types of in-built animation modes [LOOP, PING_PONG])
- Simple and customisable math library
- TrueType Font Rendering (currently only supports (.TTF) UTF-8 characters)
- Easy to manage and customisable native scripting
- Simple API for faster development and customisation
- Simple Window and Input management System
- Huge custom Maths Library and a lot of utility functions
- Render textures and Frame Buffer objects
- 2D orthographic camera
- Suppports 2D and 3D Audio with an extensive API (OpenAL backend) (currenlty only reads .wav files)
- Component System (currently only has Rigidbody2D component)
- Basic primitive 3D Rendering using Batch rendering.
Windows :
- Use the Visual Studio Solution to build the engine and work with the Sandbox.
MacOS/Linux : change to the build folder and use the CMakeFile to generate the MakeFile and build the library using the Make command. (Make sure your resources and shaders folders are in the same direcotry as that of the executable)
mkdir build
cd build
#use this to build the library
cmake .. -DBUILD_STATIC_LIBRARY=true
make
#now remove the CMakeChache to generate the sandbox executable
rm -rf CMakeCache.txt
cmake .. -DBUILD_SANDBOX_EXEC=true
make
#Now run the exectubale (Just include the example file or your custom game headers in the SandBox.cpp)
./SandBox
Find the comlpete documentation, API reference and examples usage here
Checkout the example of Space Shooter game to get an understanding of the capabilites of the engine. Zapper.h
Here's an example to render a simple coloured square. simplebox.h
#include <fireworks/fireworks.h>
{
private:
Camera2D* camera;
Layer* layer;
public:
SimpleBox() { }
~SimpleBox()
{
delete layer;
}
void init() override
{
window = createWindow("Simple Box Example : Fireworks Engine", 800, 600);
camera = new Camera2D(mat4::orthographic(-16.0f, 16.0f, -12.0f, 12.0f, -1.0f, 1.0f));
Shader* basicShader = new Shader(".\\shaders\\basic.vert", ".\\shaders\\basic.frag");
BatchRenderer2D* batchRenderer = new BatchRenderer2D(camera, basicShader);
layer = new Layer(batchRenderer);
Sprite* box = new Sprite(vec3(0, 0, 0), vec2(4, 4), vec4(1, 1, 0, 1));
layer->add(box);
}
void tick() override { }
void update() override { }
void render() override
{
layer->render();
}
};
int main()
{
SimpleBox game;
game.start();
return 0;
}
- [x] Camera 2D
- [x] Render textures and Frame Buffer objects
- [x] Sprite Sheet Animations
- [x] TTF Font Rendering and font properties(position, color etc.)
- [x] 2D Audio (OpenAL backend)
- [x] Physics2D component (box2d physics engine integration)
- [x] Better and customisable font rendering
- [x] Audio system
- [x] 3D rendering + BatchRenderer3D
- [x] Camera 3D (Freefly, FPS, perspective etc.)
- Materials and Lights (2D and 3D)
- 2D + 3D primitive drawing utility function
- Event system
- 3D Physics
- ECS - entity component system
- Occlusion Culling
- Editor UI using ImGui
- SOIL, Freetype and glText, GLEW, GLFW, PNG, Zlib2, stb_image, OpenAL https://github.com/vallentin/glText), GLEW, GLFW, PNG, Zlib2