• Advertisement
Sign in to follow this  

Source Code Managing

This topic is 4379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, so I'm about to start development of a 3D video game. The game is eventually going to have many source code, audio, 3D, and image files. To help keep track of all these files I'm making a web based management tool with PHP that will allow the team members to download and upload files. This web application will let you create sub directories to categorize files. So you could make folders for source code, animations, images, audio etc. Lets say you have a file named animation.c. When a user uploads the file it won't overwrite the pervious version, it will make a new version of the file and tag it with the upload date and time. So when you go to view the versions of animation.c you will get a list of all the versions ever uploaded organized by their upload date/time. So if you need to edit the latest version you just download the one at the top of the list. This also keeps people from accidentally getting rid of old versions that you may need to roll back to. Each directory, and file will have a description, and you will be able to add comments to file uploads so that people know what you changed, what needs to be done, etc, and other users will be able to reply. Below is what the directory structure of a project might look like. PROJECT NAME -AUDIO --SOUND1 ---SOUND1 17/05/05 ---SOUND1 15/05/05 ---SOUND1 14/05/05 ---.......etc -CODE --TERRAIN --AUDIO --PHYSICS --CACHE -MODELS --CHARACTERS --NPC Using something like this will allow you to create a list of tasks that need to be done so that your team stays on track and so that you can see how far you have progressed. I also think that this would be a great tool for planning your project and assigning tasks. Has anyone ever developed or used a system like this? If so did you run in to any trouble, or did it help you a lot? Is there anything else like this avaliable out there? Once I finish developing this I will probably make it avaliable to the GameDev community. Thanks for the feedback.

Share this post


Link to post
Share on other sites
Advertisement
It sounds suspiciously like CVS, doesn't it?
http://www.nongnu.org/cvs/

There are web-based versions (WebCVS), as well as native versions for different OS systems (WinCVS, etc).

Similar source control (or, in fact, entire asset-control) pipelines are done by a whole bunch of other companies (Perforce, Subversion, BitKeeper, humble old MS Visual Source Safe, and many others). Don't try to re-invent the wheel here; just go and pick one of the off-the-shelf ones.

Allan

Share this post


Link to post
Share on other sites
DAMN! Oh well, I've already put some time in to it and I'm not going to let that work go to waste. Besides it's a simple application anyway and won't take long to finish.

Share this post


Link to post
Share on other sites
A big advantage of CVS and Subversion and all other existing systems, is that multiple people can change a file, and the changes get merged into a new version. That is something that is missing from your application.

You might want to build that in, or (and I really think you should go that way) go with existing software like Subversion. Then you can spend your precious time on programming a really cool game, which kinda is your actual goal, isn't it? [wink]

Share this post


Link to post
Share on other sites
Source control isn't simple; existing source code software has solutions to problems that you probably haven't thought of yet and also have come along with some pretty slick interfaces (like TortoiseCVS and TortoiseSVN). If nothing else you should at least look at existing source control packages and see what they can do before you do any more work on your own.

Share this post


Link to post
Share on other sites
Quote:
No.


Yes.

-Login system
-File uploading
-Organize by category
-Order by date
-Simple user comment database

What's difficult about that?

Share this post


Link to post
Share on other sites
No.

- Branching, vendor branches, merging
- Interaction between file renaming and versioning
- Atomic transfers of multiple files
- Only downloading or uploading required components
- Locks

Are only a few. Add to this the fact that there is no way for a simple web interface to reach the same ease of use as an OS- or IDE-integrated system.

