Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking for framework that will let me code on JS for HTML5 canvas and then will let me deploy to desktop and Android. I'm not looking to learn new stuff like Haxe or Lua. I want to do it in plain JavaScript. Is there a frame work that will allow me to do this?

share|improve this question
2  
When you say to desktop and android, do you mean not using the browser? –  Byte56 May 2 '12 at 7:27

1 Answer 1

up vote 3 down vote accepted

For the deploy part you can use phonegap (now called Cordova). It is an Open Source library that pt provides a framework to create "native" mobile applications using only web tecnology (HTML5, CSS3, etc)

It has two parts:

  • A library for the platform's native framework that provides an special WebView class.
  • A javascript library file to be included in the HTML file for each platform (*) that serves as a bridge with the special WebView exposed by the native library above. This bridge allows accessing hardware and platform special functions (e.g. accelerometer data, camera, etc) using javascript code.

That way, you can build a "native" application which is in reality a web view that loads an URL to your local data.

So now your question is hopefully reduced to just selecting and testing an HTML game engine / library. Unfortunately I can not help you with that as I've never use HTML5 to create games (yet) but to get you started, here you have two HTML5 engines:

Beware of performance though, it varies a lot even between different OS versions.

(*) Each platform uses a different javascript file. Just remarking it so nobody else hit the same wall I did.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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