Best way to draw hundreds of circles without affecting performances

Hello,

I am doing a small game that is like a mini-paint software. When holding mouse button, I add a cercle (Phaser.GameObjects.Ellipse) to the game scene. This can quickly add up hundreds of circles to the scene (note that it’s usually circles of the same size/shape, unless the user change those).

I looked at my kid playing the game, and around 10 minutes into the game, the computer’s fan starts to run, which might be caused by increase in processing.

I remember reading somewhere in the Phaser doc that it can handle lots of images in a scene, but can it also for circles. For my case, is this a right way do things? Or is there a way to transform each circle into its pixels equivalent and save then to a sprite that would represent the drawing area?

Thanks for your input.

render texture/paint

2 Likes