Managing scenes - the proper way?

rated by 0 users
This post has 5 Replies | 5 Followers

Top 50 Contributor
Posts 79
SunBurn_Community_Licensee
Dave Posted: 02-23-2012 3:00 PM

All,

My project consists of 9 seperate scenes. Each scene, environment, and content.repo file resides in it's own directory along with all the models, textures,and effects that are unique for each scene. I then have a directory for content that is shared between the scenes. When I initially setup and imported content for each scene things worked fine. However now when I try to remove the shared content from a scene and add it again,  I get this error:

"LanderCustom.fbx: Unable to build asset.
    -More than one output asset is named "bin\Editor\Release\Content\Scenes\SharedContent\Objects\LanderCustom.model.xnb". You must explicitly specify asset names to resolve the conflict."

I'm guessing it's my method for managing scenes is incorrect. If this is the case, what is the proper way for managing scene content when you have multiple scenes and some content that is shared between them?

 

 

Top 50 Contributor
Posts 79
SunBurn_Community_Licensee

Ok it looks like using a seperate content repository for each scene is bad. I was afraid that loading everything in one repository would use too much RAM but this isn't the case. It looks like SB only loads the stuff you add to your scene. So I am now usng a seperate scene and environment file for each scene and a single repository for all scenes. Problem solved.

Top 10 Contributor
Posts 5,379
Employee
SunBurn_Studio_Licensee

Hi Dave,

Dave:
It looks like SB only loads the stuff you add to your scene

That's 100% correct, we make sure assets are loaded on demand, so only assets that are used in the scenes are loaded and use system resources.

Using multiple content repos will definitely work, but is rarely necessary.

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 500 Contributor
Posts 5
SunBurn_Pro_Licensee

Hello, I apologize if this was covered and I'm not getting it. Can I add a scene to my game without writing any code, in the Sunburn editor?

If so, can I then set it to transition without writing any code?

If not, XNA isn't foreign to me, but I'm not sure where I would try to incorporate the code posted above into my game. I would need to create a new class or game component?

 

Thanks!

Top 10 Contributor
Posts 513
SunBurn_Community_Licensee
SunBurn_Contributor
SunBurn_Pro_Licensee

Hi Justin,

When you run SunBurn there is a default scene that is loaded in the Starter Kit project.

If you want additional scenes you need to add them through the content project and then call them in code. The transitioning between scenes has to be coded in.

Cheers

Sebastian

 

 

Top 25 Contributor
Posts 304
SunBurn_Community_Licensee

Dave:

Ok it looks like using a seperate content repository for each scene is bad.

Just as a side note, having a separate content repository for each scene is a viable option.  For instance, if you have a content repository that was purely dedicated to a cutscene, then once the cutscene was done you could unload the cutscene in the background without affecting you current scene.  On the same thought, you can use multiple content repositories at once.

So in this instance, you'd have your content repository with you scene assets, and your content repository with your cutscene assets.

Page 1 of 1 (6 items) | RSS