Open InfoTeddy opened 7 months ago
A quick stopgap measure would be to add support for dropfile events, so users can drop the downloaded file directly onto the game window and we can copy it to the levels folder ourselves.
A quick stopgap measure would be to add support for dropfile events, so users can drop the downloaded file directly onto the game window and we can copy it to the levels folder ourselves.
That'd be good to have too. Reminds me of right-click context menu integration (which was proposed in #967) and/or file extension integration (although that wouldn't work with .zip
s).
Con: I mentioned the idea to @flibitijibibo and he said putting us in cURL territory puts us in "infinite security maintenance" territory, and that is scary to do.
I don't think we have to ship our own cURL with the game, we could use system-provided functionality:
I have personal experience with this - Ved has wrappers for WinINet, NSURLSession and wget (haven't gotten around to replacing wget with libcurl yet). The downside of course is that this introduces OS-specific code. But it's not that extreme, if we just need one or two wrapper functions like https_request(url)
that returns the contents, and could be isolated into its own files. Maybe there are even libraries that do this exact thing - provide an API for HTTPS access that calls the respective OS's native APIs without shipping crypto. Or maybe it's an idea for SDL.
A quick stopgap measure would be to add support for dropfile events, so users can drop the downloaded file directly onto the game window and we can copy it to the levels folder ourselves.
This would also be a really cool thing to have. Maybe for sharing a level with others, there could also be a "share" hotkey which opens and highlights the level file in a file explorer for you or something?
NSURLSession on macOS
Actually, now that I think about it, doesn't macOS ship libcurl too? So that'd mean we may be able to use the system libcurl on both Linux and macOS, and then only still need to worry about WinINet.
Once we move to using the C++ implementation on mobile, we'd still need to have an NSURLSession backend for iOS. Additionally, I'm not sure that Apple guarantees ABI stability for their downstream libcurl.
Right now, to play a custom level, you must manually download it and drag it to the levels folder. This is inconvenient.
There are two things we could add to make custom levels more convenient to download.
With Steam Workshop:
With a level downloader:
Some other things we could add:
Thoughts?