i hold onto the potential future where i reimplement the interpreter, so i’d personally stay clear of _init. it would erode the API boundaries and make reimpl harder, and trying to hack folia from inside it would probably be a lot of headbutting walls

ironlantern72
Recent community posts
the example differs from my actual material so far. i have been placing “constants”, the statusLine bypass string, lookup tables related to the “constants”, etc in globals. i’ve packed all persistence data into prog/**. it’s a whitelist kind of situation.
a flat filter could be complemented with a whitelist/blacklist toggle, that should cover me and probably anyone who comes after me.
i’ll also note i’m willing to take a swing at implementing the features i request if given source access. they seem to be piling up rather quickly, it’s only fair i contribute back.
or a less unixy form that might be easier on the implementor (not sure)
setSaveDataFilter(
{
{ "prog", "persistent", }, --everything in <global>.prog.persistent down recursively
{ "stats", { "lifetime", "thisRun" } }, --everything in <global>.stats.lifetime and <global>.stats.thisRun
{ "settings", "!someStupidHoldover" }, --everything in <global>.settings minus <global>.settings.someStupidHoldover
-- in short: filter is a list, strings are exact matches, nested lists are forks, ends of lists are wildcards, special syntax for negation
} )
this might be overengineered. a plain list of strings + a special default value for “include everything” is realistically enough
a related suggestion, i suppose: maybe exclude some globals from being serialized to avoid trashing? from my testing, it seems that story modules get executed on every launch. this makes serializing any globals set in module body pointless (or even harmful/confusing), as they will be overwritten on game start. you could allow the game to set a glob string to filter globals by (flat or recursive). example:
prog = {money = 700, day = 1}
events = {
{ id = "merchant", day = 3, is_available = function() <...> end }
}
--only save children of prog recursively;
-- default glob would be ** for backwards compat
setSaveDataGlob("prog/**")
today i’ve been messing around with the save/load feature, and found out a few things:
- any function object nested inside a global (e.g.
T_GLOBAL_TABLE = { f = function() return 72 end}) does not survive save-reload - closures don’t seem to survive node transition, unless they’re stored in a global
- storing a closure nested inside a global like in the example above works for the duration of the node,
jump()ing to a different node does not immediately set the closure tonil, but makes it silently returnnilinstead
- storing a closure nested inside a global like in the example above works for the duration of the node,
- closures never survive save-reload
these seem like LOVE/LuaJIT quirks, so it’s not really a complaint, i just found it worth documenting. the short way to document it is “function objects don’t get saved”.
consider the following scenario: a folia game is shipped in the intended configuration (with original folia executables), but includes a standalone alternative interpreter. the interpreter is backwards-compatible and only implements folia API / small subset of LOVE2D API. no name confusion is introduced (alternative interpreter is not called folia). would you find that objectionable?
clarification: the purpose of the ordeal would be to make the game playable on more platforms / more constricted environments (such as in CLI-only mode to make it work without a displayserver)
damn i forgot about this one until now!! funny enough i happened to write a somewhat similar micro-story this year https://archiveofourown.org/works/90187861
steps to reproduce
- inside a node, use an interpolated string involving an inline call to a function defined inside the story (e.g.
$(myUtils.getStatus())) - ensure function used returns a string-coercible value
- run the node
expected behavior
string interpolates to call result (money: 522; magical orbs: fire, water)
actual behavior
string interpolates as though the call result was nil (nil)), but does not raise an “attempt to call a nil value” error
additional info
- engine version: 1.3.0
- platform: linux (WINE)
steps to reproduce
- inside a node, use an interpolated string involving an inline function call (e.g.
magical orbs: $(table.concat(prog.orbs, ", "))), by giving it tostatus(),text(),line(),say(), etc - run the node
expected result
string interpolates to call result without unexpected characters (magical orbs: fire, water)
actual result
string interpolates to call result plus a stray closing paren (magical orbs: fire, water))
additional info
- engine version: 1.3.0
- platform: linux (WINE)
I’ve meant to email it to you, but your website went down and I didn’t write down the address, so: one of my friends really liked the book and made a few fanarts of Kesh. It doesn’t have an itch account so I’m sending these on its behalf
(this comment is like 10 months late because I kept forgetting about it, wasp child has actually lived in our heads for a while now)



