Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For my game, now I adopt the strategy to create multiple scene. For this I have to ask two question please provide your view for my and other members for improvement.

I have created single TextureManager class in which I load all the graphics of the game which is at least 50 MB.

-> My first question is that this much loading of texture will create any problem in game performance,So all the scene in the game have reference to this TextureManager class and they access corresponding texture region using dot operator. if other better strategy for this texture loading then please suggest me.

-> My second question is that my actual game scene uses bound camera and I perform scrolling on that camera but my other scene uses the normal camera. So in this situation what to do? how to use multiple camera for single engine? or how to reset available current camera?

My current working platform is andengine.

Thank for you support.

share|improve this question
    
so may I ask why did you add all those other engine names to your question? –  Ali.S Jan 11 '13 at 1:42
    
I think that concept of game development remain same for other platform also. I want to know about how other engine people handle this situation. Thanks for you attention. –  Siddharth Jan 11 '13 at 5:22

1 Answer 1

My second question is that my actual game scene uses bound camera and I perform scrolling on that camera but my other scene uses the normal camera. So in this situation what to do? how to use multiple camera for single engine? or how to reset available current camera?

Our 3d game engine allows us to create as many render targets we wish. A render target is basically a window where we actually project the 3d scene. Generally, there is typically only one render target, but in some cases in the editor and tools, we do have up to 3 render targets.

A render target allows us to create as many viewports we wish within the render target's area and place them as we wish. Such a design allows you to create a minimap viewport or even a split-screen viewport often found in co-op or two-player console games. Viewports are basically a means of dividing the render target's area in specialized regions.

Then, in order to create multiple scenes, we do this by creating a new scene manager for each scene we want to manage. Each scene manager allows us to define as many cameras we want. I could place 10 cameras easily into a scene all with different vantage points of a scene.

The key here is that the viewports associated to the render target can be attached to a specific camera. By attaching a specific camera to a viewport, I now have associated a specific scene to a viewport and the perspective rendered is that of the attached camera.

I find such a design to be helpful in keeping things decoupled at various layers and is very flexible.

-> My first question is that this much loading of texture will create any problem in game performance,So all the scene in the game have reference to this TextureManager class and they access corresponding texture region using dot operator. if other better strategy for this texture loading then please suggest me.

It isn't uncommon to do some loading of resources, creating textures that may be needed later and keeping those in memory for use when needed. If you think about any console game, there is usually this "Loading" game state where a lot of this activity happens. The nature of consoles often require such management of resources and memory since background loading of assets isn't optimal as it may be on a PC for example.

In our case, we use a single TextureManager across all scenes. Our rule is that two scenes can't expect to use the same texture name if they're expected to be actually be different. Such a design imposes the responsibility on the scene loader to handle the cases as needed but allows the sharing of texture resources across multiple scenes if the need existed.

In the cases where the textures need to be different, the loader just loads the textures in the manager with a name scenename.texturename so that they are allocated uniquely per scene.

share|improve this answer
1  
I up voted your effort and figure out what become useful to me but the correct thing what I require does not found. So I don't mark as correct. –  Siddharth Jan 13 '13 at 13:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.