Plugins and libraries

I’ve seen a ton of plugins made by the community that you have to copy to your project for them to work, and this makes me have a ton of questions. When will these be included on the marketplace? Will this be the way plugins have to be bundled to HTML5 builds? What’s the status on the rest of the internal libraries? (Socket, mime, crypto, sqlite3) How will we be able to include them? Will we be able to use them? I think i’m not alone when wondering this, i just have so many questions for the HTML5 builds. I know we are on a beta, but many people building their own libraries without really publishing them to the marketplace seems a bit off. I know portability is the main goal for HTML5 builds, but i know there will be some heavy games out there as well.

You have several questions here so let me try to address them.

  1. Volume of community plugins.  I think there are a couple of things going on here. First, there is a lot of excitement around HTML5 builds and JavaScript is easy to use and we’ve implemented the ability to use your own JS to do so. Out of all that excitement, people are creating them at a fantastic pace. Yes it’s a little hard to keep track of them, but wow, what a great community we have to have all of these items showing up.

  2. When will they be in the marketplace? This is a bit more difficult to respond to for several reasons. First, we are still in beta and our plugin format has changed significantly since we started. I believe the current plugin implementation is compatible with the format that the Marketplace uses. The developers would need to submit them to the Marketplace and maintain them like other binary plugins. This requires a bit more work than dropping a few lines of JavaScript on a github site. Also, these plugins will probably need to always be included in clear text. At best, JavaScript can be minified/obscured, but it’s a plain text file. This may limit people’s willingness to make them for the Marketplace, but our goal is to make them available there.

  3. We have intentionally removed socket.* (which takes out mime.*) and sqlite3 because it significantly increased an app’s project size. We feel that people are going to want to make FB instant games and similar on other services and adding several megabytes of size to a project on libraries that while awesome to have, are not that frequently used, size is more important. Our goal is to eventually get these two back at some point as plugins and we’ve been working to get it so that C++ plugins will work with our HTML5 implementation. I just don’t have an ETA on this. That said, what does get used more frequently is mime.* which is part of LuaSockets.  But almost everyone is using the base64 encode and decode functions which really are not much more than something that can easily be done with Lua’s string.* library. I believe one of the community plugins does this.  JavaScript has it’s own functions to do this. So building your own b64encode b64decode functions will be much lighter weight than including the entire socket.* library to get to mime.*

Rob

Awesome. I can’t wait to see our games without limitations on the web. It also gives more clarity about the direction of these HTML5 plugins. About the mime functions that’s ok, and i already saw a crypto replacement for HTML5 somewhere in the forums, i just would like to not nest the requires in a crazy way in the source files (Different require for html5 than for the others, for example) It’s not bad or anything, i just want to make sure things aren’t going to change in a crazy way. I’m of course aware that this is a beta and many things will change, that’s why its a public beta. Thanks for everything, Rob!

Hi,

I wouldn’t mind having a centralized place to put JS plugins on the Marketplace. I did receive some advice that it was possible, but still wasn’t very clear on the process since I’m used to the build tool/instructions for pure Lua plugins, so I’ve just decided to wait it out for the time being hoping it will eventually be documented in some way like pure Lua plugin development is. Also, there doesn’t seem to be any specific way to denote during the submission process that a plugin is for HTML5 builds.

As to what Rob said in point #2 above, there isn’t really any way to protect the plugin code, I don’t really mind that so much, but as mentioned it may deter some developers from producing larger and more time consuming plugins. What I would love, as mentioned above, is a clearly documented process on preparing JS plugins for Marketplace submission. In particular, creating a pure Lua/JS hybrid plugin.

I have a rather large gaming plugin built for an upcoming product that is “hybrid” in the sense that there is Lua version and a JS version that have parity with just a “platform” check. But they are two completely separate code bases, so they have to be included individually. It would be great if there were some way to combine them into a submittable plugin.

For mime base64 there is this plugin https://github.com/develephant/corona-html5-base64-plugin. Though it can be taken care of on the Lua side as well with some simple code. I’ve recreated the crypto lib here https://github.com/develephant/corona-html5-crypto-plugin.

