A way of organizing and storing information so that it occupies as small an amount of memory as possible while still retaining its full usefulness.

learn more… | top users | synonyms

1
vote
2answers
73 views

Memory strategy for multilayer, tilebased maps

I am currently developing a 2d mmorpg and am having some memory issues with regards to my tile based map. The client takes a little while to load and then sits around 1GB ram, because I am loading ...
0
votes
1answer
84 views

Is there a reason to keep maps in memory?

I've noticed for a long time that games (mostly FPSes) do not unload the map when the user has finished with it (aka, disconnecting from servers, server changing maps). The result of this is that the ...
9
votes
1answer
608 views

Why is it Important to have render targets with the same bit size?

I am currently thinking of what type of GBuffer I'll need for deferred shading, hence I tried also to document myself online about the most common ones and their format. Most of the GBuffer that ...
0
votes
2answers
72 views

Maximum Number of Bends - Snake [closed]

A naive Snake game implementation works by using a queue data structure to store the position of every single square that the snake is a part of. You can reduce the amount of memory by only storing ...
0
votes
2answers
101 views

Manage game objects depending on visibility [closed]

I'm trying to create an adventure game in 2D and I'm thinking about map management/objects. Here is what I've got in mind in terms of modelling: Now, I would like to create entities based on ...
0
votes
0answers
66 views

Drawing pathmap [Solved]

I am developing an editor for my game and I like to implement something like this (screenshot from wc3 editor): (I need the pathmap) I have one implementation already, I just store in chunk renderer ...
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 ...
2
votes
1answer
135 views

Rearranging array for memory efficiency

This is a question about a passage from this article: I suggest having every game object exist within a single giant array. This keeps game objects together in memory, and even though deletion ...
1
vote
1answer
255 views

Texture compression strategy for Android OpenGL ES that caters for alphas

I have a 2d Android game that is currently causing certain devices to run out of memory. I have a number of PNGs (about 10 MBs in total) that I use in the game at various times. At some points in the ...
22
votes
6answers
4k views

How to solve the big video memory requirements in 2d game

We are developing 2d game (Factorio) in allegro C/C++ and we are facing the problem with increasing video memory requirements as the game content increases. What we currently do is, that we gather ...
10
votes
2answers
812 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
2answers
192 views

Efficient way to check collision with potentially hundreds of objects [duplicate]

I am trying to make a top down shooter that could potentially have hundreds of objects at once at one point. I need to check collision with projectiles, walls, and enemies. I am currently using ...
1
vote
0answers
233 views

Why are png files so much larger in RAM than on disk? [closed]

I have images that take up 119 MB on disk, but when I load them into my game, they use 850 MB of RAM. Why is this? How can I decrease the amount of RAM they use? My images are high resolution PNG ...
2
votes
1answer
439 views

glDeleteTextures - release data, but keep the texture ID?

In OpenGL, is it possible to release texture data, but keep the same texture id? I want to unload textures when they aren't needed, but load them again later when they are. There are a lot of objects ...
0
votes
0answers
118 views

Libgdx TileMap size limitations

I have a tmx file of 800*18 size.. It is working but there is some problem like sometimes game is slow or the player jumps too much high or the collision from ground doesn't happen properly and player ...
0
votes
0answers
50 views

Memory Management on Physic Body Frames in Unity

Compared from the Android programming with the help of LibGDX and Eclipse programming software in making 2D physics based game from this previous question, what if I'm throwing lots of game objects ...
0
votes
0answers
27 views

How can I handle collision detection between many objects efficiently? [duplicate]

I have made a game that runs poorly. I suspect that the way that I programmed the collision detection in the game loop could be the problem. My game has two player-controlled tanks which fire ...
0
votes
1answer
110 views

What coding issues can be significant in damaging the performance of a game? [closed]

I have just finished a 2D game in Java that I've been working on for a while. I found that on some computers it runs fine, and on others (which are not particularly slow in general), the game runs a ...
2
votes
2answers
117 views

Why aren't resources such as Pixmap disposed on finalization in LibGDX?

I've been looking at the LibGDX framework, and certain classes such as Pixmap require to be disposed manually when you are no longer using them (call the dispose method). I'm wondering, since this is ...
0
votes
1answer
139 views

Load all bitmaps at once or only when needed?

I am starting to get a pretty hefty amount of bitmaps in my 2d game for android. I load them all in 3 colors to save some memory but the thing is, I load all of them when "Start game" is pressed, even ...
1
vote
3answers
511 views

How do I efficiently use 16 bit texture coordinates?

While loading a model I get a big array of 32 bit floating point texture coordinates. I just upload that to a single vertex buffer (along with other data, such as vertices, normals, etc.) and use it ...
0
votes
2answers
293 views

How can I reuse objects going off left side of screen, by putting them offscreen on the right side?

I have an array of roughly 10,000 tiles over a 2d grid. When a tile goes off screen, I'd like to recycle it by disabling the renderer, repositioning it just before it comes on screen again, then turn ...
2
votes
2answers
173 views

Replicating no. of sprites without letting the app to slow down and crash

Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or ...
9
votes
1answer
1k views

How to benefit from cpu cache in a entity component system game engine?

I often read in the ECS game engine documentations that is a good architecture for using cpu cache wisely. But I can't figure how we can benefit from cpu cache. If components are saved in an array ...
14
votes
2answers
576 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 ...
0
votes
2answers
255 views

