Puzzlefy
Puzzlefy copied to clipboard
Draw placed pieces in separate graphics for performance
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