Hello. I am developing a civ 6 clone set in space and I have a few issues. I am using Lua for the logic and UI of the game and c++ directx 12 for the graphics. I need a way to send information between Lua and c++ occasionally and was wondering what is the best and most flexible (and hopefully fast) way to do this. Don't forget that I also need to send things from c++ back to Lua. I know of a lua extension called "LuaBridge" on github but it is a little old and I am worried that it will not work with directx 12. Has anybody done something similar and knows a good method of sending data back and forth? I am aware that Lua is used more and more in the industry and surely plenty of AAA game programmers know the answer to this. I want a good solution that will hopefully still be viable code in a couple of years...
How does a person send information between lua and c++?
I am using just Lua and a little helper header called Luna to easily bind C++ objects to be accessible from a lua script. I think this should be all you need, really easy to set up and you introduce no additional dependencies. Though I don't understand what you mean by "work with dx12", you certainly don't want to call dx12 functions from a lua script? You could do it in theory, but I wouldn't, let Lua scripting be a part of your game logic, or calling engine functions, but don't use it to replace performance sensitive low-level code.
Sol. The documentation describes the features, and has a feature matrix comparing it to other libraries.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement