The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
5answers
2k views

how to make blocks like “redstone” working in a minecraft-like game when the block is very far-away from your character

I'm working on a 2D minecraft-like game, I use chunks to save my world and each chunk has 128*128 blocks in it. And infinite chunks can create an infinite world. Memory should never be infinite and ...
15
votes
3answers
3k views

Does allocating and freeing a huge chunk of memory at startup “clean up memory”?

The book Game Coding Complete, Fourth Edition, chapter 5 (Game Initialization and Shutdown), section Checking Memory contains this interesting code sample: bool CheckMemory(const DWORDLONG ...
1
vote
1answer
88 views

Techniques for managing vertex buffer memory

I'm learning OpenGL and I haven't seen any advice on managing vertex buffers in all of the tutorials I've read. The basic problem is that I have some memory allocated as a buffer B in which I'm going ...
-1
votes
2answers
73 views

How to glow a UIButtons in sequence

I am working on a memory based matching puzzle game. For that I need to glow buttons in a sequence that's generated randomly. I am glowing the buttons by changing its background images. I'd like to ...
4
votes
1answer
507 views

Should I be concerned about assets being accessed by dumping VRAM?

I have heard many people tell me that a user can dump the VRAM on their GPU and get all the images in my game. Including all "Streamed" images. This includes most of my Menu graphics. How would a ...
10
votes
2answers
624 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 ...
0
votes
0answers
104 views

Do SpriteBuilder's Smart Sprite Sheet need to be loaded to memory?

When I create an Smart Sprite Sheet Folder using SpriteBuilder and publish it, must I load that SpriteSheet into memory "FrameCache" with code or does SpriteBuilder do this automatically (so I just ...
1
vote
1answer
70 views

Can I use memcpy() with XMMATRIX?

I.e. can I do this: XMMATRIX dxMat; Matrix myMat; std::memcpy(&myMat, &dxMat, sizeof(XMMATRIX)); std::memcpy(&dxMat, &myMat, sizeof(XMMATRIX)); Matrix is my own class which contains ...
1
vote
1answer
91 views

Floating point memory usage on gpu

My question is simple: how much memory on GPU does one floating point value takes? I guess it is 4 bytes, but I'm not sure. So for example is it true that vec4, which holds 4 floats, each 4 bytes ...
1
vote
1answer
46 views

Will function-local objects affect my performance over time?

This is a very simple question. Let's say my render loop runs at 60Hz, in each call to render(), I draw all my game's buildings, characters and scenery to make the current frame ready. Each of these ...
14
votes
2answers
519 views

How do you prepare for out of memory conditions?

This can be easy for games with well defined scope, but the question is about sandbox games, where the player is allowed to create and build anything. Possible techniques: Use memory pools with ...
3
votes
2answers
636 views

Vertex buffers - interleaved or separate? [closed]

Interleaved - all vertex data (position, normal, texcoord...) kept in 1 vertex buffer, separate - each vertex attribute is kept in a separate vertex buffer (1 for positions, 1 for normals...). I know ...
6
votes
3answers
561 views

CPU - GPU memory data flow [closed]

I'm a newbie graphics programmer and I've been wondering recently - how does model data (meshes and materials) flow from application (CPU memory) to graphics card (GPU memory?)? Say I have a static ...
2
votes
2answers
608 views

std::map for storing static const Objects

I am making a game similar to Minecraft, and I am trying to fine a way to keep a map of Block objects sorted by their id. This is almost identical to the way that Minecraft does it, in that they ...
1
vote
1answer
289 views

Why doesn't RGB565 lead to a smaller memory footprint on Android?

I'm using LibGDX for my game. I'm loading 9 bitmaps into memory at once using the AssetManager, about 512x512 pixels each on average. TextureParameter texParam = new TextureParameter(); ...
3
votes
2answers
435 views

Memory Leak in SharpDX

one Thing I found out: Windows 7 produces a memory leak while using certain methods to access rendertargets. Why doesn't Windows 8 leak at this method? public class Game : SharpDX.Toolkit.Game { ...
3
votes
2answers
113 views

Circular Method Calls

The title may be a little wrong for what I am asking, but that was the closest I could think of. My problem is I am making a game that includes a World class and a WorldObject class. the World class ...
3
votes
2answers
429 views

What is the range of RAM consumption for the typical 3D character in a video game?

What is the average number of KB in memory for a 3D character? Granted, this will obviously be biased based on what game we're talking about. However, I am less interested in actual size in KB, and ...
0
votes
1answer
198 views

An API independent way of managing video memory?

I'm developing a game. The game architecture is very modular. I have a "Graphics Engine", which uses either a Direct3D or OpenGL renderer. However the user does not have access to the renderers ...
3
votes
2answers
158 views

Spritesheet filesize gets huge after compiling

I have a 14x2 spritesheet which has 125 Kb in raw .png. But as soon as I compile that to .xnb, it mutates to 4 MB. So my question is: Why is that? And how can I fix that?
2
votes
2answers
189 views

How to load up many images without using too much memory

When writing games, I am aware that images take up a lot of space. If one has a large graphical game, they don't want problems with memory, or to give players the message "Go buy a better computer to ...
-4
votes
3answers
145 views

When do assets get loaded into video memory? [closed]

Specifically when do textures / geometry load into video memory? Do objects need to be in a direct line of sight (on screen) or are they drawn in at a certain camera radius? Obviously thing like ...
6
votes
1answer
519 views

MMORPG game map in-memory storage techniques

For 2-3 years I've been interested into MMO development. I'm browsing some emulators source codes and open source projects. Usually I'm checking how the game server stores data about the 2D map. ...
16
votes
5answers
1k views

Why is chunk size often a power of two?

There are many Minecraft clones out there and I am working on my own implementation. A principle of terrain rendering is tiling the whole world in fixed size chunks to reduce the effort of localized ...
6
votes
1answer
385 views

Why do mesh classes still contain vertex arrays if VBO's exist?

I find I'm a bit confused about the practical use of resource management in combination with memory not tied to the CPU. Correct resource management is often recommended in game tutorials, books and ...
0
votes
1answer
177 views

Storing large array of tiles, but allowing easy access to data

I've been thinking about this for a while. I have a 2D tile bases platformer in XNA with a large array of tile data, I've been running into memory problems with large maps. (I will add chunks soon!) ...