Lostghbear Posted July 5, 2015 Share Posted July 5, 2015 When I started the engine I thought I should combine the Lua and C++. For example scripts to do on Lua ,game logic and mechanics on C++. But everything you can write in C++, you can also write and Lua and I thought - does it make sense to combine Lua and C++? Are there any advantages in the combination of two languages? Quote Link to comment Share on other sites More sharing options...
Jorkayus Posted July 5, 2015 Share Posted July 5, 2015 I think the reason is that lua is more game focused and more easy to use. But i would like to know because i don't know how to use c++, how to combine them, advantatges of c++, I am little bit lost.. Quote Link to comment Share on other sites More sharing options...
reepblue Posted July 5, 2015 Share Posted July 5, 2015 You can use the built in tolua stuff. Here is an example,and a post that helped me. There is not a whole lot of documentation on this, so your best bet is to read headers and search forum posts. On the C++ side of things, I do the basic stuff like how levels are changed, UI, menu, etc while lua is mainly the game logic like the Player, elements, etc. Minus that there are some things you can only do in C++, Leadwerks allows you to develop your game anyway you want. After all, it's just a set of libraries called with a console application. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
cassius Posted July 5, 2015 Share Posted July 5, 2015 I just use c++. I am not an advanced user though. I started with aggrors c++ examples and went from there. I would like to use SOME lua but not found the need to do so yet. 1 Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.