Mocking Love?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Hugues Ross
Citizen
Posts: 99
Joined: Fri Oct 22, 2021 9:18 pm
Location: Quebec
Contact:

Mocking Love?

Post by Hugues Ross »

Does anyone know of an existing library that provides a mock version of LÖVE's API, for things like unit tests & automation scripts?

I had a very brief look around, didn't really find anything so I figure I should ask here. Writing some simple replacements for the handful of calls I need to replace right now wouldn't be difficult, but I'll probably need more later on and this seems like a simple enough use-case to offload on an existing solution if it exists.

If you know of anything along those lines, please let me know!
User avatar
dusoft
Party member
Posts: 547
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Mocking Love?

Post by dusoft »

Nothing that I know of. You can override love modules to make something similar.
Thy Posh Dev
Prole
Posts: 4
Joined: Fri Jun 28, 2024 1:09 pm

Re: Mocking Love?

Post by Thy Posh Dev »

Wdym by automation scripts?
User avatar
Hugues Ross
Citizen
Posts: 99
Joined: Fri Oct 22, 2021 9:18 pm
Location: Quebec
Contact:

Re: Mocking Love?

Post by Hugues Ross »

I'm using that term as a shorthand, but that can cover a lot of tasks like
  • Asset validation
  • One-off scripts for mass data conversion
  • Analysis scripts, for instance my current game has one that scans the full dependency graph for any given asset
  • Packaging, stripping / minifying data for game releases
The list goes on. It really depends on the game's needs, simple games probably don't need to do any of the above but stuff with particularly complex data can benefit greatly from these kinds of scripts. You also don't necessarily need to mock love to do these things, it depends on code architecture as well.

EDIT: Oh, and to give this thread some closure--I wound up throwing together a solution in the project I needed it for. Probably won't release as a library since I'd have to do extra work to fill in the rest of the API, but my needs are met :nyu:
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests