Game Development Reference
In-Depth Information
undo all the way back to the point where you fixed the bug. And anyways, you
don't want to lose one week of all the other changes.
Source control provides a clear history of every single file and when it was
changed. It shows all previous versions of the file that were submitted, and used
properly it provides detailed descriptions of why the lines of codes were changed
in each version. With source control, it would be relatively easy to go through
the change history and find out the specific fix that was implemented, which will
provide much insight as to why the game broke again.
Although extremely useful for even a solo developer, source control is almost
mandatory for a team project. With source control, you can have a centralized loc-
ation that has the latest version of the code. Team members can make sure they
are always synchronized, and there is a very clear history of who changed what
files and why.It also allows youto manage scenarios where multiple programmers
change the same file, which is pretty much a nightmare without source control.
Numerous different types of source control systems are available, but once you
become familiar with one system, it typically is not that difficult to use another.
There are always going to be differences in the workflow, but the basic premise is
the same. This section covers two of the most popular systems: SVN and Git. The
discussion of Git is more detailed, simply because that's what's used for the code
samples in Chapters 13 and 14 . But that doesn't mean Git is the best solution in
every scenario.
SVN
Subversion, or SVN , is a centralized source control system. In SVN, you first
“check out” a copy of the code from the central server (called a repository ). When
you make any changes that you want to submit back to the server, you “com-
mit” them. All operations, including checking out, committing, and updating to
the latest version, must go through the central repository. The advantage of this is
that the central server will always have the latest version, but the disadvantage is
that operations can be slower because they always have to travel over the network.
Because SVN requires a centralized server, you have to set one up to use this
source control system. You have a few potential options for servers. If the project
in question is open source (meaning anyone can freely access the code), several
differentwebsiteswillhosttheSVNserverforyou.Somepopularservicesinclude
Google Code ( http://code.google.com ) and SourceForge ( http://sourceforge.net ) .
Search WWH ::




Custom Search