Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


How to call Lua into c#?

This topic is 5456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I am wondering how to call lua into c# so i can use it for scripting purpose? All this while i had been create my own scripting. Very complicated. I want to use lua power. But i need to code in c#. Any help? Anyone had coded c# with lua. Is there anything i can download but is good. I saw 1 lua interface. 1 lua.net but nothing much in there. Any tips. Thanks.

Share this post

Link to post
Share on other sites
One of the goals of the .net framework is not to have separate languages for everything. Right now you could start a client in C++ in a .bat file, which reads txt data files and parses them, reads scripts in a custom language and talks to a database in sql or pl/sql.
C# has reflection, which allows it to dynamically compile and add modules in C# for scripting. This works because everyone who can run a C# program has to have the framework installed, and every framework includes the csc.exe, vbc.exe and jsc.exe compilers.
If you are writing in C# I would not waste time on adding a script interpreter but investigate this. This way your scripts can be in C# so you only need to use one language and get compiled in when loaded for speed.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!