[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Freenukum game data



On Mon, 07 Nov 2022 at 08:43:25 +0100, Wolfgang Silbermayr wrote:
> It also extracts all files in lowercase, haven't looked at what GDP does.
> Currently, FreeNukum can only load these, although I intend to change that

If I remember correctly, g-d-p will extract files from the archive in
their original case combination, match them against its reference patterns
case-insensitively, and install them into the .deb in the case combination
specified by its reference (even if what was in the archive had a different
case combination), so all you'd need to do would be to make sure
data/duke-nukem.yaml listed the files with all-lower-case names.

Teaching your engine to be able to load files case-insensitively would
be nicer for people who have copied the data directory from a Windows
installation without using a special tool, though.

> You pointing me to GDP got me thinking that I might want to find a different
> solution for this, always just having the extracted original data on disk,
> and not requiring it to be converted to the well-known formats already.

For g-d-p's purposes, if the original data files are not too large, it
would be best if the package contains the original data files as-is and
unmodified, even if your engine can't load them directly. One of g-d-p's
design goals is that you can run it against a copy of the game data that
was installed using g-d-p, to repack the data without access to original
game media (a bit like dpkg-repack).

It's fine to have converted versions on-disk *alongside* the originals
as an optimization, or for the benefit of an engine that doesn't know
how to load the originals - if necessary, g-d-p can run imperative code
to convert or edit them, on a "write-only" basis.
game_data_packager/games/lgeneral.py is an example of this.

> I'm currently in the process of migrating FreeNukum to the Bevy engine. The
> fact that files of different types have the same suffix (.dn1, .dn2 or .dn3,
> but the same for graphics, sound and level data), caused some issues there,
> as Bevy can only register one asset loader per suffix

g-d-p can rename files if necessary, and can look for source files under
more than one name, although the syntax for that is relatively verbose
so you wouldn't want to use it for more than a few files.

Again, if you can teach your engine to be able to load the original files
without modification, that would make it easier for people who have copied
a Windows installation without using a special tool.

> My long-term vision is to have free assets for FreeNukum as well, so that
> the game can be played without requiring any proprietary data.

That game wouldn't be Duke Nukem, it would be a different game that
happens to have Duke-Nukem-like gameplay and share an engine - similar
to the relationship between Quake III Arena and OpenArena. The way we
generally represent that is to have a free engine (packaged directly in
main or contrib), a package representing the free game that depends on the
engine (packaged directly in main or non-free depending on licensing),
and a parallel g-d-p-generated package representing the original game
that also depends on the engine (non-redistributable), so that you can
install either or both of the two games.

    smcv


Reply to: