Hi everyone !, I'm back, how do you do ?
During the last two weeks I got a lot of free time, so I worked on the Engine. The Engine has evolved, I added some new features and fixed some bugs. I've made a review of the features that will be availabled in the Engine first version. The first version will be ready by the end on this year. The integration of Lua as a scripting language will take a lot of time, so for the first version there will only be a very minimalist integration of Lua. C++ will be the main language to use the Engine. Finally I plan to open a website early next year, maybe on Junuary.
that's said, Let's jump on the new features !!!
Startup ScreenThe DevEngine now has a Startup Screen or a Loading Screen if you prefer. The Engine just use two threads on startup. While the main thread render the Loading Screen, a second thread load Resources and build the Engine_UI in background.
Custom Startup ScreenWhile the DevEngine has a fix Startup Screen, the RenderEngine can take a custom Startup Screen. That allows you to create your own game loading screen. In order to create a Startup Screen you simply have to create a class that henerite from nero::StartupScreen
class StartupScreen
{
public:
StartupScreen();
virtual ~StartupScreen();
virtual void handleEvent(sf::Event& event) = 0;
virtual void update(const sf::Time& timeStep) = 0;
virtual void render() = 0;
virtual const sf::Color getBackgroundColor() const = 0;
virtual const float getMinTime() const = 0;
protected:
sf::RenderWindow* m_RenderWindow;
};
All the methods in the class are virtual pure; you have to override all of them.
the getBackgroundColor() method return a color to clear the sf::RenderWindow;
the getMintime() method return a time in second. It allows you to choose if the LoadingScreen should last in 5 second or 10 second or whatever you want.
the Custom Startup Screen is given to the RenderEngine via it's constructor.
MyStartupScreen myStartupScreen;
nero::RenderEgine engine(myStartupScreen);
engine.setScene<MyScene>("my scene name");
engine.run();
Sound and MusicThe Engine can now load and manage Sound and Music. Like other resources the loading is automatic. Just copy some sounds in the folder "/Resource/Sound" and some musics in the folder "/Resource/Music", the Engine will take care the rest. In your Scene class, there is a instance of the class
nero::SoundManager. this class let you play a sound or a music at any time in your game.
The DevEngine allows to quickly access all your Musics and Sounds, so you can enjoy them while building a Scene.
Configuration FilesIn order to make the Engine more flexible, many hard coded properties are now made evailable as configurations. Configuration files are JSON files, they are all located in the folder "/config"
As a example, for each resource type (Texture, Sound, Music etc), you can now choose the folder where to put them, you can also choose the extensions you want to handle.
For Fonts, you can choose what Font to use as default.
{
"font" :
{
"folder" : "Resource/Font",
"extension" : ["ttf"],
"default" : "Sansation"
},
"sound" :
{
"folder" : "Resource/Sound",
"extension" : ["wav", "ogg", "flac"]
},
"music" :
{
"folder" : "Resource/music",
"extension" : ["wav", "ogg", "flac"]
},
"texture" :
{
"folder" : "Resource/Texture",
"extension" : ["png", "jpg", "bmp", "dds", "tga", "psd"],
"separator" : "-"
},
"shader" :
{
"folder" : "Resource/Shader",
"shader-list" : "Resource/Shader/shader.json",
"extension" : ["vert", "frag"]
},
"animation" :
{
"folder" : "Resource/Animation",
"extension" : ["png", "jpg"]
},
"script" :
{
"folder" : "Resource/Script",
"extension" : ["lua"]
}
}
Bug fixed : RenderCanvas glitchIn the version of the Engine provided with the SDK (Startup Kit), there is a glitch on the Canvas when you remove a Layer or when the Redo and Undo buttons are used. It tooks me some time to find the reason of this glitch, but it's now fixed.
that's all for this post, There are other new features like Animation and Grid, they are still in development, I will talk about them another day.
thanks for reading my posts and see you later
.