Tag Info

New answers tagged

2

You got it wrong in your draw code : once you translated the context to a given point, you shouldn't use any more the point coordinates : the 'zero' is now at the translation point. So to draw your arrow after you translated to its start point, just translate by the size of the arrow. http://jsfiddle.net/gamealchemist/jxrdtLxx/2/ function ...


2

The Chromium-based WebView causing this issue was eventually updated in KitKat version 4.4.3/4.4.4 in mid 2014, but that is cold comfort considering some vendors have made some seemingly arbitrary decisions about which of their phones got the update and which did not. Samsung Galaxy S4, for instance, is still trapped at 4.4.2. Follow the advice given by ...


0

Draw the bitmap using a Matrix. Matrix matrix; matrix.reset(); matrix.postScale(2.0f, 2.0f); matrix.postTranslate(getWidth()/2.0f, getHeight()/2.0f); canvas.drawBitmap(bm, matrix, null); EDIT: you probably should tell it where to draw too. My bad. EDIT2: In response to you blurry comment, you can try turning off anti-aliasing, and bitmap filtering. ...


0

I ran into the same issue with Phaser (with this simple game). Unfortunately, with HTML5 and web/canvas rendering, you're at the mercy of your phone -- there will be users with broken or poorly-performing browsers (like mine). Like @captainbuzz123 suggested, the only real solution is to move to a non-HTML5 platform. My tool of choice for now is OpenFL. ...


9

Multiple canvases can help in some cases. Just as a quick example - say you have 2 layers (canvases) to your game. The background of your game is not going to change very frequently, for example. So one canvas will be dedicated to just rendering the background of your game. This means you only have to render the background once, and only re-render it ...



Top 50 recent answers are included