What alternatives to large arrays do I have for level data?

So I'm going to store my levels in int[] arrays. Most levels are going to be 300*300*300. However, there will be about 24 levels and so that is 24 int arrays of size 300*300*300. However, that would ...
3
votes
2answers
523 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 ...
1
vote
2answers
153 views

NPOT texture and video memory usage

I read in this QA that NPOT will take memory as much as next POT sized texture. It means it doesn't give any benefit than POT texture with proper management. (maybe even worse because NPOT should be ...
6
votes
1answer
583 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. ...
-5
votes
2answers
745 views

How much lines of code is 1kB? [closed]

My friend told me that it's something about 40 lines of code for 1kB. For an old 8-bit computers with 48kB of RAM it is only 1920 lines of code! Then when I think about it, it seems to me ...
1
vote
0answers
86 views

Replacement memory allocators - pros and cons [duplicate]

I am developing a hobby project to learn game engine development and to have a platform where I can test new ideas and have fun. Currently I have a quick-and-dirty multiplayer server and client using ...
0
votes
1answer
286 views

Is a HashTable the best way to store replay data in C#?

I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second). I wanted to know what ...
1
vote
4answers
154 views

How to get a large quantity of photographs in an app while being memory efficient??

There have been a lot of word games (apps) lately and some use graphics but others use photographs and I was hoping that someone could explain how these games manage to get so many photos in an app ...
1
vote
0answers
67 views

Another Question from the Image Efficiency for Memory Handling [closed]

At this topic, "Which image format is more memory-efficient: PNG, JPEG, or GIF?", one of the fellow Game Development community @Panda Pajama told about the complex concept about image memory handling ...
-2
votes
1answer
201 views

Music and SFX Question on Memory Efficiency [closed]

What should I recommend: MP3 or WAV for the SFX? Also, what should I do to handle the memory in music or SFX?
51
votes
5answers
13k views

Which image format is more memory-efficient: PNG, JPEG, or GIF?

Which image format is more efficient to save memory? PNG, JPEG, or GIF?
1
vote
1answer
498 views

Game-components and memory management

I'm stitching together the workings of a component based game engine, and as such have been deeply reading into many aspects of both game engine architecture and a fair amount of opinionated theory of ...
0
votes
1answer
498 views

How to resolve duplicate data in Entity Systems?

Whilst working on examples and upgrades for my C++ Entity System, something randomly caught the attention of my mind, by surprise: duplicate data. What I'm referring to is how an entity system that ...
-4
votes
1answer
209 views

Dynamic cubes for cube engine [closed]

I had an idea for a cube world (i'm writing in C#) that would make creating new types of cubes simple and dynamic. Here is how I imagine it: 1.Text file stores everything including block name, ...
2
votes
3answers
2k views

How to force a garbage collector swep on libgdx?

I found that you can control your memory usage on libgdx with: int javaHeap = Gdx.app.getJavaHeap(); int nativeHeap = Gdx.app.getNativeHeap(); But, How can I force a garbage collector cleanup? I ...
1
vote
2answers
521 views

Recommended formats to store bitmaps in memory?

I'm working with general purpose image rendering, and high-performance image processing, and so I need to know how to store bitmaps in-memory. (24bpp/32bpp, compressed/raw, etc) What is the "usual" ...
1
vote
2answers
319 views

How to deal with large open worlds?

In most games the whole world is small enough to fit into memory, however there are games where this is not the case, how is this archived, how can the game still run fluid even though the world is so ...
-1
votes
2answers
197 views

Dealing with new animations in html5

Wish I knew of a better title, but the issue is rather specific. So the producer of the game I'm working on has given me new animations to put in the game. I knew there might be issues right off when ...
8
votes
6answers
4k views

Map with 20 million tiles makes game run out of memory, how do I avoid it?

While loading extra huge maps, the loading method throws out of memory exception where a new instance of map tile is created. I'd like to have whole map processed at least on server app (and on client ...
0
votes
2answers
594 views

Collision Detection/Map Management in RPG

I'm making an rpg game. I have a Grid class which takes a char[][] to create tiles. The way I'm currently doing collision detection is by creating a Player and assigning it the grid it should be ...
0
votes
1answer
144 views

What is an acceptable GC frequency for a SlimDX/Windows/.NET game?

I understand that the Windows GC is much better than the Xbox/WP7 GC, being that it's generational and multithreaded -- so I don't need to worry quite as much about avoiding memory allocation. SlimDX ...
3
votes
1answer
933 views

OpenGL FBO to OpenCV image

I am trying to figure out the best way to share an image between OpenGL and OpenCV libraries. I perform a render to texture on OpenGL, so I have and FBO/texture that then I want to pass it OpenCV, ...
2
votes
2answers
272 views

Serverside memory efficiency and threading for a turn based game

Im programming on a turn based war-game for some years now (along with the engine) and Im having quite a hard time at figuring out what the games server architecture should look like, since most game ...
3
votes
1answer
612 views

Can glTexImage2D() use an already existing memory block?

Can I use glTexImage2D() and / or glTexSubImage2D() (or maybe there's some other method I don't know about) with an already existing block of memory, instead of always uploading the changed pixels? I ...
2
votes
2answers
793 views

How can I efficiently store tilemaps in work memory?

I've been working on different tile-based projects, but never really bothered with being efficient memory-wise. Each tile was represented by a tile class which would hold the following: X and Y ID ...