I was wondering what it would be like to be able to load images and sounds as tables, and create them from tables, basically replacing uses for ImageData and SoundData with editing tables. Related to this: https://bitbucket.org/rude/love/issue/3 ... a-2d-array
Except for the performance reasons, this is really, really, really inconvenient for the engine which can't properly reference it and may need to do just that at any given time.
So... why would the engine want to reference it exactly?
And out of curiosity, which part do you think would be slow, the "loading the file into a table", or the "creating the Image/Source from a table", or both?
Both, it's indirection, and there's also benefits to it being stored in a contiguous bit of memory, which tables really don't guarantee (or try to, don't get me wrong).
Also, it needs references to.. well, do anything at all with it.
Ah, that's interesting about the contiguous memory.
I'm still confused about the reference thing though. If it was a table... wouldn't you just pass the reference of the table to whatever function you wanted? So it wouldn't need to be kept track of?
(In case I was unclear, I'm imagining functions which load up a image/sound file and translate it into a table of pixel/sample values, and then also functions which convert tables like these into Images/Sources.)