Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Nero Game Engine  (Read 133962 times)

0 Members and 4 Guests are viewing this topic.

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #30 on: September 26, 2017, 08:33:34 pm »
Missing DLLs

I've forgotten to add GCC DLLs. If you don't have the GCC compiler installed, you won't be able to run the Engine. Thank you for pointing that out Ruckamongus, as you mentioned it's possible to link them statically, but I prefer to share the DLLs.

There is the download link : Missing DLLs

? ?
It'd be cool if you had saving/loading working so you could include a complete project.

I don't get what you mean here. If it's about Save and Load your Scene in the Engine, it works fine now.

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #31 on: October 08, 2017, 03:34:05 pm »
When will the Source Code be released ?

Hi everyone, how do you do !

Many people have beeen asking for the Source Code, so I wanted to let you know about it.

The Code will be available after the Engine First Release. After that first release, I will work on the Code in order to reorganize it, add comments there and there and make it more clean. I can't give the exact time, but I may estimate that to three months.

As soon as the Code will be on Github, I'ill make a post to prevent you. Also from now, you can find the link to the repository in the Footers of my posts.

Howtos

I've been busy those days so I did not get some time to continue the Howtos. I will complete the remaining ones the next week.
« Last Edit: May 06, 2022, 04:08:24 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #32 on: October 14, 2017, 11:10:36 am »
How to use the Engine 03 : Play with Meshes !    |    Part 2 : Mesh and Meshed Object Properties !

Hi everyone, how are you doing !  In this second Howto on Meshes we'll talk about some Mesh properties.

Mesh Object and Meshed Object

First of all, I hope that, both words are not confusing you, I don't think that munch before to choose my Classes names, I just took the first ones that come to my mind  ;D.

There is a little reminder
  • Mesh Object = Mesh
  • Meshed Object = Mesh + Sprite

Both Objects carry a Mesh and that Mesh can be configured to suit your needs.

On the Left of the Engine, along with the Sprite Tab and Color Tab, you get the Mesh Tab, we gonna play with it. The properties below work the same way on both Objects types, you just have to select them and apply the one you want.

Fixed Rotation

This one is pretty easy, when activated, your Object will never rotate even if it stand on a sloping ground or if it get hit by a projectile.

Is Sensor

This is one of the Coolest feature of Box2D. When talking about Box2D the first thing people see is the "Physics Simulation" Part of the library. But the thing is, if you set all your objects to Sensor mode, you end up with a powerfull "Collision Detection Engine" without any Physic Simulation. This let you free to implement your own Physic Simulation.

Object in Sensor Mode stay affected by Gravity, but that's all, they don't participate to the "Physics Simulation". that's make them great to build your game logic. You can use them to check if your Character has reached a certain area and then trigger a specific event. When i'll build my game prototype, i'll show how you can use Object in sensor mode to do great things.

Allow Sleep

This property is activated by default, and it should stay like that. It will help reduce the computation operated by Box2D.

Density | value : [0 - 100]

What is Density ? in simple words it's a short of relation between an Object Volume and its Weight. For the same volume, the same Object will get a higher weight if its Density get increased. In your game, that will make your objects more stronger.

To check that, create two identical Polygon Meshes, let's call them Left_P and Right_P. Now using the mouse, take Left_P and throw it on Right_P. Right_P will get ejected easly, now increase its density to 100 and throw Left_P on it again, you will see that now Right_P is more resistant or stronger.

Also the Density don't affect the way Gravity affect the Object. Two Ojects with the same volume, and different density (e.g different weight) will be affected the same way by the gravity (in the absence of air resistance to be more accurate). Fo more detail on that go check Newton Laws.

Friction | value : [0 - 10]

What is Friction ? If you don't want your Object to slide on a sloping ground just increase its Friction. If you want your Object to slide on any surface like if it was ice set the Friction to 0.  For more technical explication you can Google Friction Force

Internally Box2D use a range value of [0 - 1], In order to avoid using decimal, the Nero Engine use the range value of [0 - 10].

