14-07-2021

94programmer

Newcomer

How To Use Lua In C++ Windows 10

UseHow to use lua in c++ c
Hello, I was reading a lot on the internet but I am still looking for an answer, I dont expect a solution from you, just a simple answers or a books, online tutorials which will help me to solve that problem. Well I am coding a game for fun in c++, SFML, where I load entities like NPC, tiles from JSON file. Now I discovered LUA to use it as a scripts for s NPC and tiles and make them able to move, open dialog box etc. But I totally dont have idea how to make it. First of all I embed LUA to c++ and everything works well, I passed simple tutorials for begginers to know what exactly lua is, but I have no idea and I cant find on internet good sources which will help me with communicaton my entities objects from c++ and lua scripts and vice versa, like idk how to exactly make that communication well between entities and scripts and c++, can you help me a bit somehow?
How to use lua in visual studio code

How To Use Lua In Vscode

I have found that the Lua C library is far too verbose and troublesome with its stack pushing and popping magic. Taking advantage of C11's new features, and making use of metaprogramming I've developed a library to make use of the 5.2 Lua C library with friendlier syntax.