Hacker News new | ask | show | jobs
by rollcat 533 days ago
> cross platform/web/mobile distribution

Unfortunately, each and every platform has its own unique quirks[^], and I think the problem is too large for a project like LÖVE to tackle.

In fact, LÖVE's authors have already done "90% of the work in 10% of the code": you can make a ZIP file, change the extension to .love, and just distribute that. Install LÖVE, double-click YourGame.love, and you're done. You can also concatenate the game executable with the ZIP file to create a self-contained binary distribution for that target platform (super old & cute trick; it's possible because ZIP's "header" is in fact, at the end of the archive).

[^]: In 2016 I've attempted a "one game per month" challenge; but I also wanted to distribute executables for Windows, macOS, and Linux, so that all of my friends could just play them. It went something like this:

- Windows: distributing executables from your personal domain is considered a crime; the browser and the OS will yell at the user, block the download, blacklist you, etc.

- macOS: simply concatenating won't work; you need an elaborate dance to create a .app bundle, and distribute that in a .dmg - good luck building that on a Linux host, also good luck debugging without an actual Mac. Nevermind code signing, you can bypass that with shift-right-click-open. Oh wait, macOS 15 won't let you.

- Linux: are you ready for the .so hell?

- BSD: bonus! The documentation for SDL_GetPlatform doesn't even enumerate all of the possible values! You need to source-dive to get them: https://github.com/libsdl-org/SDL/blob/f45ce45603a00e92332f9... - plus any possible patches in ports; most developers won't ever care, and will just hardcode "Linux". Checking for $DISPLAY is also unreliable: macOS users may have XQuartz installed, Wayland purists may run without XWayland, etc.

1 comments

DragonRuby did it: https://dragonruby.org/
And many other frameworks did it too. LÖVE decided it's out of scope, and that's a 100% valid choice, considering the breadth and complexity of the problem. They still went quite far in ensuring it's no more difficult than it actually needs to be. Similar with e.g. cross-compiling Go programs (unfortunately, no cgo-less, cross-platform framework for interacting with windowing systems/video hardware exists).
Yes, but most other engines are much larger scope and fundamentally different purpose than LÖVE. DragonRuby, however, is in the same camp: code-first, scripting language (Ruby vs Lua), beginner-to-expert friendly. So my point was there are (at least one) project(s) very similar in purpose and size/scope to LÖVE that did solve for cross platform.