Restitution | value : [0 - 10]

What is Restitution ? Increase Restitution will allow your Object to bounce more easly. For more technical explication you Google Coefficient of restitution

Internally Box2D use a range value of [0 - 1], In order to avoid using decimal, the Nero Engine use the range value of [0 - 10].

Gravity Scale | value : [0 - 10]

If you want to change the way your Objects are affected by gravity, this is the property to configure. Set the value to 0 will allow your Object to float on the air. Increase the value, will make your object fall down more quickly.

The Engine Physics Default settings

When using Box2D the first time, The first thing you notice, is that the physics simulation is slow. According to my experience there are three Settings to configure in order to fix that.

  • The Pixel / Meter Ratio used
  • The Box2D World Computation Freqency
  • The Box2D Bodies Gravity Scale

The Nero Engine use a Pixel / Meter Ratio of 30. It means that 30 pixel on your canvas will be equivalent to 1 meter for Box2D. This value is hard coded in the Engine, I may consider make it configurable in the next releases.

The Default Computation Frequency is set to 30 Hertz, you can see it on the Right of the Engine. Fill free to play with this value.

The Engine also use a default Gravity Scale of 3 for all Object. I've tried several values and comes up with this one, it's the most important parameter between the three. the computation Frequency coming in second position.

By adding more and more Dynamic object onto the Canvas, the Physic simulation may become slow, so, remenber to play with those Three parameters in order get the Simulition Speed that suit you.

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #33 on: October 14, 2017, 12:14:31 pm »
How to use the Engine 04 : Workflow !

Hi! again, not sure that the title is the right one, but we'll stick with it. In this Howto we'll talk about some Util Actions that you may used every time during the process of creating a game.

Select Scene

The Engine is able to menage several Scenes, each one having its own directory under the NERO/ folder. On the Right of the Engine you have a selection button that let you choose the scene you are going to work on.

You can also use Numpad_1 and Numpad_3 to switch between the available Scenes.

What about Create Scenes ?

I purposely avoid adding a button to create new Scenes. This will be available when Lua will be added as a scripting language. The thing is that, currently you have to access your Scene Class in order to build your game logic.

You create a new Scene by declaring a new Class and then adding it to the Engine.

Quote
Class MyScene : public nero:DevScene
{
  //Retrieve all Objects you created with the Engine and Build your game logic here
}

Quote
nero:DevEngine engine;
engine.addScene<MyScene>("My Scene Name");
engine.run();

You can add any number of Scenes, All the Scenes added will be available on the Scene selection button.

Load Scene

When the Engine start, it tries to load all the scene that have been added. For that it parses the NERO/ folder and check for your Scenes JSON file. If the JSON file doesn't exist it mean that the Scene as never been Saved and you end up with a empty Canvas.

The Load_Button on the Right on the Engine allows to load the content of your Scene JSON file at any time.

Load a Scene with the Load_Button can be Undo or Redo like as any other Action, so don't be afraid to lost your work, after accidently pressed the Load_Button.

Save Scene

The Save_Button allows to save your Scene at any time, this will overwrite your Scene JSON file.

In the next releases I'll add the CTRL + S shorcut to save the Scene.

Undo Redo Actions

On top of the Canvas you have two buttons to Undo and Redo your Actions. the |<--| button will Undo actions, and the |-->| will Redo Actions.

You can also use the the Left_Arrow and Right_Arrow keys to achieve the same thing.

Undo and Redo actions work in the Engine Object_Mode and Mesh_Mode.

Play Scene

When your are done creating some Objects you can Generate your Game Scene by pressing the Play_Button locate on top of the Canvas.

Using the keyboard you can also press the Return_Key.

The CTRL + Spacebar allows to switch to Play_Mode but it does not Generate the Game Scene like the Play_Button

Pause Scene

When in Play_Mode you can Pause the Scene using the Pause_Button or the keyboard P key or the Left_Arrow key.

