Jump to content

Lua Libraries


Einlander
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...