LocalServer-GodotLocal Server Controller
MainlyGodotWeb version of the game, the front end of the web page to do local running preview.
By YFan
LocalServer-GodotLocal Server Controller introduction based onGodot4.6development, user interfaceGDScriptWritten, the underlying service relies on the Windows's own PowerShell and..NETHttpListener. 1. issues GodotExport the web version of the game, double clickindex.htmlCan't open, because the browser prohibits the web page from reading local files directly. The old way to usePythonOpen the server, command line input.python-mhttp.server, but the user is not necessarily installedPythonIt is unrealistic to let novices knock on the command line. 2. resolved make a small tool substitute Windows double click exePythonOrder. Don't install anything, rely on the system's own PowerShell to run, with a graphical interface, click the button to start, stop, open the browser. How to use 3. LocalServer-Godot-4.exe file into the exportedgodotGameindex.htmlDirectory, double-click exe to run → click "start" → automatically open the server and open the browser → preview the game → run out of point "stop". How to implement 4. script the generated ps1 script is placed inGodotThe user:// directory, the actual path is generally: c:/Users/username/AppData/Roaming/Godot/app_userdata/Project name/ generate files in this directory: server.ps1: HTTP server main script with while main loop quit.ps1: Stop the script and clean up the residual process. server.pidPID record file, also as a stop signal GitHubWarehouse: https://github.com/YFan-Git/LocalServer-Godot-4