Jump to content
  • Advertisement
  • entries
  • comments
  • views

ToLua++ rocks!!

Sign in to follow this  
Mike Bossy


This weekend I made the switch from LuaBind to ToLua++. Big improvements in a lot of ways:

1. Smaller. My test app which just has a single class that is called by a Lua script was 250k smaller with ToLua++. Also compile times were a breeze.

2. More straight forward object passing. ToLua has some nice built in functions for passing an object from C++ to Lua without having to deal with the Lua userdata stuff yourself. This is by far the biggest use case for me. I'm going to be having my Lua scripts acting on objects that were created in C++.

Of course there are always tradeoffs:

1. Pre-processing. To use ToLua you need to run a command line tool against classes that you want to expose to lua. Not a huge thing but unless you make it part of your regular build process it's easy to have your generated files get out of sync.

2. More files to manage. Generated code means more files to add to the project. Once again not that big of a deal but it's just one more file that you can forget to check in etc.

All in all the pluses outweight the minuses. Next up is to plug this new work into my engine.
Sign in to follow this  


Recommended Comments

There are no comments to display.

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
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!