You can download the file with an HTTPRequest
node (code below) but as far as I know, you cannot extract archive files.
You can however load .pck
files at runtime (godot's file format for storing the res:// filesystem at export.) You can choose what files you place in the PCK per export preset. This could be used to somehow load a small game, or you could download this and a .exe
to launch the game separate (I do this for a similar project to yours.)
Download a file with HTTPRequest
(put this code in a HTTPRequest
's script):
func download(url : String, target : String):
download_file = target # where to save the downloaded file
request(url) # start the download
HTTPRequest has a signal that it emits when the download completes, you can use that to do something with the file, then delete it.
You can also delete files using the Directory
class's remove(path)
function