Step Scene

When in Play_Mode you can Step the Scene using the Step_Button or the Right_Arrow key.

Reset Scene

When in Play_Mode you can Reset the Scene using the Reset_Button or the keyboard R key or the Up_Arrow key.

Quit the Engine

The Quit_Button button allows to close the Dev Engine. In the next releases I will configure it to Save all Scenes before to close the Engine.
« Last Edit: May 06, 2022, 04:08:47 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #34 on: October 14, 2017, 01:19:41 pm »
How to use the Engine 05 : Use your own Resources !

Ones may use the word Asset, other like me may use the word Resource. So what is it? Resources are Textures, Sounds, Musics, Shaders and Fonts you are going to use to build your game. Manage Resources is an important point when building a game. In order to simplify things, the Engine take care of every. Most of time, if you need to use a resource, you'll just have to copy and paste it in the right sub-directory under the Resource/ folder.

The Name of your resource will be its Id in the Engine, so for a given Category of Resources, you can't give the same name to two different resources.

When the engine start, it parses the Resource/ directory and loads everything. If it founds a problem it throws an Exception and don't start. So, if you get the Engine start without any trouble be ensured that all resources have been loaded correctly.

The Engine use the Sansation Font locate at Resource/Font/Sansation.ttf for its own Text rendering, This is the only resource that must be always available, for others, you can delete them or replace them with what you want.

Retrieve Resources in the Code is pretty simple, there is some examples.

Quote
auto myFont = m_ResourceManager.Font.get("Font Name");
auto myTexture = m_ResourceManager.Texture.getTexture("Texture Name");
auto myTexture = m_ResourceManager.Texture.getSpriteTexture("Sprite Name"); //Return the Texture that contains your Sprite
auto mySound    = m_ResourceManager.Sound.get("Sound Name");
auto myMusic    = m_ResourceManager.Music.get("Music Name");
auto myShader = m_ResourceManager.Shader.get("Shader Name");


End of this First Series of Howtos

The Series of Howtos comes to its end. It was pretty fun for me to write them. I hope you have enjoyed reading them. I've tried to cover most of the features that have been implemented until now.

If you have been able to play with the Engine, I'll be happy to see some screenshoots of the Scenes your have created.

For the Next Step of the Projet, I'll use efficiently my free time in order to Release the Engine as soon as possible.

Have a good day   ;D
« Last Edit: May 06, 2022, 04:08:36 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #35 on: November 19, 2017, 02:41:07 pm »
Engine Update

Collision Management | Part I : Collision Filtering

I guys, how are you doing  ;D. Today we gonna talk about collision, let say you have a game and you want certain objects to collide and others not, this post will show how easy it is to achieve that with the Nero Game Engine.

The nero::CollisionRule Class

Box2D offers two ways to filter collisions, filter collisions just means define which object can collide with which one. The first method use Category_Bits and Mask_Bits, the second use Goup_Indexs. Those are Box2D Fixtures properties. I'm not going to describe those two technics, the only thing to know it's the first one offers more flexibility, but it is pretty difficult to implement. The nero::CollisionRule Class use Category_Bits and Mask_Bits and it allows you to filter collision in the easiest way you could think.

In Practice

