[aquaria] Putting mods in a package/mod manager

Andrew Church achurch+aquaria at achurch.org
Mon Feb 21 20:21:28 EST 2011

>I was thinking, for easy distribution, mods could go into some sort of
>package. Looking at the current PackRead.cpp, it seems that the
>current code is not too useful. So before I commit some time in making
>things work, I want to get some perspectives on how feasible putting
>things in a package is.
>What's everyone's opinion?

There's an upside and a downside.  The upside is faster data access,
because each open operation becomes a simple table lookup (this is what
cut startup time from 740 to 14 seconds in my unofficial PSP port).  The
downside is that it becomes much harder to edit individual files, since
you have to extract them, edit, and then repackage the edited files.

If you look at PSP/src/{resource.h,resource/*} in my repository
(http://achurch.org/cgi-bin/hg/aquaria), you'll see the package loading
code I used for the PSP port.  Unfortunately, the comments are all in
Japanese, but hopefully the code itself is readable enough if you're
curious at one way to implement packages.

That said, for PC implementations you might give serious thought to using
a standard format like ZIP.  PCs aren't as resource-limited as handheld
systems, and if you use a standard archive format then you save people
the trouble of having to build and use custom tools to edit game data.

  --Andrew Church
    achurch at achurch.org

More information about the aquaria mailing list