No subject


Fri Aug 26 13:14:27 CEST 2016


"I'd suggest that as you write your Lua code you make sure you can throw
pieces of it that you're not using out of memory, and get them back when
you need them.  We didn't do this on Grim.  As the game grew, we had ALL
of our code loaded at once, even for rooms you probably hadn't played in
for several hours, with about 2MB of overhead just to have it all
loaded.  Our savegame dumped out the entire Lua environment; despite
using zlib, our savegames were quite, uh, hefty.  =)  The first thing we
did when we started Escape from Monkey Island was to modularize the code
so that only what was needed for your immediate surroundings was loaded
at any given time... Think of this as level-specific or region-specific
code.  Any resource management you do that manages textures, geometry,
sounds, etc. for a given part of your region should incorporate the
availability of Lua code.

This also makes things a lot easier to debug.  =)  Of course, this was
just a matter of being sloppy about coding in the first place.  Lua
itself is tiny."




More information about the Scummvm-devel mailing list