How To Release Your Game

In this tutorial you will learn how to get the final version of your game

The Nero Render Engine

In the tutorial Create your First Project, you learn about the Nero Dev-Engine. When you create a new Game Scene you need to had your Scene to the Nero Dev-Engine in order to be able to manage it through the Engine Editor. In contrast, when you finish to build your game and want to release it, you have to set your Scene to the Nero Render Engine. The Render Engine is a lightweight engine whose sole purpose is to run you final game.

One particularity of the Nero Render Engine is the possibility to take a custom Loading Screen also called Startup Screen. This tutorial will not discuss the Startup Screen but it’s good to know it.

#include <Nero/engine/RenderEngine.h>

int main()
{
    nero::RenderEngine engine(1280, 720);

    engine.run();

    return 0;
}
#include <Nero/engine/RenderEngine.h>

int main()
{
    auto startupScreen = std::make_shared<LoadingScreen>();

    nero::RenderEngine engine(startupScreen, 1280, 720);

    engine.run();

    return 0;
}

Set Your Scene

It’s pretty simple to set your Game Scene to the Render Engine. You just have to call the method setScene with your Scene Class and the name of your game as parameters
engine.setScene<Game Class>(“Game Name”);
#include <Nero/engine/RenderEngine.h>
#include <Nero/scene/Scene.h>

class MyFirstGame : public nero::Scene
{
    public:
 
        MyFirstGame(nero::Scene::Context context): nero::Scene(context)
        {
 
        }
};

int main()
{
    nero::RenderEngine engine(1280, 720);

    //set your scene
    engine.setScene<MyFirstGame>(“my first game”);
  
    engine.run();
 
    return 0;
}

Switch between Dev & Render Engine

Very important : You cannot have the Dev-Engine and the Render Engine at the same time in main.cpp. Normally you start a new project with the Dev-Engine code in main.cpp. When you finish creating your game, you remove all the code in main.cpp and replace it with the Render Engine code. This is a really annoying process. To avoid doing that you can use a Macro and an if condition to switch between the two Engines.

In the code below we use a macro named GAME_READY_FOR_RELEASE to switch between the two Engines. When we set the value of the macro to zero the Dev-Engine is run and when we set a value different of zero the Render Engine is run.

//Create a Macro "GAME_READY_FOR_RELEASE"
//A value of 0 = false
//A value different of 0 = true
#define GAME_READY_FOR_RELEASE 0

#if GAME_READY_FOR_RELEASE == 0

    #include <Nero/engine/DevEngine.h>

    int main()
    {
        nero::DevEngine engine(1305);
            engine.addScene<MyFirstGame>("my first game");
        engine.run();

        return 0;
    }

#else

    #include <Nero/engine/RenderEngine.h>

    int main()
    {
        nero::RenderEngine engine(1280, 720);
            engine.setScene<MyFirstGame>("my first game");
        engine.run();

        return 0;
    }

#endif // GAME_READY_FOR_RELEASE

When using the Engine SDK you don’t have to do this yourself. If you use CodeBlocks and create a Nero Game – Full Project the Engine will create a macro named NERO_RENDER_ENGINE that handle this process. Contrary to the example above the macro NERO_RENDER_ENGINE is not created in the code and it does not have any value. The macro is integrated within CodeBlocks itself. From Codeblocks you can switch between the two Engines buy simply switching between Debug and Release. Debug will render the Dev-Engine and Release will render the Render Engine.

Package Your Game

Package your game, simply means copy all the necessary files in one folder. Once you have all the files in a folder, your game is completed, you can now share it with your friends or release it online on platforms like Steam.

Below is the content of the Adventure Scene Game that comes with the Engine SDK. The content is as follows.

  • 1 Application file
  • 5 Folders (config, log, Nero, resource, startup)
  • 19 DLL files

When comes the time to release you game you can follow the following steps.

  • Step 1 : Switch to the Render Engine and compile your project
  • Step 2 : Create a new empty folder with your game name, we’ll call that folder the Game Folder
  • Step 3 : Find and copy your game application file into your Game Folder. The application file can be found inside your project bin folder :  Engine SDK Folder/Projects/Your Project/bin/Release/application file.exe
  • Step 4 :  Find and copy the 5 folders into your Game Folder. The 5 folders can be found inside your project folder : Engine SDK Folder/Projects/Your Project/
  • Step 5 : Find and copy the 19 DLL files into your Game Folder. All the DLL are not necessary but we’ll take all of them for matter of simplicity. 17 of the DLL files can be found inside the Engine SDK Library folder :  Engine SDK Folder/Library/bin. For the 2 other DLL files, you can copy the ones inside the Adventure Scene Game : Engine SDK Folder/Games/Avanture Scene v0.4
  • Step 6 : Enjoy your game

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.