Now, a question for you: what typical use do you intend for your system? Will you be able to perform 'global commit' (put all the files I have modified online, except if there is a conflict, in which case don't) and 'global update' (download all files for which I have an outdated version, without overwriting any modifications I have done) operations? These are the fundamental source control operations once can expect to happen a dozen times per day in a small team (hundreds of times per day in a large company).

Share this post


Link to post
Share on other sites
Quote:

-Login system
-File uploading
-Organize by category
-Order by date
-Simple user comment database


In a nutshell those are going to be the only features. Each asset of the game is only going to have 1-2 developers so the need for more advance features just isn't there. Not sure if I'll have a global commit/update feature.

Share this post


Link to post
Share on other sites
Perforce is "The Tool" right now for code and resource management. CVS is nice for a small project, but we had a lot of headaches on big projects with hundreds of GBs of data. I recommend u to have a look at Perforce.

Share this post


Link to post
Share on other sites
Quote:
Original post by I_Smell_Tuna
Quote:
No.


Yes.

-Login system
-File uploading
-Organize by category
-Order by date
-Simple user comment database

What's difficult about that?


It's very difficult because you are looking only at nominal operations and no corner cases. For example:

Programmer A and B both download file Z from your site on Friday. Both users make changes to the file over the weekend.
On Monday, programmer A uploads the new version of file Z.
Programmer C downloads file Z on Tuesday, makes a change and uploads it.
On Wednesday programmer B finally gets round to uploading his version of file Z and ends up clobbering A and C's changes.

So who gets to go through both files to see what has changed and create the new merged version? CVS, and subversion do this for you.


Oh, and don't bother with CVS or Subversion, use DARCS

Share this post


Link to post
Share on other sites
Quote:
Original post by I_Smell_Tuna
DAMN! Oh well, I've already put some time in to it and I'm not going to let that work go to waste.
Oh if only I had a penny for every time that classic mistake has been made. You have wasted X amount of time before finding out that you are reinventing the wheel. Investing more time to duplicate something that already exists won't change the fact you have wasted time, it will just increase the amount of time/effort you have wasted.

It's the mistake too many publishers make. They invest in a game, it goes off the rails. Instead of cutting their loses and focusing their efforts on another (more successful project) they plough more money into the duffer because they don't want to waste their original investment. Its wasted, nothing will change that.

Share this post


Link to post
Share on other sites
For an example of why it's hard to write what you describe, I'll let someone who understands it better explain why even such big products as MS SourceSafe didn't get it right... if your simple application screws up storing a large file it could waste/lose days of work.

Share this post


Link to post
Share on other sites
Quote:
Original post by d000hg
even such big products as MS SourceSafe didn't get it right...

There's the understatement of the year...

Share this post


Link to post
Share on other sites
I never quite understood exactly what the problems are with SS - can you fill me in? Because as someone using it at work I like it very much - a proper visual client application which is SO much better than TortoiseSVN for example, or maybe even a bit better than Perforce.
The problems must be with the server side of how it actually works then?

Share this post


Link to post
Share on other sites
While I haven't used it myself, I've heard more than enough horror stories of corrupt databases to steer well and truely clear of it.

Share this post


Link to post
Share on other sites
Quote:
Original post by d000hg
I never quite understood exactly what the problems are with SS - can you fill me in? Because as someone using it at work I like it very much - a proper visual client application which is SO much better than TortoiseSVN for example, or maybe even a bit better than Perforce.
The problems must be with the server side of how it actually works then?


Ah... VSS.. brings back memories.

Haven't used it since VC6, thankfully. When the rep server went down, the entire programming department would be screaming at the tech-guy as their computers hard-stalled every time they accessed a VSS secured file from VC.

It had an issue with large data-sets (using it for more than 500MB was a kind of russian roulette).

It had a nasty habit of eating chunks of data, but it was doing so silently. One day you'd try to check out that physics code you were working on last month, only to find it gone. And with no idea WHEN it had been 'recycled', find a valid backup was.. Fun..

Really didn't like big files (was okay for .h and .cpp, but God save you if you tried to dump a 100+MB PSD file in there, the whole thing would go down like a drunk on friday night).

The VS integration WAS nice, though. I wonder why noone else has built a perforce/subversion/CVS client interface that slick.


As far as I know, the VSS team themselves refuse to use it for their codebase. There really IS something to be said for eating your own dogfood.

Allan

Share this post


Link to post
Share on other sites
When working remote (over the internet) with Sourcesafe, you
need an active VPN connection - doing an update (lock) is _slow_.

You can work "offline" with cvs and commit the changes whenever you want.

In sourcesafe you have files exclusively which I always though
was nice, but since we started using cvs I actually got used
to not having exclusive access (you actually rarely have 'collisions').

Also we had a corrupt sourcesafe database - the admin tool wouldn't
allow you to "backup" your codebase.

I also did like the IDE integration though - that was really much nicer
than using tortuise-cvs in the explorer to update/commit.

Share this post


Link to post
Share on other sites
I guess one thing MS can do is interfaces to their development tools. They spend enough on that side of things though!

I like the exclusive checkout thing better than the CVS system.

If it wasn't GPL or whatever I'd consider making a SS-style front-end for SVN/CVS to replace the AWFUL WinSVN/WinCVS. Can't be that hard can it - but then look at the Blender and Gimp interfaces, OS apps seem to rely on you spending a lot of time figuring out how to do anything...

Share this post


Link to post
Share on other sites
I found GIMP quite easy to use. =0

But I agree, OS tends towards functionality over ease of use. Probably 'cause all the developers are programmers and we (as a group) tend to over-look how hard some things are for other people to figure out since we've been working on something since Day 1 TM.

Share this post


Link to post
Share on other sites
I can quite see why it's this way. But it's still not good. Out of interest if I made a decent front end for SVN could I sell it if it used SVN source code?
What about if it just called into the SVN commandline?

Share this post


Link to post
Share on other sites
Quote:
Original post by d000hg
Out of interest if I made a decent front end for SVN could I sell it if it used SVN source code?
What about if it just called into the SVN commandline?

Yes. SVN is licensed under more or less the same license as Apache. You could use the Subversion code in a commercial project (just like there have been commercial solutions based on Apache code).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement