Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I make an HTML5 game for Android?

Ok to be more specific... can I program an android app in Java that has something like a web view to which I can point to local files on the phone?

I'm thinking about making an android game and i'm wondering if it can be done with a little HTML5 and Javascript that is locally stored on the phone. I heard something about a web view in Java and that is why I am wondering if it could work.

Is this even possible?

like image 430
Jacob Avatar asked Nov 09 '11 01:11

Jacob


People also ask

Do HTML5 games work on Android?

HTML5 games not only run on different platforms like iOS, Android, or windows but also run in browsers.

Can you play HTML5 games on mobile?

Most mobile HTML5 games are optimized for iOS, Android, BlackBerry or Windows Phone systems.

Can I make Android app using HTML?

The Short answer: Yes, you can develop apps using HTML / CSS / Javascript. Take two WebView Tutorials and call me in the morning. The Long Answer: If you want to write apps for Android that use HTML / CSS / Javascript, you'll have to at least create a native WebView wrapper.

Can you make a game with HTML5?

Since most game developers want to focus on their actual game and not in creating this whole abstraction layer, it is recommended you use a HTML5 game frameworks. HTML5 game frameworks and libraries that contain building components you can use to create your own games.


1 Answers

As the other answers might be correct, there is a much simpler way:

If you know html5 programming, you can do a simple Android app that has one Activity containing one WebView. In that webview you load your index.html and there you go. You can basically do anything you would do on a normal web app.

PhoneGap and Appcelerator are for cross platform development and they provide access to the hardware (vibration, sensors etc) and they give you the possibility to build the native UI with html and javascript. For a pure WebApp they are not the correct frameworks/tools I think. I might be mistaken, but a WebGL Benchmark I wrote for PCs worked out of the box in the android browser and I justed used html5 and JavaScript.

like image 180
WarrenFaith Avatar answered Sep 29 '22 10:09

WarrenFaith