🎉 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!

XLua - Tencent's Lua programming solution for C#

Started by
6 comments, last by Ahmio 6 years, 9 months ago

https://github.com/Tencent/xLua/

I just discovered this today, first time I've seen anything about it.  Maybe because it's Chinese it doesn't show up on a standard search query, and it seems to have been published recently.

Anyways, thought I would share.  The API is very similar to NLua, I was able to convert to XLua in a matter of minutes & a quick benchmark shows improved performance.  There's some new features to prevent or reduce garbage allocations as well.

Advertisement
On 7/5/2017 at 0:52 PM, Crayz92 said:

https://github.com/Tencent/xLua/

I just discovered this today, first time I've seen anything about it.  Maybe because it's Chinese it doesn't show up on a standard search query, and it seems to have been published recently.

Anyways, thought I would share.  The API is very similar to NLua, I was able to convert to XLua in a matter of minutes & a quick benchmark shows improved performance.  There's some new features to prevent or reduce garbage allocations as well.

How have you found it?  I am looking to integrate into my C# based game.  

Indie game developer - Game WIP

Strafe (Working Title) - Currently in need of another developer and modeler/graphic artist (professional & amateur's artists welcome)

Insane Software Facebook

17 hours ago, ErnieDingo said:

How have you found it?  I am looking to integrate into my C# based game.  

I found it by accident, can't remember what exactly but I googled a line of code that was in XLua's source somewhere and it popped up in the search results.

5 hours ago, Crayz92 said:

I found it by accident, can't remember what exactly but I googled a line of code that was in XLua's source somewhere and it popped up in the search results.

What i meant was. How did you find the experience of using it ?  i want closer sorry ?  I'm trying to come to terms with incorporating lua into my game control code but set the moment in struggling with the conventions around integrating it.  Spent a couple of hours last night and only had the simplest of samples working. 

Indie game developer - Game WIP

Strafe (Working Title) - Currently in need of another developer and modeler/graphic artist (professional & amateur's artists welcome)

Insane Software Facebook

On 8/31/2017 at 4:02 PM, ErnieDingo said:

What i meant was. How did you find the experience of using it ?  i want closer sorry ?  I'm trying to come to terms with incorporating lua into my game control code but set the moment in struggling with the conventions around integrating it.  Spent a couple of hours last night and only had the simplest of samples working. 

I first learned with NLua - I believe there is a lot more documentation and discussions for NLua so it's an easier one to learn.  It took me a few months to get a grasp on using NLua and the Lua language itself, but I started exactly where you're at now with a few simple samples.  It just took some time :)

1 hour ago, Crayz92 said:

I first learned with NLua - I believe there is a lot more documentation and discussions for NLua so it's an easier one to learn.  It took me a few months to get a grasp on using NLua and the Lua language itself, but I started exactly where you're at now with a few simple samples.  It just took some time :)

Yeah.  At the moment im looking at the best way to integrate and  I have a basic example working.  Was easier to integrate then first thought.  What my first goal is to have my level specific game logic running through the script.  There are a few things that I take for granted in c# i dont have for lua like enums.  They other piece i need to understand is the impact on the global table with so many objects and methods in it.  Already looking at metatables for variable storage.  Apparently you can create lua global tables for each object from what i can see. 

Anyway.  Will see how i go.  Xlua sounds promising.  Would like to be able to recompile my lua too. Don't think nlua supports that. 

 

Indie game developer - Game WIP

Strafe (Working Title) - Currently in need of another developer and modeler/graphic artist (professional & amateur's artists welcome)

Insane Software Facebook

This looks really good. Have you used it?

This topic is closed to new replies.

Advertisement