Einlander Posted November 25, 2013 Share Posted November 25, 2013 I was wondering, is it possible to load binaries created for lua such as Luasocket or Lua-Enet from within a lua project? I see in many of the examples that you can "require" another lua script in in code, but does the same apply for lua compatible binaries? I ask because as I prototype my project i need to know whether I can use these networking libraries in my scripts to make network synchronization as simple as possible. Ie: When an entity is acted upon or fires an event, it self updates its network presence. Quote Link to comment Share on other sites More sharing options...
Rick Posted November 25, 2013 Share Posted November 25, 2013 I don't know about those. I'm using RakNet, but I made bindings to the RakPeer and BitStream and expose those to Lua and I have that working. In the past I use LoadLibrary() from lua I think to load a DLL. It seems LE does have it's own require() functions so not sure if it works. Have you tried it and had issues with it? This to note: if you plan on doing any mobile this may not work as I don't think you can load DLL type things on iOS and possibly android. This is my concern, and so that's why I've created the bindings in the LE exe itself so it's part of the main program. Quote Link to comment Share on other sites More sharing options...
Rick Posted November 25, 2013 Share Posted November 25, 2013 Looking into Lua-ENet and it looks like on github they have the C source. You should be able to plug that into the LE exe project, include Lua 5.1.4 in that project as well and then it would all compile together and you wouldn't need require() then. Quote Link to comment Share on other sites More sharing options...
Josh Posted November 25, 2013 Share Posted November 25, 2013 I am curious how this works as well. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.