Closed sanguchi closed 11 months ago
Unfortunately, Pyxel does not have a mode to launch without a window. The reason is that the frequency of using such a feature is very low, and providing this functionality would be meaningless without also offering additional features to utilize it (for example, the ability to copy the contents of the screen to a different UI framework).
A more practical approach seems to be accessing Pyxel from a separate layer. For instance, one could obtain the window handle of Pyxel in a platform-specific manner and then set the display attributes of that window to be invisible.
Is there any way to run pyxel in a mode that does not create a window? Currently i'm running pyxel normally for a game that is 64x64 but for every frame in the draw function, i store the graphics contents as a class variable:
Then i load that array with numpy and PIL to create a PIL.Image and show it in a tkinter canvas
I'm doing this to get the game frame and feed it to a neural network, but also i want to display the current game state in the tkinter window.