• Advertisement
Sign in to follow this  

XLua - Tencent's Lua programming solution for C#

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.  

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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. 

 

Edited by ErnieDingo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement