Approaches and techniques for managing of game assets (resources). Usually things like sounds, textures, models, animations, etc. that take up memory.

learn more… | top users | synonyms

19
votes
2answers
2k views

If “ResourceManager” classes are considered bad, what are the alternatives?

I'm hearing conflicting opinions such as: "Dedicated Manager classes are almost never the right engineering tool" "Dedicated Manager classes are (currently) the best way to survive a large project ...
17
votes
1answer
2k views

How should I structure an extensible asset loading system?

For a hobby game engine in Java, I want to code a simple but flexible asset/resource manager. Assets are sounds, images, animation, models, textures, et cetera. After a few hours of browsing and some ...
15
votes
1answer
7k views

Designing a ResourceManager class

I've decided I want to write a central ResourceManager/ResourceCache class for my hobby game engine, but am having trouble designing a caching scheme. The idea is that the ResourceManager has a soft ...
13
votes
2answers
815 views

How should I handle missing resources?

Your game expects a certain asset to be loaded, but it isn't found. How should the situation be handled? For example: Texture* grassTexture = LoadTexture("Grass.png"); // returns NULL; texture not ...
13
votes
1answer
5k views

Game Engine Design – Ubershader - Shader management design

I want to implement a flexible Ubershader system (with deferred shading). My current idea is to create shaders out of modules, which deal with certain features (FlatTexture, BumpTexture, Displacement ...
10
votes
2answers
2k views

Why is custom memory management needed for assets?

Pretty much all resources relating to game programming, especially 3D open-world games, talk about how you have to constantly be unloading and reloading assets to and from disk, system memory, and ...
7
votes
4answers
4k views

How do you manage your game resources in XNA?

In the past I have used Content.Load<type>("filename"); all over the place. This quickly becomes a nightmare to manage and worse you start having multiple copies of the same asset loaded in ...
7
votes
1answer
1k views

Do you need resource manager for HTML5 games?

Usually, resource manager is needed for desktop/mobile games. But is it needed for HTML5 (browser) games? Resource manager's main responsibility is to make sure there is no clone of a resource in ...
6
votes
2answers
959 views

How can a resource manager have dynamic loading/unloading without creating dangling pointers?

I have a resource manager that manages the lifetime of resources in memory. A "resource" is something like a texture, mesh, et cetera. I also have an entity class that, the base class for things in my ...
6
votes
2answers
448 views

Game resource timers - general implementation

I'm interested in understanding how resource generation timers work on many of the mmorts type games out there. I can't wrap my head exactly around how the timers are synched with servers, especially ...
6
votes
1answer
734 views

C++ exensible resource manager class with dynamic registration of factories

I've done some some research on my own, so I hope someone can help me finish it. I'm trying to replicate the design of an extensible asset manager featured in this answer. At the moment I have ...
6
votes
1answer
2k views

How to manage shaders?

I've done some shader programming some time ago but only simple stuff. I'm especially interested in how do you manage shaders? Do you just write one of each kind, or do you need more of them? If so, ...
6
votes
4answers
14k views

How to create a new GameObject, without adding it to the scene?

I'm creating what is essentially my own prefab system. Game objects are defined by a human readable data file. I'd like to create an empty GameObject, load it with the components defined in the data ...
5
votes
3answers
4k views

Object pools for efficient resource management

How can I avoid using default new() to create each object? My previous demo had very unpleasant framerate hiccups during dynamic memory allocations (usually, when arrays are resized), and creating ...
5
votes
2answers
280 views

How can I determine a budget for RAM used (LRU involving VRAM, in particular)

After some profiling, I've determined that one of my most expensive functions involves drawing text. As a solution, I'd like to implement a LRU type of cache that will "remember" the vertices, tex ...
5
votes
2answers
2k views

XNA 2D: How to load/unload specific content by level

I'm writing a 2D room-based* platformer using XNA, and I'm trying to figure out the best way to load resources based on what the current map requires. Basically, I need to (want to) dispose of the ...
5
votes
1answer
2k views

Where do I store (or how do I refer to) textures for custom blocks?

I'm making my first foray into Minecraft modding on Ubuntu using Minecraft Forge. I'm finding it a little hard to get started as many of the tutorials seem to refer to older versions of Minecraft ...
5
votes
1answer
946 views

Explicit resource loading in Ogre (Mogre)

I am just starting to learn Mogre and what I would like to do is to be able to load resources 'explicitly' (i.e. I just provide an absolute path instead of using a resource group tied to a directory). ...
4
votes
5answers
1k views

What is the best approach to resource management in game design?

I studied computer engineering before but have been lagging in the technical aspects as of late. Seeing as I think it would be to my advantage as a designer to understand how resources are used and ...
4
votes
2answers
778 views

Why am I running out of memory in D3DPOOL_DEFAULT?

When trying to using my company's D3D9 renderer and allocating everything in D3DPOOL_MANAGED I would run out of memory in the 32-bit process space. I tried using our D3D9Ex renderer and allocating in ...
4
votes
1answer
3k views

How to manage the lifetime of Ogre3D objects?

I haven't found tutorials that are concerned about deleting scenenodes and entities. I assume that the scenemanager will take ownership of them when they are attached (am I right?). However, I can ...
4
votes
1answer
146 views

Is it better to preserve scenes in memory or recreate them every time I need them?

I am using Cocos Builder to create scenes using sceneWithNodeGraphFromFile:owner:. Now I have doubts about whether it's better, on iOS, to save some memory or CPU cycles. In other words I have two ...
3
votes
4answers
876 views

Help streaming resources (maps, sounds, music, etc) from many files for contiguous world

So I'm creating a game and I would like to know how to perform resource streaming (rather than loading the whole file into the buffer) for things such as my maps, sounds, music, etc. I'm using C++ and ...
3
votes
2answers
384 views

Is it a terrible practice to NOT initialize an object in its constructor?

I'm currently working on my own game engine, more precisely on the resources management part. For now, most of my assets inherits of the following - simplified - class: class Asset { public: ...
3
votes
2answers
112 views

What is the Basic Game Screen/Scene Life Cycle?

Question What is the standard or basic game screen/scene life cycle used in most games? What is Screen/Scene? The term screen or scene refers to the current displayed entity holder where game ...
3
votes
1answer
121 views

Resource transportation network

I've been writing a game in my free time, and I'm planning to add a transportation network based on a buildings demands and production. However, I'm not sure how to manage this efficiently, and most ...
3
votes
2answers
2k views

Loading large bitmaps in Android

In a few games in the Android Market/Google Play Store, huge bitmaps are drawn onto the screen. For example, the game Unicorn Dash: and Robot Unicorn Attack: I'm assuming the entire island ...
3
votes
1answer
1k views

How does Unity load asset bundle dependencies and how can they be accessed?

Loading assets from an asset bundle is done explicitly. You give the bundle the name of the asset to load, then it returns it( either now or later. ) However, loading dependencies is done completely ...
3
votes
1answer
4k views

Managing resources

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, ...
3
votes
1answer
297 views

Resource management question. Resource containing resource

I have resource manager handling as usual resource loading, unloading etc. With resources such an images, mesh no problem. But what to do when I have resource containing other resource (for example ...
2
votes
2answers
251 views

Overlapping svn repositories

We use svn at work, but the repository is getting pretty large, so checkout times are long, as is update when artists batch process all assets. The problem is that we also store work in progress, ...
2
votes
3answers
173 views

How to implement a job queue system?

Essentially I'm trying to make a system which you can add a job to it then finds an AI which is idle and gives it that job to do, For an example look at Prison Architects job list system (image ...
2
votes
3answers
348 views

When to unload graphics object from main memory?

I writing my resource mangaer, and I consider about how it can work for graphics objects (like textures, meshes). I think about this : I want to load texture (in pseudocode): Texture t = ...
2
votes
2answers
897 views

Game Asset Management

I am making my first small mobile game in C# XNA. Lets say I have 3 screens, the main menu, options and game screen. A single game session usually lasts for 1 min, so the user will alternate ...
2
votes
1answer
281 views

Advantages And Disadvantages Of Resource Serialization

A good example is let's say I'm making a pong game. I have a PNG image for the ball and another PNG image for the paddles. Now which would be better, loading the PNG images with a PNG loader, or ...
2
votes
1answer
457 views

Resource management

I've come across a strange thing in DirectX 11: I'm trying to implement large scale volume visualization engine. My approach is like this: if the volume is HUGE (could not fit to GPU memory ...
2
votes
1answer
621 views

Efficient manager/controller for uniform and/or attribute variables in a rendering engine

Most engines on the market have their drawbacks and it's difficult to find a simple/light-weight one that's open-source and doesn't have to put you through a rather complex learning process. Writing ...
2
votes
2answers
176 views

Materials and Mesh association

I'm trying to implement a Material system in a small engine for training and I've got questions about materials. Currently I've got that: Material: A Material with array of Technique Technique: ...
2
votes
1answer
257 views

How should asset bundles be divided?

The only way to load an asset from an asset bundle into memory is to load the entire thing, decompress and pull out the asset you want, then unload the entire thing, except the assets you want. This ...
1
vote
2answers
2k views

How to efficiently manage animations and/or textures (resources) in a game?

I am using Java, particularly the Slick2D library. Seeing as this is my first game, I have no idea how I should manage the Animations and the textures in the game in a way to be both memory efficient ...
1
vote
1answer
147 views

Is there a robust way to get a pointer to a resource when I have a handle to its base type that doesn't rely on dynamic_cast?

I'm building my own pet engine and after struggling with how to handle resource ownership for a while, I came across this question and specifically Josh and Sean's responses (as well as Sean's blog on ...
1
vote
2answers
83 views

Reading mesh data back from OpenGL vs storing two copies

I'm wondering if whether it's a good idea or not to keep a copy of vertex data in the main memory or just read it back via glGetBufferSubData (or glMapBuffer/glMapBufferRange). The reason why I'd do ...
1
vote
1answer
198 views

Resource streaming with job threading system

I am currently researching resource streaming for my current game engine. To add a bit of context, I am doing a contiguous world for a Baulder's Gate style CRPG. So while the camera is usually looking ...
1
vote
1answer
113 views

Is there a way to limit the size of the D3DPOOL_MANAGED pool?

I have over 2GB of textures that I need to put in D3D9's D3DPOOL_MANAGED pool. D3D9 charges the system copy of anything in the D3DPOOL_MANAGED to my process space. I'm working on a 32-bit system so I ...
1
vote
2answers
66 views

Ways to describe resouces [closed]

I have one way - xml and code like this: <Texture file="file_name.jpg"> <Sprite id="ID_SPRITE_1" coordinates="0 0 64 64"/> <Sprite id="ID_SPRITE_2" coordinates="64 0 64 64"/> ...
1
vote
1answer
446 views

Storing a Quadtree

I have a quadtree which organize my terrain chunks (heightmap) and all the static objects of my 3D world. I use Axially Aligned Bounding Box as a volume for each node of the quadtree. Due to the ...
1
vote
1answer
57 views

Resource management with Lua integration

I have a questions about how to better implement resource management when integrating with Lua. I have an entity system that has gameplay logic done in Lua. One of the design points was that I wanted ...
1
vote
1answer
85 views

AssetManager proper usage in libgdx

I am a beginner in libgdx and I am coding a simple game. This game is like a word puzzle where each letter is a texture. Before loading the first level I need to load into memory 26 textures, one for ...
1
vote
2answers
256 views

How do I create a sound manager? [closed]

I have a basic entity system in place. Now I want to add audio. I want to make a database class that watches over entities, pulls data out of them, and creates audio streams whenever necessary. I'm ...
1
vote
1answer
106 views

WDDM Managing Memory in D3DPOOL_DEFAULT

In this question I saw that I was running out of memory in D3DPOOL_DEFAULT in DX9EX. After changing my usage from D3DUSAGE_DYNAMIC to 0 (static usage), everything runs wonderfully with no DX9 error. ...