[Ohrrpgce] Subversion-like game updates

Ralph Versteegen teeemcee at gmail.com
Tue Dec 1 11:42:29 PST 2009


2009/12/2 Jay Tennant <hierandel8 at crazyleafgames.com>:
> I'm getting 6 guys together to work on a game idea a friend has, and it occurred to us that we cannot work together simultaneously on the game file. That is, one person would be building the game file, and everyone else could work on content. Which is ok.
>
> However, it'd be _very_ nice if we could each have a copy of the game file, and if one updates a section of the game, those updates could be merged with the other game copies. For example, if John edits maptile set 0, and Frank edits maptile set 3, a single file will merge the updates of John's maptile set 0 and Frank's maptile set 3.
>
> That's the concept. It's not too unlike using subversion to update the ohr wip. Feel free to expand on this. Has this sort of thing already been done? Are there other projects converting the files to other format structures, ie. xml?

All game data is stored in fixed length records (possibly as little as
2 bytes in length), with very very few exceptions that I can think of:
script related lumps, which is not a problem because all of them are
generated from the .hs file, fixbits.bin, and music & sound effect
files.

Therefore, doing a dumb binary merge of each lump after importing the
latest scripts and ignoring identical changes (eg. upgrades and script
trigger corrections) should work extremely well, breaking basically
never unless two people try to both add a new textbox or something at
the same time, or to edit the same record.

I've never actually tried it or heard of anyone else trying it though
or even suggesting it. It only occurred to me right now how easy it
would be. Bug 656 would be irrelevant.

SVN itself refuses to do binary merging.

> Is the file i/o contained entirely within loading.bas and lumpfile.bas?

If you mean loading specific types of data (eg hero definitions), no,
that's all over the place. If you mean low level generic file access,
no, there's more in allmodex.bas and reload.bas and probably
common.bas and elsewhere.

The new lumpfile.bas stuff is in progress, not used yet, and fairly
untested. It will be pretty flexible, it would be possible to allow
several people to edit the same game remotely stored on a server at
the same time, or to create and commit an SVN changeset every time you
edit a game, if that's what you're thinking  :)



More information about the Ohrrpgce mailing list