9 years ago
by Bum
1. Drawing with the context object draws the impact logo that is sitting in the context buffer. A continuous call to clear()
makes the canvas flicker.
2. Drawing a block box to hold HUD graphics begins to slow down the game's system calls (up to 8ms and 20 FPS). Why is this and how can I increase the speed?
9 years ago
by Joncom
1. You mean the Impact logo is being drawn, and you don&039;t want that? What do you mean a continuous call to #clear()
? More than one clear()
per frame?
2. Please provide the code outlining your approach. Drawing a simple rectangle should not be killing your FPS.
9 years ago
by Bum
1. The impact logo shows up for the Loader. In game, using the context re-draws the impact logo for some reason. Yes, There is a call to
clear()
once in the init. Calling it multiple times clears the screen of the previous artifacts (impact logo) but flickers.
2. Right?
http://pastebin.com/YYdUxRf9
9 years ago
by Joncom
Before calling
ig.system.context.rect(x, y, width, height)
, I think you need to call
ig.system.context.beginPath()
.
Not doing so might lead to some unexpected draw behavior...
Here's an example of drawing a rectangle:
http://www.html5canvastutorials.com/tutorials/html5-canvas-rectangles/
Page 1 of 1
« first
« previous
next ›
last »