Jump to content
Lostghbear

С++ with Lua or just Lua?

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?

Share this post


Link to post

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..

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...