darkfo icon indicating copy to clipboard operation
darkfo copied to clipboard

Support headless mode (for testing)

Open darkf opened this issue 6 years ago • 0 comments

DarkFO should be able to run headless -- that is, without an actual renderer/window. This could be used in the browser as well (and it probably will at first), but also in headless environments such as node.js (so that we can run automated tests on the command line.)

This involves either having a NullRenderer or just overriding heart.draw and whatever heart does to the canvas (since there will be none) similar to how the WebGLRenderer works.

Essentially we strip out the canvases and possibly image loading as well (depending on if we want to test image info and animations and such.)

If we want to run full headless (e.g. node.js), we'll either need to strip out the DOM as well (this means the whole ui module, and audio), or use a DOM library.

The game simulation should continue to run despite not receiving real input and not rendering.

Testing will be covered in a separate issue.

darkf avatar Nov 28 '17 18:11 darkf