Features |
Building |
Usage |
API/Docs |
Dependencies
Basically a HelloWorld but this time it's for an entire game engine.
If you like this project, please consider starring it on GitHub and Contribute code for the development.
- 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
- Can render upto 60, 000 Sprites, textures using batch rendering
- 2D Physics Engine (Box2D backend)
- 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.
- Experimental skeletal skin animation
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
Find more Examples in the Sandbox project 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>
using namespace fireworks;
class SimpleBox : public Fireworks
{
private:
Window* window;
Camera2D* camera;
Layer* layer;
public:
SimpleBox() { }
~SimpleBox()
{
delete layer;
}
// Runs once per initialization
void init() override
{
// Initialize the window and set it's properties
window = createWindow("Simple Box Example : Fireworks Engine", 800, 600);
// Initialize the Camera and set the Projection Matrix
camera = new Camera2D(mat4::orthographic(-16.0f, 16.0f, -12.0f, 12.0f, -1.0f, 1.0f));
// Create the Renderer using a shader and pass the cam onto which you wish to render
Shader* basicShader = new Shader(".\\shaders\\basic.vert", ".\\shaders\\basic.frag");
BatchRenderer2D* batchRenderer = new BatchRenderer2D(camera, basicShader);
// Pass a renderer to the layer to render the renderables in that layer using that renderer
layer = new Layer(batchRenderer);
// Now create and add the renderables to the layer
Sprite* box = new Sprite(vec3(0, 0, 0), vec2(4, 4), vec4(1, 1, 0, 1));
layer->add(box);
}
// Runs once per second
void tick() override { }
// Runs 60 times per second
void update() override { }
// Runs as fast as possible
void render() override
{
// Render the Layer
layer->render();
}
};
int main()
{
SimpleBox game;
game.start();
return 0;
}
- Camera 2D
- Render textures and Frame Buffer objects
- Sprite Sheet Animations
- TTF Font Rendering and font properties(position, color etc.)
- 2D Audio (OpenAL backend)
- Physics2D component (box2d physics engine integration)
- Better and customisable font rendering
- Audio system
- 3D rendering + BatchRenderer3D
- 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