Using the Dev_Engine Interface you can provide a Category to any Object. Categories are represented by a String so you can write whatever you want (I plan to use regex to limit thing, but that's not for now).

For instance let say we have the following categories : player, friend, enemy, ground. All you have to do, is to write something like that :

nero::CollisionRule rule;
   rule.canCollide("player", "ground");
   rule.canCollide("friend", "ground");
   rule.canCollide("enemy", "ground");
   rule.canCollide("player", "enemy");
   rule.canCollide("friend", "enemy");
   rule.canCollide("enemy", "enemy");
rule.apply(m_RootObject);


the m_RootObject is the root object of your Scene Object TreeNode, it's a member attribut of your Scene. The apply() method, parse your Object Tree, detect all nero::PhysicObject and configure the Category_Bits and Mask_Bits in each Box2D Fixtures.

FullCollision and NoCollision

the Class also offers those two convenient methods

rule.fullCollision(m_RootObject);      // everything collide
rule.noCollision(m_RootObject);           // nothing collide

Limitation

You can have up to 16 categories, this limitation comes from Box2D itself.

This limitation of 16 categories only concern collision filtering and the nero::CollisionRule class, the Nero Engine itself, allows you to define an infinite number of categories, depending on your game, you may have to use categories for something else than collision.

Change Collision Rules on the fly

You can change the collision rules at any moment in your game, let say your player just picked up a potion that allows him to go through walls, all you have to do, is to create a new instance of the nero::CollisionRule class or call its clear() method, define the new collision rules and call the apply() method. A better practice would be to pre-define several collision rules, and then apply them whenener you want.


Collision Management | Part II : Collision Handling

Handle collisions is one the most interresting part in game programming, this is where you can say I want that object to explode if it get touch my super missile  ;D.

Four methods : Begin, End, PreSolve, PostSolve

A nero::Scene offers four methods to handle collision.

void handleCollisionContactBegin(nero::Collision collision);
void handleCollisionContactEnd(nero::Collision collision);
void handleCollisionPreSolveContact(nero::Collision collision);
void handleCollisionPostSolveContact(nero::Collision collision);


Those four methods are called automatically when a collision occur. the nero::Collision object carries all information concerning the collision. For instance you can retrieve the two nero::PhyscicObject that are colliding like that:

auto objectA = collision.getObjectA()
auto objectB = collision.getObjectB()


if you want to check what objects they are, just retrieve the category (sf::string cat = objectA->getCategory()) or the name (sf::string name = objectA->getName())


More details on those four methods

In a previous post I have presented the four methods used by Box2D in order to process collisions, the four ones you are seeing here, is just a simplified version of the four methods provide by Box2D.

How do they work ?

The Begin method / handleCollisionContactBegin(nero::Collision collision), is called at the moment where two objects just collided. It means at the first moment of the collision. This is the method that you will use the most to process collisions.

After the two objects just collided, there will be a little period of time where they will be overlapping. During this overlapping phase the two methods PreSolve and PostSolve will be called alternatively and repeatedly. Those two methods may be useful in a game logic but for now I'm not going into more details.

After the overlapping phase, ours two objects are no longer colliding, so the End method / void handleCollisionContactEnd(nero::Collision collision), is called, that method just let us know that a collision just ended and give us the opportunty to do some stuffs.

That' all

That's all for collisions, Collisions allow you to add diversity in your game, you can use them in many ways, just let your imagination run free. I did not entered into details on how or when use collisions, I think the better way to anterstand collisions is to get our hand one it.

Next time

I'll make two others posts later today
« Last Edit: May 06, 2022, 04:09:01 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #36 on: November 19, 2017, 09:04:21 pm »
Engine update

ActionObject and Action

The concept

ActionObject and Action is a interface that aim to simplify the manipulation of your game objects. Instead of manipulate your objects directly you can encapsulate them in a ActionObject. the ActionObject is then able to register several Actions that you can perfom later at any time.

An Action is a just a class that must override the following method "void call(object)". My first idea is that Actions should be Functors (C++ Function Object), I've tried to override the "call operator" but didn't get the result expected, so I end up using the "void call(object)" instead. ActionObject and Action can be used to perform instant action like jump or dash, but they can also be used to perform long or infinite actions like controlling the trajectory of a moving platform.

In Practice

The following code is just a pseudo code, it let you get an idea of how to use ActionObject and Action.

class JumpAction : public Action
{
   call(Object)
   {
      // do some stuff with the object, like apply a impulse upward
   }
}

class DashAction : public Action
{
   call(Object)
   {
      // do some stuff with the object
   }
}

auto object = enigne.findObject("player"); // find object by name
ActionObject  my_player;
my_player.setObject(object);
my_player.registerAction<JumpAction>("jump"); // the name of the Action is given as argument, you can put what you want
my_player.registerAction<DashAction>("dash");

if(key J is pressed)
   m_player.callAction("jump");      // make your player jump
else if (key D is pressed)
   m_player.callAction("dash");      // make your player dash

Different types of ActionObject / Action

As it already been said the code above is just a spseudo code, the classes ActionObject and Action do not exist. Instead you have a pair of classes for each type of objects that is manipulable.

SimpleActionObject / ObjectAction      // handle a generic nero::Object
PhysicActionObject / PhysicAction       // handle a nero::PhysciObject
SpriteActionObject / SpriteAction       // handle a nero::SpriteObject
LayerActionObject /  LayerAction        // handle a nero::LayerObject
« Last Edit: May 06, 2022, 04:09:11 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #37 on: November 19, 2017, 09:32:52 pm »
Release of the source code in December

At this stage of development, I've implemented all the features that as been plan for the First release to be done. The Engine is still not ready to be used, but there is not much work left. I will begin the restructuration of the code in the next days. I may change some classes or methods name and change some implementations etc. The code will be on github in three or four weeks.

In the same time I will be developping my game prototype. I don't know how munch time it'll take but it's only when the prototype will be finished that the first release will be officially announced.

that's all, I wish you a good day  :).

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Nero Game Engine
« Reply #38 on: November 21, 2017, 08:31:35 pm »
Release of the source code in December

At this stage of development, I've implemented all the features that as been plan for the First release to be done. The Engine is still not ready to be used, but there is not much work left. I will begin the restructuration of the code in the next days. I may change some classes or methods name and change some implementations etc. The code will be on github in three or four weeks.

In the same time I will be developping my game prototype. I don't know how munch time it'll take but it's only when the prototype will be finished that the first release will be officially announced.

that's all, I wish you a good day  :).

Take your time, you're making such a piece of technology!
I would like a spanish/latin community...
Problems building for Android? Look here

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #39 on: November 25, 2017, 08:20:30 pm »
Hi DarkRoku12, you don't know how happy I was to read your comment

I would like to take this opportunity to thank all my readers, Thank you for reading my posts, it really encourages me to continue the project.

In the next weeks and months, I will take you in the development of my game prototype with a series of posts. It will be an occasion to learn a lot on game prototyping and you will dicover how the engine can be used in real scenario.

Finally the engine will be released when it will be ready, so you'll be able to try it  right away  ;D

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Nero Game Engine
« Reply #40 on: November 27, 2017, 07:11:48 am »
That's cool.

I'm polishing a full featured 2D engine soon, with SFML as its base. I have 3 years in that development, i don't release it becuase i'm finishing university and i don't have a lot of time.

But i know it is hard, i can recognize the very good job you have done!

Keep going, i'll looking forward it.
I would like a spanish/latin community...
Problems building for Android? Look here

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #41 on: February 04, 2018, 03:58:27 pm »
Source code released

Hi! here, how are you doing ! ;D

The Engine source code has been uploaded on github, you can check the link bellow
Nero Game Engine Repository

From now on, I will update the repository after each progress in the engine development.

Need Help for the build process !

I will be working on the build process with Cmake in the following weeks, but I'm not an expert in Cmake, I may checkout the cmake files of projects like  SFML or SFGUI to find my way, but it'll take me months before to come up with a proper build process. So if anyone can help I'll be very thanksfull   ;D;

Resource Pack ! Thank Kenney !

I've searched for some free resources over the internet and finally found those beautiful textures made by Kenney Vleugels. The resources are free for both  personnal and commercial use. The work of this guy is just great !

I've gathered some of those resoures on a github repository call Resource Pack, check the link bellow
Nero Game Engine Resource Pack

The goal of the resource pack repository is to provide you all the resources you'll need to start with the Engine. Over the time there will be more resources like music, sound, particule and also more texture.
« Last Edit: May 06, 2022, 04:09:25 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #42 on: February 04, 2018, 04:49:42 pm »
How is my game prototype doing !

I'm currently working on my game prototype, the objective is to simply test and improve the Engine. I'll be working on it all this month.

As for now I've implemented the following features.
  • Make the camera track my player
  • Move my player
  • Multi-Jump (double jump)
  • Dash
  • Moving platform
  • Go through Platforms when jumping from bottom
  • Make my player rotate to fit the ground slope, despite it is configured as Fixed_Rotation true
  • Remove objects at collision (It's like collecting coins or destroying enemies)



The Nero Game Tools Library

The NGT (Nero Game Tools) Library is a sub-project of this current project.  It's goal is to provide a set of tools that will allow to prototype a game in hours, or build a first version of a game in only 2 or 3 days.

The first version of this library will be composed of the tools use in my game prototype. I plan to provide this library as a header-only library.

The library will be based on the concept of Action and ActionObject object. In the video above the code that make my player move is the same that make the platform move. I've just built a Move_Action that I can provide to any Object. Therefor the NGT library will be a collection on Action and ActionObject ready to use, you just configure them and set it to any object in the Scene.

The Second Release will come soon

After finishing with my game prototype, I will publish the first version of the  NGT  Library and make a tutorial on how to make a game from start to end with the Engine.

Only after that I will add Sound Object and Animation Object to the Engine.
« Last Edit: May 06, 2022, 04:09:34 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #43 on: February 12, 2018, 02:06:17 am »
Adding Cmake to the project

Cmake is now available in order to build the Library. I've successfully built the engine as Shared and Static lib on a 32 bits Windows using Mingw. I will test the build in other platforms later.

The cmakelists file I've built is pretty minimal, I will update it later, when i'll have a better understanding of Cmake.

For reminder the Nero Game Engine use the following libraries:
  • SFML 2.4
  • SFGUI 0.3.1
  • Box2D 2.3.0
  • Boost 1.61.0 (filesystem and system)
« Last Edit: May 06, 2022, 04:09:43 pm by NeroGames »

NeroGames

  • Full Member
  • ***
  • Posts: 101
  • Build games is simple
    • View Profile
    • Nero Game Engine
    • Email
Re: Nero Game Engine
« Reply #44 on: March 08, 2018, 08:43:16 am »
Build the Nero Hello World

Hi everyone, how are doing  ;D.

In this post I'm going to show how to build and run the Engine, The goal will be to make the following snippet of code work.

#include <NERO/engine/DevEngine.h>

int main()
{
    nero_log("Nero game engine Hello World");

    nero::DevEngine engine;
    engine.run();
}
 

This tutorial will focus on Windows, CodeBlocks and MinGW, if you are familiar with other tools, I'm sure you will find your way out too. Also I will asume that you know a bit of Cmake GUI

Step 1 : Download the Sources

All the sources are available on github

Boost 1.61.0 : https://github.com/boostorg/boost
Box2D 2.3.0 : https://github.com/erincatto/Box2D
SFGUI 0.3.1 : https://github.com/TankOs/SFGUI
SFML 2.4.0 : https://github.com/SFML/SFML
Nero 0.7.0 : https://github.com/NeroGames/nero-game-engine

The Nero project use a specific version of the others libraries, you may try to use the latest version of the corresponding libraries, but for this tutorial I will stay with the specific versions in order to avoid any incompatibilities.

After downloading SFML, SFGUI, Boost and Box2D, you will have to checkout the sources in order to get the right version.

It's pretty easy. Here is a exemple with SFML

git clone https://github.com/SFML/SFML.git    // Download the SFML source code (latest version)
cd SFML                            // Move to the SFML source directory
git tag -l                            // Display all the available versions
git checkout tags/2.4.0                  // Switch the code to the version 2.4.0, the command is " git checkout tags/<tag_name> "

And there it is, you now have the SFML 2.4.0 version, you can do the same for Boost, Box2D, and SFGUI

Step 2 : Build the Sources

Build Boost

Let's begin by the easiest one, we are going to build only the system and the filesystem libs.

for that, move into the boost source directory and issue the following two commands one after another

./bootstrap.sh
./b2.exe --prefix=build --with-filesystem --with-system link=shared variant=debug,release threading=multi

The result of the build will be in the folder stage/lib

Build Box2D, SFML and SFGUI

Box2D, SFML and SFGUI can be build easly with Cmake GUI

SFGUI depends of SFML, if Cmake does not find SFML, you can define the Path option SFML_ROOT.

the sfml root directory should look like this
sfml_root_path/inlcude/SFML       //contains the sfml headers
sfml_root_path/lib                   //constains the sfml libs (.a files with MinGW)

Step 3 : Build Nero

After building Boost, Box2D, SFML and SFGUI you can now build the Nero project using Cmake GUI.

If Cmake does not find boost, you can define the Path option BOOST_ROOT

the boost root directory should look like this
boost_root_path/inlcude/boost       //contains the boost headers
boost_root_path/lib                 //constains the boost libs (.a files previously build)

If Cmake does not find SFML, you can Define the path option SFML_ROOT like for SFGUI

If Cmake does not find Box2D or SFGUI you will have to configure manually the following cmake options.

BOX2D_INCLUDE_DIR
BOX2D_LIBRARY_DEBUG                  
BOX2D_LIBRARY_RELEASE

SFGUI_INCLUDE_DIR
SFGUI_LIBRARY_DEBUG
SFGUI_LIBRARY_RELEASE

If you have built Box2D and SFGUI in Release and Debug mode, you can provide the two libs version, if not, providing either the Debug or Release libs will be enough.

Step 4 : Organise your Libs

When you build a library you can choose where the libs will be install. Libraries like Boost have default installation path, so cmake or any IDE or compiler can find them easily. Personnaly I use a custom folder call "Library" to store all my libs. It's easy to find them if I know they are all in one place. Choose the method that suits you the best.

In the next section I will assume that you have all the libs in a folder "Library" like this:

Library/include                               //contains all the libraries headers
Library/inlcude/SFML
Library/inlcude/Box2D
Library/inlcude/SFGUI
Library/inlcude/boost
Library/inlcude/json                            //   This one can be find in the Nero project source files, under the "extlibs" directory            
Library/inlcude/easyloggingpp                           // "extlibs" directory also

Library/lib                                             // contains all the libraries libs (.a files with MingW)
Library/bin                                              // conatains all the DLL files
Library/doc                                             // the libs doc

Step 5 : Link the lilbraries

Now that you have all the libs and DLL ready, you can create a new Project and make the following configurations.

On CodeBlocks, all of this is done in (Project --> Build Options)

activate the c++11 flag                  (Project --> Build Options --> Compiler Settings --> Compiler flags)
add the headers path "Libray/include"      (Project --> Build Options --> Search directories --> Compiler)
add the libs path "Library/lib"            (Project --> Build Options --> Search directories --> Linker)
add the dll path "Library/bin"            (Project --> Build Options --> Search directories --> Linker)

link all the libs                      (Project --> Build Options --> Linker settings --> Link libraries and/or --> Other linker options)

Step 6 : Mandatory directories

After linking the libs, there is one more thing to do, the Engine expect some directories and files to be available.

Resource/
Resource/Texture/
Resource/Font/
Resource/Font/Sansation.ttf         // This is one is important, the Engine use it for text rendering

config/
config/log_config               //Pretty important, but not necessary

You can download those directories here : https://github.com/NeroGames/resource-pack/blob/master/Directory.zip
Unzip the file and copy its content in your project directory

That's All

This post described all the steps you'll need to get start with the Engine. Build and Link libraries is one of the most difficult part when working on C++ programs. It may give you some headaches  ::)  :o :o. So try again and again if it does not work and feel free to ask any question in case of difficulties.
« Last Edit: May 06, 2022, 04:17:16 pm by NeroGames »