hecrj / coffee

An opinionated 2D game engine for Rust
https://docs.rs/coffee
MIT License
1.08k stars 55 forks source link

Can coffee run truly headless? #141

Open fairbairn opened 3 years ago

fairbairn commented 3 years ago

We currently have a project in ggez, but want our system to run headless with a cloud based GPU machine.

ggez does not allow us to run without creating a window, even though we can render to an off-screen canvas. The window is basically blank, but displayed.

Can coffee do what we desire?

Our application does real time video encoding with effects and when deployed, does not require a window, which would require x11 contexts vs just the GPU drivers.

The idea of leveraging wgpu backends vs only opengl is also enticing.

Ideally we'd code our system to utilize a window for feedback when debugging (we'd copy the off screen canvas to the window), but when deployed we'd disable it entirely.

We did not see an example in coffee that would demonstrate a simple headless setup, ie, just draw to a canvas and save out the canvas as an image file as a simple demonstration.

Any insights would be appreciated. We think the port to coffee would be pretty easy if it supports this capability.