Nero Game Engine 1 Snippet Library

Welcome to the Nero Game Engine 1 snippet library, here you will found sound useful chunks of code

#include <Nero/engine/DevEngine.h>
//Forward declaration
class NewScene;
int main()
{
	nero_log("hello world");
    nero::DevEngine engine(1305);
        engine.addScene("new scene");
    engine.run();
    return 0;
}
//Scene class
class NewScene : public nero::Scene
{
    public:
        NewScene(nero::Scene::Context context): nero::Scene(context)
        {
            //Ctr
        }
};
#include <Nero/engine/RenderEngine.h>
//Forward declaration
class NewScene;
int main()
{
	nero_log("hello world");
	
    nero::RenderEngine engine;
    	engine.setScene("new scene");
    engine.run();
    return 0;
}

//Scene class
class NewScene : public nero::Scene
{
    public:
        NewScene(nero::Scene::Context context): nero::Scene(context)
        {
            //Ctr
        }
};
/*
    You need to define the macro NERO_RENDER_ENGINE
    With CodeBlocks, go to menu Project -> Build options ... -> #defines
    Add the macro under the #defines Tab
*/
#ifndef NERO_RENDER_ENGINE
    #include <Nero/engine/DevEngine.h>
    #include "AdventureScene.h"

    int main()
    {
        nero::DevEngine engine(1305);
            engine.addScene("AdventureScene");
        engine.run();
        return 0;
    }
#else
    #include <Nero/engine/RenderEngine.h>
    #include "AdventureScene.h"
    #include "LoadingScreen.h"
    int main()
    {
        auto startupScreen = std::make_shared();
        nero::RenderEngine engine(startupScreen);
            engine.setScene("AdventureScene");
        engine.run();
        return 0;
    }
#endif // NERO_RENDER_ENGINE

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Nero Games will use the information you provide on this form to be in touch with you and to provide updates and marketing.