quinton-ashley / p5play

JavaScript game engine that uses q5.js/p5.js for graphics and Box2D for physics.
https://p5play.org
GNU Affero General Public License v3.0
654 stars 183 forks source link

Physics only mode that wouldn't require the HTML5 canvas #290

Closed quinton-ashley closed 5 months ago

quinton-ashley commented 8 months ago

This would be useful for creating authoritative multiplayer servers with p5play.

This feature will be implemented via a flag like p5play.physicsOnly = true. It will prevent p5.js canvas rendering functions from being called.

For now, the npm canvas package would need to be used: https://www.npmjs.com/package/canvas

quinton-ashley commented 5 months ago

This can now be done by using noCanvas() in setup, disabling sprite drawing allSprites.autoDraw = false, and not attempting to draw anything else to the canvas.