Puzzlefy icon indicating copy to clipboard operation
Puzzlefy copied to clipboard

Draw placed pieces in separate graphics for performance

Open Stephcraft opened this issue 4 years ago • 0 comments

The gray board where you place pieces stays the same and could therefore be drawn once at the beginning in a p5.Graphics and then displayed with image() instead of doing the rendering every frame for no change. The preview feature does change the transparency of the board though.

Two options:

  • Draw dynamically the board during preview for the transparency effect
  • Find an alternative to the slow tint() method

Stephcraft avatar Nov 08 '21 03:11 Stephcraft