How would I go about running the engine with maybe some dummy pc.GraphicsDevice that would do nothing and would not need WebGL?
I don’t think it’s possible from the browsers perspective (I’m still tinkering with chromium-browser) to run as a WebGL supported target without actually using the GPU.
How feasible is it for me to go about nullifying the renderer’s functionality in the playcanvas engines’ code by myself?
What I’m trying to do is have the same code running on both server and the client of my game.
Good question, I have tried it in the past but various bits (mostly model component if I remember) assume a valid graphics device. We need to update the engine to support this.
I guess there are few options:
1/ Have a null graphics device. Everything needs to check
2/ Change graphics device so that the graphics context this.gl can be null. Everywhere that uses it has to check for a valid context.
3/ Create a dummy context in the case when WebGL isn’t available. This means dummy stubs for all the WebGL methods.
I suspect 2 or 3 would work best. Though 3 might be difficult. Worth bringing @will into the conversation when he’s back next week.
Thanks Max. Do you think I’m barking up the wrong tree? I would like 3D physics and all game state logic running on the server with the clients only providing control input and receiving state updates. The clients would not be running the physics.