Skip to content

Intro to Programming in Crynn

Weston McNamara edited this page Mar 30, 2021 · 3 revisions

Example.cpp

Crynn contains a file called Example.cpp which showcases a basic example of getting Crynn up and running. It is found in the crynn/src directory. Opening the file should look something like this:

#include "Crynn.h"

using namespace crynn;

int main()
{
    Engine engine = Engine(800, 600, "Crynn Example"); //Creates a window and initializes Crynn
    engine.Run(); //runs the engines tick events
}

From the comments on the two lines, its fairly easy to understand what this code does. Running it should output a blank, 800x600 window with a title "Crynn Example".

What should I know about Crynn?

  • Crynn does not use an entity component system. It is inheritance based. This is likely to change sometime in the future, but for now it is completely inheritance based.
  • All entities inherit from the CrynnObject class.
Clone this wiki locally