[Ohrrpgce] Subversion-like game updates

James Paige Bob at HamsterRepublic.com
Tue Dec 1 12:09:20 PST 2009


On Wed, Dec 02, 2009 at 08:42:29AM +1300, Ralph Versteegen wrote:
> 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.

Interesting. Good point. I was thinking that bug 656 would allow you to 
ignore most conflicts in the gen lump, but as you say, a dumb binary 
merge would do the trick.

> SVN itself refuses to do binary merging.

I read up on the SVN FAQ, and it appears that SVN actually does support 
binary merging internally, but refuses to do it by default on files 
marked as binary.

You should be able to enable binary merging by manually marking binary 
files as text with svn setprop, and making sure that have svn:eol-style 
that won't break anything (I think either unix or windows would be okay, 
since they are consistent, but native would be breaky)

I really want to try this now :)

I'm pretty sure that git could do this too, but I am not clear on the 
details.

---
James



More information about the Ohrrpgce mailing list