Hi everyone! how to you do
I have been busy the last couple of months, but I manage to get some time and progress with the Engine
Release of a Demo Version on MayI will release a reduced version of the New Engine around mid-may, Many features currently in development will be disabled for the demo. The core features of the New Engine Editor will be available
, you will able to create projects and code in raw SFML. I will give more details on my next post.
Nero Game Engine 2 : Engine UpdateNow let's do a regular update
Introducing the POCO libraryI have been looking for a
Network Library for a while now. I came across
POCO recently and I was amazed by the features it provides. It's a pretty huge library like
Boost. I integrated it into the Engine.
Also, the Engine now use
C++17 Experimental. All the Boost libraries that need to be compiled as been removed.
Download Files with the EngineThanks to POCO you can now download files with the Engine. I begin building a Network Module for the Engine. The most interesting Class for now is the
nero::DownloadManager. It provides two features.
The first feature is to retrieve the size of a file on the internet using a HTTPS request.
The second feature is to download a file on the internet and monitor the download progression.
//get a file size
float bytes = nero::DownloadManager::getFileSize("https/my/file/url");
//the pretty_string method print the size in a readable format like 600 KB, or 8.6 MB etc
nero_log(nero::DownloadManager::getPrettyString(bytes));
nero::DownloadProgression::Ptr progression = nero::DownloadManager::downloadFile("https/my/file/url", "local/path/destination");
while(progression->isDownloading())
{
//print the percentage [0 - 100]
nero_log(progression->getPercentage());
}
A New Logging APIWith the introduction of POCO, I removed the
Easyloggingpp Library. The Logger offered by POCO is more flexible and adapted for the Engine needs.
As a user of the Engine, nothing changes for you, the macros
nero_log and
nero_log_if are still available and work the same.
Background Task ManagementThe New Engine will be using a lot of threads to perform tasks in the background. The Engine now offers a new class called
nero::BackgroundTaskManager or simply
nero::BTManager. The class is used like that
nero::BTManager::startTask(callable, task_name, task_category), The callable can be a function pointer, a lambda or a class method.
class MyClass
{
void helloWorld(nero::BackgroundTask::Ptr task)
{
task->addMessage("starting project compilation");
//to something
task->addMessage("compilation, completed");
task->setCompleted(true);
}
}
MyClass instance;
nero::BTManager::startTask(MyClass::helloWorld, &instance, "compile_project");
auto my_task = nero::BTManager::findTaskByName("compile_project");
That's all for this post !There are many other features in development, I will talk more about that during the summer. Here is what the Editor currently looks like. There is now a nice Toolbar, a Menu Bar, the Logging work perfectly. As with the
Nero Game Engine 1, you have the mouse position on top of the canvas and the four buttons to change the canvas color