0

I am trying to optimize the below HTML5 Game for Mobile with Cordova (http://cordova.apache.org/).

http://percsich.hu/TululooGames/skeet/index.html.

So i have few questions for my clarification.

  1. I have created a build for the above game and it is working in the emulator. But the shooter game is very slow in the emulator. I do not know how to resolve this. But the same in the browser is working fine.

  2. Another important thing is the screen size. The game is not fit into the emulator screen size. I have added meta tag like below

meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0, width=device-width, height=device-height"

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0, width=device-width, height=device-height">

But it is not fit with the emulator screen. Half-of-the screen only i can see in the emulator.

Please suggest on this so it should fit to all the screen size.

Thanks.

3
  • Yes. the HTML5 file game built with CANVAS tag and JS.
    – Raja
    Aug 22, 2013 at 5:23
  • do u test on andorid emulator? Aug 22, 2013 at 5:28
  • Yes. Correct. I am using Android emulator (adt-bundle-windows-x86).
    – Raja
    Aug 22, 2013 at 5:33

1 Answer 1

0

1) set hardwareAccelerated true in AndroidManifest.xml

android:hardwareAccelerated="true"

2) Start Emulator with Use Host GPU enter image description here

3) Improving the Performance of Phonegagap app

4) Improving the Performance of your HTML5 App

5) scale fit for mobile view

6
  • Hi, where do i find the "AndroidManifest.xml" file. I am using windows 7 installed with Node.js and cordova. Thanks.
    – Raja
    Aug 22, 2013 at 6:03
  • Do u have android project ? Aug 22, 2013 at 6:05
  • No... i am using Cordova which uses html5, css and js to create android applications. i searched to the all files and folders for the keyword "AndroidManifest.xml". No match.
    – Raja
    Aug 22, 2013 at 6:10
  • how to run your project in android emulator Aug 22, 2013 at 6:19
  • First i create a platform using the command - <project file directory> / cordova platform add android; and i create a build using <project file directory> / cordova build -d android; Finally i open the project using the emulator <project file directory> / cordova emulate android. Thanks.
    – Raja
    Aug 22, 2013 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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