News for hackers. Stuff that matters.
Re:Tools we used to create a hit HTML5 game on Steam by dom96 on Wednesday November 20, 2019 @06:40PM (#21589849)
Thank you for your advice!

> If possible, avoid lots of canvas calls. For example, if you want to draw something simple like a bunch of boxes on the screen, grab the pixel array from the canvas and manipulate it directly, don't call `ctx.rect` in a for loop.

I think this is likely what's causing me the most trouble. The problem is that my game needs to draw many hundreds of circles, each of different colors/sizes. Perhaps I need to pre-render these to an off-screen canvas and then do some blitting.

I'm also tempted now to try what someone else suggested and target WebGL instead (likely via Pixi.js).

There are no comments on this comment yet.