Items like openssl, sqlite3, and socket are important, but I’m wondering how exactly they can be transformed into JS. But I’ve been impressed so far with what the HTML5 builds can do, so we will see.

Beyond that, thanks for the update @Rob. I’ve been very excited and impressed with the HTML5 progress.

-dev

I wish socket plugin back soon. My game use photon server and i cant run my game in html5   :frowning:

You have several questions here so let me try to address them.

  1. Volume of community plugins.  I think there are a couple of things going on here. First, there is a lot of excitement around HTML5 builds and JavaScript is easy to use and we’ve implemented the ability to use your own JS to do so. Out of all that excitement, people are creating them at a fantastic pace. Yes it’s a little hard to keep track of them, but wow, what a great community we have to have all of these items showing up.

  2. When will they be in the marketplace? This is a bit more difficult to respond to for several reasons. First, we are still in beta and our plugin format has changed significantly since we started. I believe the current plugin implementation is compatible with the format that the Marketplace uses. The developers would need to submit them to the Marketplace and maintain them like other binary plugins. This requires a bit more work than dropping a few lines of JavaScript on a github site. Also, these plugins will probably need to always be included in clear text. At best, JavaScript can be minified/obscured, but it’s a plain text file. This may limit people’s willingness to make them for the Marketplace, but our goal is to make them available there.

  3. We have intentionally removed socket.* (which takes out mime.*) and sqlite3 because it significantly increased an app’s project size. We feel that people are going to want to make FB instant games and similar on other services and adding several megabytes of size to a project on libraries that while awesome to have, are not that frequently used, size is more important. Our goal is to eventually get these two back at some point as plugins and we’ve been working to get it so that C++ plugins will work with our HTML5 implementation. I just don’t have an ETA on this. That said, what does get used more frequently is mime.* which is part of LuaSockets.  But almost everyone is using the base64 encode and decode functions which really are not much more than something that can easily be done with Lua’s string.* library. I believe one of the community plugins does this.  JavaScript has it’s own functions to do this. So building your own b64encode b64decode functions will be much lighter weight than including the entire socket.* library to get to mime.*

Rob

Awesome. I can’t wait to see our games without limitations on the web. It also gives more clarity about the direction of these HTML5 plugins. About the mime functions that’s ok, and i already saw a crypto replacement for HTML5 somewhere in the forums, i just would like to not nest the requires in a crazy way in the source files (Different require for html5 than for the others, for example) It’s not bad or anything, i just want to make sure things aren’t going to change in a crazy way. I’m of course aware that this is a beta and many things will change, that’s why its a public beta. Thanks for everything, Rob!

Hi,

I wouldn’t mind having a centralized place to put JS plugins on the Marketplace. I did receive some advice that it was possible, but still wasn’t very clear on the process since I’m used to the build tool/instructions for pure Lua plugins, so I’ve just decided to wait it out for the time being hoping it will eventually be documented in some way like pure Lua plugin development is. Also, there doesn’t seem to be any specific way to denote during the submission process that a plugin is for HTML5 builds.

As to what Rob said in point #2 above, there isn’t really any way to protect the plugin code, I don’t really mind that so much, but as mentioned it may deter some developers from producing larger and more time consuming plugins. What I would love, as mentioned above, is a clearly documented process on preparing JS plugins for Marketplace submission. In particular, creating a pure Lua/JS hybrid plugin.

I have a rather large gaming plugin built for an upcoming product that is “hybrid” in the sense that there is Lua version and a JS version that have parity with just a “platform” check. But they are two completely separate code bases, so they have to be included individually. It would be great if there were some way to combine them into a submittable plugin.

For mime base64 there is this plugin https://github.com/develephant/corona-html5-base64-plugin. Though it can be taken care of on the Lua side as well with some simple code. I’ve recreated the crypto lib here https://github.com/develephant/corona-html5-crypto-plugin.

Items like openssl, sqlite3, and socket are important, but I’m wondering how exactly they can be transformed into JS. But I’ve been impressed so far with what the HTML5 builds can do, so we will see.

Beyond that, thanks for the update @Rob. I’ve been very excited and impressed with the HTML5 progress.

-dev

I wish socket plugin back soon. My game use photon server and i cant run my game in html5   :frowning: