Using Lua with C++ in practice. Part 2. Implementing the basics

Source code for this article

Hello, this is a second part of “Using Lua with C++ in Practice” series. I recommend to read the first part to know what’s going on and why using Lua with C++ is awesome! (You’ll see it in this arcticle too, of course).

This tutorial will implement a simple ECS model which I’ll improve and use in other parts of tutorials. Note that this is not the best way to implement ECS. I’m making the most basic ECS which can be used to show the main principles of how things work in my game and how you can use them in general. This is not a tutorial about C++, so I won’t spend too much time discussing C++ parts and I’ll mostly focus on Lua/C++ interaction and binding. Let’s start!

Continue reading