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

Re: Open source game design: What IS an RCS server?

Shadow Mint wrote:

> Two things, what IS an RCS server, which is supposed to be so good for
> colaborative game design?

You probably mean CVS instead. RCS is a rather lower level tool to keep
version information about files (at the level of "gzip is a tool that
compresses files").

CVS is a client-server system that operates on group of files (called
"modules") and keep global versioning information. For example, a
"release" of a software is really constituted of a lot of files, all of
differing versions. The files that gets modified a lot have higher
versions numbers, those who are modified less often have low versions
numbers. CVS let you "tag" all the files by saying "release 1.2 of my
software is made version 1.42 of foo.c, version 1.7 of bar.c, ..." and
so on. Which is much simpler!

In addition, since it is client-server, you can have a CVS server on
some machine on the network (possibly on the Internet) instead of
needing to have the versioning database on your computer. CVS uses the
RCS file format (but not RCS itself, altough it used to in previous
versions) to store its data. We call the main database the "repository".

You have many commands to your disposal with the CVS client: "checkout",
which let you get the current version of a module, "update", which
update your module with modification made by others that were added to
the repository, "commit", which sends your modifications to the
repository (so that when other people do an "update", they will get your

CVS has this special feature: with other systems like it, when you want
to work on a file, you have to tell the system you want to modify it,
which causes the system to put a "lock" on it, then denying similar
requests by other to do so. Thus, only ONE person at a time can work on
a given file. CVS doesn't have "locks", instead the "update" command has
a merging feature that combine your work with what has been done while
you were working on the file. If there are "conflicts" (say you and
another person modified the same line in different ways), CVS will tell
you to work them out manually, but in reality, they are not that often
(people will often work on different functions in a same file for

Indeed, CVS means "Concurrent Versioning System", since people can work
in a concurrent manner.

It isn't perfect, but it is great nonetheless! I wouldn't want to work
without it!

> And, two, I'm having trouble keeping processing time down; Is there any
> way with out the use of the setpriority function in C to make it execute
> faster? I'm trying to avoid making it essencial to run the game as root.

What do you mean, keeping processing time down? Are you saying your game
uses too much CPU and you want to lower its use of it? Or that it isn't
getting enough?

If you want to *lower* your priority (make your process use less CPU,
making it run slower), you can do a setpriority of that sort without
being root. root is only required to raise a priority.

But a better strategy would be to make your game "give up" at a
strategic place. You can put something like sleep(0) (yes, sleep during
zero seconds, this will let the CPU run other processes, but will come
back right after) or usleep(1) (sleep during one microsecond). That way,
you *choose* when to give time back to the system when it is appropriate
(like, not in the middle of a blit operation!)...

If your game is an X Window game and you have no problem with this, you
can simply block on the XNextEvent function, this will give up the CPU
until there is a event in the case that there is no event, which is
quite what we want (if there's nothing to do, no point in using the

If you want *more* CPU time (your game isn't getting enough), well, what
can I say? Optimize further, buy bigger computer?

Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi