Questions tagged [resource-management]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
107 views

How are Objects rendered or updated, when there's a Pool class?

I have a State (Title State for example), that has the ResourcePool (getImage();getSound(); etc.) and a list of the GameObjects. How do GameObjects get access to the Resources in the Pool they need? ...
1
vote
1answer
251 views

Switching Screens without initializing them every time

I have a UI with four Screens (all extending a "main Screen") that users switch between very frequently, at the moment I am switching Screens using ...
1
vote
4answers
2k views

Unity "static" references

I have been researching this for 2 days now and I cannot seem to find a proper response. I am trying to figure out a good way to store constant variables within my game. Basically, does it make more ...
0
votes
1answer
150 views

Reference counting with resource handles

I have implemented a resource handle and resource cache class. The handle stores an integer id. The cache stores a vector of objects e.g., Textures. The handle id acts as an index into the cache ...
1
vote
1answer
160 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 ...
0
votes
1answer
1k views

Unity difference between accessing asset prefab from reference VS from Resources.Load?

Question point Does putting prefab asset in inspector's reference and access its content inside in runtime VS. Load the same prefab asset from Resources.Load API, ...
1
vote
3answers
180 views

Do multiple small script files use more RAM than one bigger script file?

So I'm still new to making games that have a baseline for computer resource usage and I'm confused with my question. I can't find an answer anywhere on the internet so I'm here. Simple Question: ...
3
votes
1answer
540 views

C++ Wrapper class for raw pointer to an SDL_Texture

First time in game dev, so go easy on me. I understand it's senseless to copy textures, but I'm trying to see this from a copy/move perspective since there is a lot of that going on in my code and in ...
0
votes
0answers
45 views

How to extract data from a resource compiler script in c#

I need to know how to extract all data from a resource compiler script to a folder or the desktop. the .res files are compiled and added to an exe file. .res is the file extension. and if that is ...
2
votes
3answers
219 views

Centralized ResourceManager Class for every type of Asset in an Game Engine

I am trying to Implement resource manager for my hobby game engine. The problem I am trying to solve is that I want one centralized resource manager, which delegates resource loading to a bunch of "...
1
vote
1answer
278 views

Do I need a rendering system in my engine?

I am planning to create a cRPG game engine that would allow to easily create games like Baldur's Gate. I already tried to do that once, but my knowledge was vastly insufficient at the time. I settled ...
2
votes
2answers
2k views

How to update the value of all owners of shared_ptr?

I’m writing a render, there is a class that shaders should store, something like a shader manager. These shaders are stored as ...
0
votes
0answers
446 views

Why are pyglet.image and texture so heavy?

Envrionment: python: 3.6.6 pyglet: 1.3.2 Here is my code and results: ...
0
votes
1answer
91 views

What aspect of performance should I be optimizing my code towards? (asynchronous chunk modification)

Preface I realized that the root of my question is a little simpler than all of the details below make it out to be. All other things being equal, what is the most important system aspect to optimize ...
0
votes
1answer
50 views

Memory Management when changing Game States [closed]

I am just wondering what are some of the issues of loading and freeing the memory every time player changes the game state? Or is it better to load all the resources at once?
1
vote
0answers
96 views

Design of (texture) resource system

For an open source game I wanted to redesign the resource management system but got into a dead end and need some pointers to some reading material or where to go now. Starting point was (mostly) a <...
7
votes
2answers
4k 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 ...
2
votes
3answers
904 views

Implementing reference counting from scratch or using shared_ptr for resource?

