Login
Community
DARK THEME

Http POST/GET

Hi!

Am I able to make Http(s) POSTs or GETs and parse a JSON, for instance, within the Microstudio ambient, using Javascript?

And, if it is possible to use such Javascript capabilities, if I build an Android apk, those will work the same as on the browser? Still in this line, does the Android builder converts everything to native code, or does it wrap everything as a Html5 and runs it that way?

Thanks!

Am I able to make Http(s) POSTs or GETs and parse a JSON, for instance, within the Microstudio ambient, using Javascript?

This possibility is left open for now, but I cannot guarantee it will remain so. The main goal with the introduction of JavaScript is that you can program your game in JavaScript, using the same feature set and API calls as you would in microScript.

does it wrap everything as a Html5 and runs it that way?

Yes, the Android APK is packaged from the HTML5 export, using Cordova.

That clarifies! Thank you very much!

"This possibility is left open for now, but I cannot guarantee it will remain so."

Sorry to ask... could you please elaborate a little bit further on this section? You mean by that that would be the case that Internet access from whitin the engine is subject to change (privacy/security reasons)?

Thanks again!

I mean the goal is to allow programming your game in JavaScript, using the microStudio APIs ; direct JavaScript support opens up a lot more possibilities (without privacy / security concern as the projects are run on a separate domain - microstudio.io - as the main microStudio site - microstudio.dev -). You may access the DOM, you can make ajax calls, load more JavaScript libs ... If that is what someone needs to do, there are many online services out there allowing them to do that much better: codepen, jsfiddle, codesandbox. I have no reason to block these extra features for now, but I may do so in the future to avoid having projects published in the Explore section which would have nothing to do with the core microStudio spirit and features.

Perfect! Thanks for clarifying!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community