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
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 ...
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, ...
3
votes
1answer
541 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 ...
1
vote
1answer
40 views

What is the difference between cudaExternalMemoryHandleTypeD3D12Resource and cudaExternalMemoryHandleTypeD3D12Heap?

When we import a D3D12 memory object into cuda we do something like this: ...
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: ...
2
votes
3answers
221 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 "...
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 ...
1
vote
1answer
279 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 ...
0
votes
0answers
447 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
93 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
97 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 <...
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
74 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 ...
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 ...
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
602 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 ...
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,...
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 ...
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
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 ...
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
332 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 ...
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
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 ...
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
375 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 ...
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 ...
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 ...
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
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? ...
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 ...
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
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 ...
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 ...
0
votes
1answer
5k views

How can an asset bundle's resources be destroyed after destroying the compressed bundle data?

Using: AssetBundle.Unload( false ); Will clear the compressed asset bundle data. This, unfortunately, destroys the bundle object as well, which means nothing is ...
4
votes
1answer
6k 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 ...
0
votes
0answers
86 views

Is resource management a good idea when dealing with animations?

New to the Unity environment here and I have a question concerning how to efficiently manage computer resources in a top down 2D game. I have a large area that looks like a 2d rpg from the 90's and ...
2
votes
1answer
209 views

How many resources are too many?

I don't know if this question is too broad but I am finally working on a game I want to release and I find that questions like: "can I really add another 10 frames?", "Do I really need that animation?"...
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 ...
0
votes
1answer
77 views

How to get used Resources by State/Map etc?

I'm now managing the Loading of my Resources and I got a Question in my mind. How does my Resource Manager know which Sprites,Sounds, etc. are used by the Map I want to load? First I thought of files ...
1
vote
1answer
274 views

Texture organization and budgeting for a HD Sprite Based Game [closed]

I've been making a game that features 2 traditionally animated playable characters, hd backgrounds, props, and extra special effect animations. Things have gone well so far, but I have a few questions ...
1
vote
2answers
1k 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 ...
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 ...
0
votes
1answer
70 views

How to handle runtime exceptions that occur on a loading process delegated to newly spawned thread

I am looking to multi-thread the resource allocation routines (i.e world loading) in my game so that they can occur in the background whilst rendering a loading screen etc... The problem is, I used to ...
1
vote
1answer
201 views

Effective content manager on AS3 Flash

In my game more than 600 images and 200 sounds. I'm try organize effective images and sounds manager for fast access. This is a good approach? ...