In an OpenGL application that I am writing, I want to have a simple shader class to wrap the OpenGL shader handle. Ultimately, I want this shader class to behave very similarly to a shared_ptr in c++ (...
0
votes
2answers
73 views

Most effective way to perform dynamic list of actions?

I have a huge list of predefined game objects with different actions they do. What is the best (in terms of code simplicity and runtime performance) way to store, dynamically refresh and execute their ...
2
votes
0answers
460 views

Set sprite for UI2DSprite from NGUI at runtime

How can I set sprite for UI2DSprite from NGUI at runtime? This is what I tried: ...
1
vote
0answers
147 views

How could I generate a document that catalogs a collection of 3D models?

I have a lot of 3D models (.obj and .fbx) I can re-use in some games, but sometimes I forget them. So I want to create a (for instance) Word document with the images of all my 3D models. This can ...
6
votes
4answers
6k 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 ...
10
votes
3answers
3k 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 ...
3
votes
2answers
2k views

How can I find out where a particular texture is being used in my Unity project?

I have a texture in my assets, and I need to find out where it's being used so that I can change some textures in my project. How can I find out where a specific texture is used in my project? The ...
3
votes
0answers
170 views

Unity - Loading Assets / Resources during run-time for a highly customizable game

I haven't had to think too much about this problem too much until now. I am in the middle of creating a character customization system for my game. There are 60+ characters in the game, I have ...
0
votes
1answer
600 views

Should I compress the game data files?

I am working on packaging my game resources into a single file. I have chosen the format but I don't know whether I should use compression or not. I understand the possible pros and cons: Compression ...
2
votes
1answer
300 views

How can I manage resources in memory, and dispose of them at appropriate time with the Ashley framework?

I have been working on libGDX and the Ashley framework, and I have not been able to find any information on resource control in memory. I would like to know if there is any way to control those ...
0
votes
1answer
105 views

How to hide fbx files for commercial release

I see that all commercial games I've played never expose their fbx files - usually, they archive the fbx files into PAK file or BIN file. For example, Torchlight 2 use OGRE3D for their Graphic Engine,...
3
votes
1answer
2k views

What is an efficient way to manage uniforms in a game?

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 ...
7
votes
2answers
5k views

What is the most efficient way to access 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 ...
18
votes
1answer
7k views

Game Engine Design – Ubershader - Shader management design [closed]

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, such as FlatTexture, BumpTexture, ...
0
votes
2answers
225 views

Should I pass my resource manager to types that might need it, or make it global?

Say I have this Cache<typename Resource> class template, which is a resource cache that contains an ...
1
vote
1answer
252 views

How can I get a pointer to a resource via a base type handle without 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 ...
4
votes
1answer
4k 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 ...
3
votes
1answer
412 views

In a resource manager, how do I handle a resource containing other resources?

I have a resource manager, handling the usual resource loading, unloading etc. With resources such an images and meshes, there is no problem. However, what do I do when I have a resource containing ...
12
votes
5answers
37k 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 ...
1
vote
2answers
483 views

Instantiating without the use of Resource Folder in Unity?

I am making a game which has around 25 prefabs. I want to generate these prefabs randomly one after another and also I am destroying the last prefab. One way is to make an array of gameobjects and ...
1
vote
2answers
168 views

How should I manage meshes for the streets of a 3D city map in Unity?

I was recreating a small city in Unity3D and was going to place streets and pathways according to a sketch. I'm building for Android and the city is quite small; I'm planning to have the entire road ...
1
vote
1answer
330 views

TextAsset thinks file is ~6856 bytes when it is 120123 bytes

So I've created a text asset in Unity of a binary file which i'm attempting to read in as a byte array. The result I'm getting is a byte array tht is almost half the size it's supposed to be. The ...
22
votes
4answers
10k views

How do C++ games handle memory allocation failure?

I am aware of several games which are written in C++ but do not use exceptions. Since handling of memory allocation failure in C++ is generally built around the ...
3
votes
1answer
1k 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 ...
0
votes
2answers
1k views

Speed up loading of png files (used for textures) in Android OpenGL Game

My game has a few texture atlases that need to be loaded (in my XHDPI folder they total 3.49MB) and on a top-end device they don't take that long to load, however on a low-end device they seem to take ...
4
votes
2answers
580 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 ...
6
votes
3answers
3k 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 below)....
1
vote
1answer
143 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
2answers
374 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 ...
1
vote
1answer
254 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 ...
4
votes
2answers
1k 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: ...
0
votes
0answers
552 views

How heavy is a scene load in Unity assuming all referenced objects are in memory?

From what I understand, resources that are local to a particular scene( not a prefab, or texture, material asset etc ) are embedded in the scene file itself, while external resources are just ...