Link to home
Start Free TrialLog in
Avatar of James Hancock
James HancockFlag for United States of America

asked on

Putting Javascript games on the net is easy, how about App Stores?

Hey,
so on E.E. , I have been able to finish an RTS server in Java, blog w income, I'm ready to commit to a JS phone game..
I'm using ATOM as my Interactive development environment. Will it be suboptimal for my various publication needs?
If I do my game on a web page, it is simply placing the .htm file and the .js file in the folder. What about app compilation? Do the google and Mac stores have their way to package the javascript somehow? What should I be aware of?

I just make the game and worry later? :)

Thanks
SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpearson
dpearson

You can go with a path like using REACT native - where you're looking to actually build for specific mobile targets.

But you also go with the model where you basically wrap your HTML5 app (normal Javascript) with a browser into an app.  This is generally fine as long as you don't need to take advantage of too many phone specific features (e.g. accessing the contacts list).

There are a lot of toolkits out there which you can use to do this and it's generally a pretty simple process.

Check out a pretty full list of options here:
https://www.gamepix.com/blog/the-best-wrappers-to-build-native-apps-from-html5-games/

I would probably look at Cordova first: https://cordova.apache.org/

Doug
@dpearson using hydrid or any Native Apps you need to compile the code to be able to submit it to the stores.
@dpearson using hydrid or any Native Apps you need to compile the code to be able to submit it to the stores.
I'm not sure exactly what you mean by "you need to compile the code".  Certainly for a pure native app, you would be compiling the code from some source language to produce an app store binary.

But for a wrapped HTML5 app, you can just be working with normal JavaScript - like you would for a web app.  In some sense you can say that's "compiled" into the app that you submit (basically that step wraps the browser control and the JavaScript into a single package which goes to the app store), but you don't need to be doing a true compilation step, where you convert from JavaScript into another binary format.

E.g. If you look at this hello world example Cordova app:
https://github.com/apache/cordova-app-hello-world

you can see that the "source" files are just JS, CSS etc.  Just like they would be for a web app running in a browser.

Anyway - that may have been what you meant, I just wanted to make sure to clarify.

Doug
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes React Native is one approach to reach the app stores - using a language which then actually compiles to produce a native binary which you submit.  But that's certainly not the only solution.

As my example showed - you can write normal JavaScript + CSS, wrap that up and submit it to the app store (which the OP looks keen to do).

But if you prefer to use a separate framework and cross compile to produce a native app, there are plenty of tools to do that.  But you would need to rewrite your JavaScript web app to use them.  At the company where I work we actually use Haxe (https://haxe.org/) and cross compile to native.  That's similar to the React native mobile because you end up with an app that's not running inside an embedded browser, but we prefer the strongly typed language support we get from using Haxe.  And it can target a really wide range of platforms.

However, there's definitely no requirement to cross compile when submitting to the app store.  You can just wrap a normal Javascript/CSS web app into an application (using one of the many tools I posted earlier like Cordova) and submit that.
I'm not saying that is the only solution, I'm just saying that it need to be compile....
Avatar of James Hancock

ASKER

Thanks