How to manage game content for different builds

Discussion about everything. New games, 3d math, development tips...
Post Reply
chrizzly
Posts: 2
Joined: Fri Jan 17, 2014 3:18 pm

How to manage game content for different builds

Post by chrizzly »

Hello community,

I have a rather general question regarding "state-of-the-art" ways to manage game content.
At the moment I'm maintaining the same game assets folders for different build configurations (e.g. Debug x86, Release x86, Debug x64, Release x64),
so apart from wasting space on my version control system I also have to keep track of added assets and make sure I don't forget to add them also
to the other builds.

I don't want to simply put my assets into a central folder and change the working-directory or whatever poject-setting is needed in order to find my assets, furthermore
I'm looking for a solution that provides all the benefits I have at the moment, like not having to copy files somewhere when compiling/rebuilding my project.

How do you tackle this problem?

In C#, what I'd propably do would be making a project dedicated to only manage game content (like XNA does it), and reference it from all my different build configurations.
However, as my problem is more that Irrlicht needs the majority of the resources, I'm at C++ again.

Any tips and help is highly appreciated.
cheers
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to manage game content for different builds

Post by CuteAlien »

I don't really understand why you don't want one central folder. Do you have different assets for different builds?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: How to manage game content for different builds

Post by Cube_ »

I don't quite get the question either.

But how I handle my asset management during early development with many build tests would be to symlink to the real assets folder, that way I can have one centralized folder (usually a dummy full of symlinks to my working directories)
For adding functionality I wrote a plugin system (that I might share some day, I don't really plan on it though) with version control and a bunch of other lovely features such as being 100% type-safe and thoroughly tested for vulnerabilities, so far none have been found.
But I digress, as I was saying I handle it through a plugin manager and (during early testing) a symlink to a centralized assets folder. (usually one with dummy assets I use for testing things, nothing that'd actually make it into a game)
"this is not the bottleneck you are looking for"
chrizzly
Posts: 2
Joined: Fri Jan 17, 2014 3:18 pm

Re: How to manage game content for different builds

Post by chrizzly »

Thanks for the fast answer, what a lively community ... just came back from lunch break and already replies :)

Sorry if I wasn't clear enough with my problem, it's always complicated to formulate a question as someone who exactly knows where the problem lies, but not how to explain it to others.

Actually I would go for the suggested centralized folder, I just don't really get how to map the symlinks in my Subversion repo. Will SVN maintain the symlinks so someone who decides to check
out my project will have the same referenced folder?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: How to manage game content for different builds

Post by hendu »

I think you're on windows, and symlinks aren't too good on that OS. Very restricted and not supported by most programs. So do your central dir with paths instead.
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to manage game content for different builds

Post by CuteAlien »

The way I work in small projects is that I set the media-path relative to the placement of the binary/exe. And then set the working path to the folder of the binary. So you just have to ensure all the binaires of your builds have the same relative path to the media.

For larger applications I tend to have a variable for the base-path which can be set in different ways. On Linux I usually try to figure out the path the binary is in (you can get that through a mixture of working-path and main function parameters). Or I have a config-file for it which has the media-path. On Windows I usually let the installer write the installation path into the registry and read that value out on start.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply