27
\$\begingroup\$

Is it possible to package HTML5 game for iPhone and Android as an application or does it have to be accessed through a browser?

\$\endgroup\$
  • \$\begingroup\$ My question exactly +1 \$\endgroup\$ – user1047 Sep 17 '12 at 23:23
  • 6
    \$\begingroup\$ What part of this fits into the 'off-topic' category? This isn't asking 'which technology to use', it's asking whether a technology exists for something. It's not an abstract 'how to get started' or 'what to learn next'; it's asking a specific, pragmatic question that is exactly the sort of thing that arises in day-to-day development. \$\endgroup\$ – Steven Stadnicki May 14 '14 at 23:27
  • \$\begingroup\$ "Is it possible?" is a yes or no question; these are generally not good SE questions. "How could I..." would be better, but this topic is not specific to games and a game developer would not necessarily give you a better answer. This question should be asked on SO. \$\endgroup\$ – user1430 May 15 '14 at 15:02
17
\$\begingroup\$

There's http://www.phonegap.com/ which is open source and cross-platform. Besides packaging your HTML 5 as a native app, it also lets you access native features of the mobile phone.

\$\endgroup\$
10
\$\begingroup\$

I can't vouch for iPhone, but in Android, a simple application with an Activity that just has one WebView would do the trick. The activity would look something like this:

public class WebApp extends Activity {
    protected void onCreate(Bundle savedInstanceState) {
        WebView wv = new WebView(this);
        wv.loadUrl("http://www.myapp.com/");
        setContentView(wv);
    }
}

That would make the WebView the entirety of the screen; then you would just need a loading message. Or a better option is to load HTML in the WebView so that the app can be used offline; examples of this are on the API page for WebView.

\$\endgroup\$
7
\$\begingroup\$

From ImpactJS Tools page there are:

  • PhoneGap
    • Package your games into an iPhone or Android App, ready to be distributed in the App Stores.
  • appMobi
    • Easily integrate and distribute your games into native iPhone and Android Apps. You don't even need a Mac or XCode to get your game into the iPhone App Store.
\$\endgroup\$
2
\$\begingroup\$

Have you checked out CocoonJS? It's by far one of the best ways to get hardware accelerated HTML5 games on iOS and Android plus they have a cloud compiler where you can upload a single zip and it will build out for multiple platforms.

\$\endgroup\$
0
\$\begingroup\$

If you want to port your game to even more platforms Nokia has a web tool application for porting to Symbian S60 devices... Web Tools for S60

They also have a newer one, which probably supports more HTML5 but I have yet to try it out...

Web Tools 2.3 for Series40

The SDK in the first one is fairly good as it also comes with a simulator so you can get an idea of how your app will

\$\endgroup\$
0
\$\begingroup\$

I have published few HTML5 games in the android market place and from my experience I would recommend you to use Crosswalk in order to package your games for Android.

It's really easy to use and it's damn fast! It's developed by Intel. It's faster than phonegap, because it uses an optimized webview derived from the chromium project.

The stock webview on Android 4.x device (the one used by phonegap) is very slow and it doesn't support WebGL nor WebAudio APIs.

\$\endgroup\$
-1
\$\begingroup\$

What about cocos2d-x ?

Cocos2d-x is a framework for using javascript to develop across all platforms, and it's completely free.

\$\endgroup\$
  • 1
    \$\begingroup\$ To say it is the most reliable is incredibly subjective. For example it has a significant lack of UI widgets/controls such as radio buttons. What benefit does it have for the original poster's HTML5 based game. Elaborate a bit more. \$\endgroup\$ – Tom 'Blue' Piddock May 13 '14 at 11:07
  • \$\begingroup\$ I'm not sure why I wrote "reliable". It's the one I use and I like it. But you're right, there's nothing specifically "reliable" about it. It does, however, support 8 different platforms which is nice. \$\endgroup\$ – deleteme May 14 '14 at 19:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.