🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to call Lua into c#?

Started by
0 comments, last by chuawenching 20 years, 7 months ago
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.
Regards,Chua Wen Ching :p
Advertisement
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.

This topic is closed to new replies.

Advertisement