TerryCavanagh/VVVVVV

Tighter integration of custom levels

Opened this issue · 5 comments

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.

  1. As some players have suggested, add Steam Workshop support.
  2. Add our own download integration with remote level repositories, defaulting to the VSIX levels database.

With Steam Workshop:

  • Con: Vendor lock-in. I personally want a way to download all the level files from the Workshop just to avoid being totally locked in to Valve's ecosystem. While Valve long has a reputation of being benevolent, they did recently just DMCA a Team Fortress fan mod, so... they're not actually that great.
  • Con: Other users (GOG, Itch, Humble Store, etc.) will not be able to use the Steam Workshop. This is especially true for Make & Play, as the entire point of Make & Play is to provide users with access to custom levels without having to buy the game.

With a level downloader:

  • Pro: Anyone can use the downloader and they don't need to specifically buy the game on Steam.
  • 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.

Some other things we could add:

  • Dragging and dropping a level file on the game window to automatically copy it to the levels folder.
  • Integration with right-click context menus and/or file associations.
  • A URL handler for level downloads.

Thoughts?

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 .zips).

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:

  • The system libcurl on Linux (cURL is one of the few libraries that's priding themselves on keeping their ABI stable, and has done so for decades, so we could just dlopen it right?)
  • WinINet on Windows
  • NSURLSession on macOS

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.