Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

8 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?

8 years ago by Joncom

1. You mean the Impact logo is being drawn, and you don'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.

8 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

8 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 »