Skip to content

Instantly share code, notes, and snippets.

@Pikachuxxxx
Created September 17, 2020 05:33
Show Gist options
  • Save Pikachuxxxx/1346bdc96712dd0830dc114a37582b50 to your computer and use it in GitHub Desktop.
Save Pikachuxxxx/1346bdc96712dd0830dc114a37582b50 to your computer and use it in GitHub Desktop.
A simple snippet of example game initialisation for Fireworks Engine
#include <fireworks/fireworks.h>
using namespace fireworks;
class ExampleTemplate : public Fireworks
{
private:
Window* window;
public:
ExampleTemplate()
{
}
~ExampleTemplate()
{
}
// Runs once per initialisation
void init() override
{
window = createWindow("Example Template", 800, 600);
}
// Runs once per second
void tick() override
{
}
// Runs 60 times per second
void update() override
{
}
// Runs as fast as possible
void render() override
{
}
};
int main()
{
ExampleTemplate game;
game.start();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment