Jump to content

С++ with Lua or just Lua?


Lostghbear
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

  • Upvote 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

  • Upvote 1

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...