Version Control and programming with a team

Started by
19 comments, last by Dynamo_Maestro 10 years, 5 months ago

Hi, I'm quite obviously new to software development in general, but a group of friends and I would like to develop a video game, however we have no idea how to work on the same project at the same time. I have looked at things like Github and sourceforge, but we don't quite understand the whole thing and would prefer not to have our project open source. Currently, I just have the workspace in a shared dropbox folder, but I don't think that is going to work once we really start working on this all of the time. If there is somewhere I should look for more information, I'd really appreciate a link.

Advertisement

There are other websites that give you private repositories without paying, one example is Bitbucket. If you never used version control you will find Mercurial/hg easier to use than git. git does basically the same with much more complicated commands that allow a bit more freedom with advanced features, without configuring it first to allow them.

You are right about getting a proper version control system. Not using version control feels like jumping from a plane without a parachute. The ability to roll back in time and look at the full history of the project is a very important thing.

If you are just looking for the academic side, wanting to know what it is, what it does, where it has been, and where it is going, there is a pretty good writeup from a few years back by Eric Raymond (a superstar in the open source world).

You first need to decide what kind of version control system is best for your group. There are many variants and they are all described in that article above.

Once you have that, you need to have a machine that can host it. You can buy or rent computer time from a dedicated host. If you configure it correctly you can also host it yourself on someone's home machine.

Then you just do it: Get the software, install it, configure it, and run it.

Github has private accounts, it's used by thousands of companies developing commercial software. I think it's under $10 a month which gives you several private repo's.

One thing to remember is that github != git. Github has a workflow and a lot of tools to make your life easier, and there are a ton of third party services that hook into github. As far as platforms as a service for source control, no one really touches github, and you have to factor that in to your larger decision on which source control software to use.

Beyond that I would just say stick with a distributed source control system like Mercurial or Git. If you want to be able to manage different branches and merge code without pulling your hair out, don't touch Subversion.


I would just say stick with a distributed source control system like Mercurial or Git. If you want to be able to manage different branches and merge code without pulling your hair out, don't touch Subversion.

There are benefits and drawbacks to each solution.

While the ability to branch easily is often cited as a benefit, discovering that you suddenly have 1.2GB to sync and store because of a few binary file branches is certainly a drawback. It isn't just the download time, it is also the fact that even 2TB and 3TB drives run out of space way too quickly these days. If you work on a very large game that contains a few hundred gigabytes of raw assets the storage requirements of distributed systems can quickly grow into multiple terabytes. When you enter that type of model, the relatively high cost of Perforce becomes cheap relative to the indirect costs you encounter with DVCS.

Every feature is a tradeoff. Every system is different. For example, distributed version control has benefits of data locality and easier branches, and comes with a potentially serious cost of storage and sync, added complexity to keeping everyone together, and the mental cost of keeping track of which branch does what. Your project might be better with one option or with the other.

Choosing the best version control sultion is an area where there are many options that are tailored to different development styles. Learn about them all and select carefully.

Wouldn't the size problem be reduced if you avoid putting continuously updated precompiled binary files into git/mercurial and dont add all kinds of external stuff you depend on into a single repository but instead have some sub-repositories?

You could also split it up to put the source art files, the compiled art files, the compiled code into 3 svn repositories, to reduce the load in the dvcs further by only having source code inside. Or add some custom merge tool for some binary files or convert them when storing into the repository to make them mergeable.

Maybe on bigger projects people have some buildserver already that compiles everything for testing commits, that could also update the separate svn repositories for compiled things, for the artists to avoid having to compile code and the programmers avoiding to convert art files themself?

You can run Git on your web server, with authentication to restrict repository access to your colleagues. It isn't difficult; I set up Git as a CGI (using Apache on Windows) with SSPI authentication (Windows network domain) and a whitelist of allowed Windows users without any trouble.

Omae Wa Mou Shindeiru

Wouldn't the size problem be reduced if you avoid putting continuously updated precompiled binary files into git/mercurial and dont add all kinds of external stuff you depend on into a single repository but instead have some sub-repositories?
You could also split it up to put the source art files, the compiled art files, the compiled code into 3 svn repositories, to reduce the load in the dvcs further by only having source code inside. Or add some custom merge tool for some binary files or convert them when storing into the repository to make them mergeable.
Maybe on bigger projects people have some buildserver already that compiles everything for testing commits, that could also update the separate svn repositories for compiled things, for the artists to avoid having to compile code and the programmers avoiding to convert art files themself?


Compiled binary files have no reason to be in SOURCE control. Important ones, such as public packages of release or beta test versions, should be archived to Dropbox, network shared drives, or other types of "dumb" storage by build managers to let others download them as needed.
Old compiled binary files, as opposed to compiling the game by themselves, are needed by developers only for unusual reference purposes (e.g. testing that building the appropriate revision of the sources reproduces what's been released), not to be routinely updated, compared, and be copied to or from their personal workspaces like sources.

Correctly managed binary source assets are unlikely to be troublesome: they should be available to everybody (enabling all developers to build the game), which is a good reason to make all revisions easily available, and they should change only rarely and in meaningful fine-grained increments (for example, repainting a 3D model should change that model's texture maps, not a big texture atlas containing lots of unrelated images; the big texture atlas can be kept outside source control and rebuilt automatically).
A sane organization of assets and build tools is an opportunity, not a cost incurred because of source control; setting up an easy, automated and effective workflow using source control should be compared to skipping the initial effort, sinking into progressive complication and confusion, and throwing the towel (or wasting a lot of time) because of errors in manual builds.

Omae Wa Mou Shindeiru

I'll go with wintertime when it comes to git. Use it for source code (and other plain text formats) only. Large repositories can make everything annoyingly slow and git can't really shine with un-diff-able binary files anyway. Place binary assets somewhere else, even if it can be a pain to keep source and assets in sync this way (make sure whatever you pick makes it easy to get a version/snapshot based on date-time, just in case).

Or (because one might argue that huge amounts of binary assets are a major part of games), don't use git for game development.

f@dzhttp://festini.device-zero.de

There are other websites that give you private repositories without paying, one example is Bitbucket. If you never used version control you will find Mercurial/hg easier to use than git. git does basically the same with much more complicated commands that allow a bit more freedom with advanced features, without configuring it first to allow them.

Also, Github has student accounts. They allow you to make up to 5 private repos. You just need to mail Github to apply.

I also currently have the dilemma of what forms of version control to use. Complicating the matter:
- The project only runs a couple more weeks. No time to spend on infrastructure.
- Most of the team are not programmers. I'm the only one with some experience of using git/hg/svn etc., and then only with text data, not binary blobs.
- Due to the skillset and time factors, I can't ask others to learn much VCS.
- We use Unity3D, and projects in it do not play well with version control.
- At the end we'll have quite a bit of assets.

We went ahead and used git + GitHub for now, but it's so awful in these circumstances, I'm still wondering if we should just forget the repo and just dump the whole thing in Dropbox. Or what other VCS we should be using instead. I'll have another short project after this, so I really want to figure out a solution even if I don't have time to apply it for the current project.

When it is easy to separate the assets from the code, and only programmers need to touch the VCS, git and hg are great. I'd recommend Hg for newbies, Git has a very long learning curve.

This topic is closed to new replies.

Advertisement