Home

Awesome

<p align="center"> <img width=300" src="https://github.com/Pikachuxxxx/Fireworks-Engine/blob/master/fireworks%20logo.png"> </p> <h1 align="center"> Fireworks Engine </h1> <p align="center"> <h3 align="center">A Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping.</h3> </p> <p align="center"> <a href="#features">Features</a> | <a href="#building">Building</a> | <a href="#usage">Usage</a> | <a href="https://fireworks-engine.readthedocs.io/en/latest/">API/Docs</a> | <a href="#dependencies">Dependencies</a> <br/> </p> <p align="center"> <br/> <a href="https://github.com/Pikachuxxxx/Fireworks-Engine"><img alt="platforms" src="https://img.shields.io/badge/Platforms-Windows%20%7C%20Linux%20%7C%20macOS%20%7C-blue?style=flat-square"/> </a> <a href="https://github.com/Pikachuxxxx/Fireworks-Engine/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/github/license/Pikachuxxxx/fireworks-engine?style=flat-square"/> </a> <br/> <a href="https://github.com/Pikachuxxxx/Fireworks-Engine/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Pikachuxxxx/fireworks-engine?style=flat-square"/></a> <a href=""><img alt="size" src="https://img.shields.io/github/repo-size/Pikachuxxxx/fireworks-engine?color=FFA500&style=flat-square"/></a> <a href='https://fireworks-engine.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/fireworks-engine/badge/?version=latest' alt='Documentation Status' /> </a> <br/> </p>

About

Basically a HelloWorld but this time it's for an entire game engine.

Supporting

Stargazers repo roster for @Pikachuxxxx/Fireworks-Engine

If you like this project, please consider starring it on GitHub and Contribute code for the development.

<p> <h4>Do you love me even more ? </h4> <a href="https://ko-fi.com/pikachuxxx"> <img src="https://github.com/Pikachuxxxx/Pikachuxxxx/blob/master/kofi1.png" width="200"> </a> </p>

Ludum Dare 47

Updates

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

Features

Building

Windows :

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

Documentation

Find the comlpete documentation, API reference and examples usage here

Usage

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;
}

TODO

Demo of some games made using Fireworks Engine

Zapper

Rocky Docky

Dependencies