I want to disable rendering. Is it possible on Windows?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Parjina

Hi,
My purpose is running Godot as an environment for machine learning. Since this is required training on thousands of games, I need to run the game without rendering.
I realized that there is a version called ‘Server’ but I want to run it on Windows.
So, is there a way to disable graphics and audio manually?

If the problem is having multiple windows, why can’t you just make your game in a way it can run multiple instances of the “world” within the same application? (this would obviously imply you don’t use singletons, which is one reason people think they are evil :p)

Zylann | 2019-09-05 13:08

To be honest, I didn’t understand what you meant :D. I just want to stop rendering but physics calculations and other things go on. So that calculations per frame increase from 60 to thousands. Is it possible?

Parjina | 2019-09-11 19:15

If running 1000 processes of your game on a Windows machine is what you want, and without a window, see Implement headless (server) version for all desktop platforms · Issue #11389 · godotengine/godot · GitHub

I’m not sure what Godot is even used for in this scenario though, apart from a few scripts and physics (which is actually just Bullet).

Zylann | 2019-09-11 19:17

:bust_in_silhouette: Reply From: 7yasser
VisualServer.viewport_set_active(get_tree().get_root().get_viewport_rid(), false)
:bust_in_silhouette: Reply From: SilvanaBanana

With Godot 3.2+, you can simple set

VisualServer.render_loop_enabled = false

to disable rendering.

See: VisualServer doc