Hello and welcome to my new blog! After using my old blog for several years, I’ve decided that it’s time to move on. This blog is made with Jekyll and it’s currently hosted at GitHub, though eventually I plan to register proper domain for my site once I feel that the blog is good enough.

I feel that having a minimalist blog with great customization is awesome and it will improve looks of my blog posts a lot. Just look at that beautiful code block, that’s how the code will look from now on:

In Pygments:

void Entity::addComponent(const std::string& componentName, const ScriptDataLoader& loader)
{
    auto& componentManager = engine_system.get<ComponentManager>();
    auto componentType = componentManager.getTypeIndex(componentName);
    if (hasComponent(componentType)) {
        auto& log = engine_system.get<LogManager>();
        log(LogManager::MessageType::Error) << name << ": Component with type " << componentName << "already exists.";
        return;
    }

    auto c = componentManager.createComponent(componentType);
    componentManager.loadFromLua(componentType, *c, name, loader);
    c->owner = this;
    c->init();
    addComponent(componentType, std::move(c));
}

And this is a test of HTML markup from Visual Studio!

void Entity::addComponent(const std::string& componentName, const ScriptDataLoader& loader) 
{
    auto& componentManager = engine_system.get<ComponentManager>();
    auto componentType = componentManager.getTypeIndex(componentName);
    if (hasComponent(componentType)) {
        auto& log = engine_system.get<LogManager>();
        log(LogManager::MessageType::Error) << name << ": Component with type " << componentName << "already exists.";
        return;
    }
 
    auto c = componentManager.createComponent(componentType);
    componentManager.loadFromLua(componentType, *c, name, loader);
    c->owner = this;
    c->init();
    addComponent(componentType, std::move(c));
}

There are some new articles coming soon and will be published on this blog, but first, let’s talk about it.

Why I created a new blog

There were several reasons for that:

  • Not much customization was available. I was using free version of Wordpress which limited me with what I can do about the site. I wasn’t very happy about most of the free themes on the site and the one I was using was the best one for me, but there were still some small problems with it which I wanted to fix but wasn’t able to.
  • Wordpress liked breaking my code. It kept inserting &lt; and &gt; instead of < and > and stuff like that. No matter what I’ve tried, it always ended up doing it, even if the code was inside <pre> or <code> tags! It was really awful and even a small fix in the article was hard to make because of that.
  • No Lua highlighting. There was no support for Lua and for guy who writes so much about Lua it was really hard. I ended up using Python highlighting for most Lua code blocks but it wasn’t perfect.
  • Disqus. I like Disqus very much, it’s better than Wordpress comment system and allows more people to comment on my articles.
  • Source control. While Wordpress has source control system, it’s easier for me to use git for that. It wasn’t possible with free Wordpress account, of course.

… and there are some other small reasons but I’ll stop at that.

Future plans

There are several articles I plan to write and they’ll be published on this blog from now on:

  • Using ImGui (with SFML) Part Two. This article will show some notable things about ImGui: some useful things, some hacks and tips about using it with modern C++ and STL.
  • How I use modern C++. In this article I’ll show how I use modern C++ while developing my game and how it makes my code more readable and safer. I’ll also address some myths about modern C++ which are mostly result of ignorance or false claims coming from “C with classes” programmers.
  • Using Lua with C++ series reboot. Yeah, it’s coming! Let’s talk a bit more about it.

Using Lua with C++ reboot

Lua logo

I wrote the first Lua/C++ articles almost three years ago! This was my first article which got really big and inspired me to continue writing lots of articles devoted to Lua and C++ integration.

And now I feel like I need to re-write the tutorial series from the ground up because I’ve learned a lot during the last three years. I’ve also received lots of e-mails with different questions about Lua and C++ and I’ve noticed some things which need to be addressed and explained in detail.

The series will start with me explaining why Lua is awesome and how it can be used in game development. I’ll start with explaining some things about how Lua works internally and how you can use Lua C API to interact with it. While there are some amazing Lua/C++ bindings out there, I feel that understanding how Lua and Lua C API work is very important and useful for using Lua efficiently.

After some basic discussion the series will move on to practical examples of how I use Lua while developing Re:creation. During years of using Lua I’ve discovered some useful scripting patterns which will be explained in these articles.

Feedback

Thank you for your feedback about all my articles! As I’m writing new articles, please tell me what you want to see in Lua/C++ or modern C++ articles. Your opinion is very important to me and I’ll try to answer your questions about different stuff in my new articles. See you soon!


Follow me on twitter @EliasDaler to not miss the new stuff!