Fearless extensibility: Extending Love2D Games

Love2D(Lua runtime with a SDL strapped on top) games are distributed as .love files, which are just a renamed .zip file containing the game assets. So I’d like to show a bit of fun that explores doing extensibility in all the wrong places!

Proteus

Let’s have a look a Proteus, a Love2D game that when extracted exposes, fonts, bitmaps, music and a bunch of other assets.

and like…

EXTEND!!

Modifying these assets do not stop the game from running, allowing you to mod the game. The game has a single png texture for all color palettes, so you can mess with it and get something like:

The assets for trees and the sun, and the walkways are all there as well, so you can modify how the game looks further by making the sun a ring:

And lastly, you can replace the entire original soundtrack(which is excellent btw) with something more gloomy that fits the new look

While this doesn’t extend the gameplay, this extends the spaces to explore in it, by A LOT, I think I must have spent 10x as much time exploring the possible worlds that can be created in the confines of the original games than playing that original copy.

5 Likes

I love this final result, just like everything you do. I think the place where I’m stuck on this prompt is this example feels like “just” extensibility. The prompt feels more about giving people the ability to make radical changes in code. How can we allow two sets of changes by different people to either fail gracefully or compose as one would expect.

LÖVE and other platforms are certainly extensible, but everything I make is also sharp-edged: it’s on computer owners to add only code they trust. Adding code from two places can fail in hard-to-diagnose ways, just like in any software project. Conversely, it’s possible to make extensions more safe and easier to diagnose at the cost of reducing their power. But I haven’t found anything to say about how to get both power and safety/predictability at once.

2 Likes

I think you’re overthinking this,

When was the last time you went ahead and modified some software that didn’t want to be modified, and how did you do it? Talk about that, I’m sure you’ve got some interesting stories hacking at programs to make them get you where you want to go.

2 Likes

I am with @akkartik here: I see extensibility, put to very good use, but the only reason to call it fearless is the context of a game running in a sandbox.

Unless the message is “use small sandboxes”, which I’d agree with, but it’s not an option for most situations.

1 Like

I’m not saying this is the definite solution for solving extensibility everywhere. It’s just an interpretation of the theme that I’ve explored, I think there’s many ways to play with the theme in other directions. I’ve shared two:

  • Extending an application via an operating system API that allows superficial modifications to programs, like THINK Pascal.
  • Extending an application via an open package format that allows the replacement of assets.
3 Likes

I do appreciate the suggestion to interpret the prompt more broadly if a narrow interpretation yields nothing…

3 Likes

Is the Wikipedia link correct? It says it uses a C# engine originally and a custom engine for the ports.

That checks out, yeah.

On the other hand, Moonring could actually be modded. I looked at it a bit, it has the full commented source code and everything in the exe, and Love2D exe files are just Windows executables (LÖVE itself) concatenated with a zip.

Yup, that’s precisely what the OP says.
If you do try it out, share some before/after screenshots ^^