The process of modifying software to make some part of it work more efficiently or use fewer resources. Generally, this means it executes more rapidly, or will require fewer resources.

learn more… | top users | synonyms

1
vote
3answers
750 views

How do I swap two objects in C# (specifically Mono) without triggering GC?

I have two array lists. that I want to swap each frame. My question is, does the variable 'temp' need to be a member variable to avoid triggering GC, assuming this method is called on dozens of ...
1
vote
2answers
224 views

Which isometric angles can be mirrored (and otherwise transformed) for optimization?

I am working on a basic isometric game, and am struggling to find the correct mirrors. Mirror can be any form of transform. I have managed to get SE out of SW, by scaling the sprite on X axis by -1. ...
1
vote
1answer
132 views

Performance tracking/monitoring in games [closed]

Let's say I have an online game with a downloadable client / browser plugin. I want to track performance of my software and automatically send summary to the server. Let it be fps, latency, load time, ...
0
votes
2answers
459 views

My grid based collision detection is slow

Something about my implementation of a basic 2x4 grid for collision detection is slow - so slow in fact, that it's actually faster to simply check every bullet from every enemy to see if the ...
1
vote
1answer
215 views

Grid based collision - How many cells?

The game I'm creating is a bullet hell game, so there can be quite a few objects on the screen at any given time. It probably maxes out at about 40 enemies and 200 or so bullets. That being said, I'm ...
4
votes
1answer
331 views

Can an existing game be optimised by converting it to use cel-shading?

I assume it's possible to cel-shade existing games through API interception. If done properly, could this be used as a rendering optimization technique? This means rather than doing the cel-shading ...
2
votes
3answers
1k views

glGetFloatv – should it be avoided? Can it be replaced?

Platform is OpenGL ES 1.x. I am using glGetFloatv() to get MODELVIEW matrix. This allows me to compute points, where I need to draw a shadow effect. This is very handy, as I can forget about ...
0
votes
2answers
221 views

Scene management for 3D editor

I need a scene graph/management method for a 3D editor (brute force rendering is not really a possibility), where lots of data (geometry) are constantly being modified, it also would need to work ...
1
vote
1answer
307 views

Intercepting DirectX calls and optimizing the overal performance of games

I would like to use a DirectX proxy dll to intercept (and possibly optimize) the graphics calls being made by normal PC games. I am going to "screen cast" a game with ffmpeg or something similar and ...
3
votes
2answers
5k views

Effecient tilemap rendering

I have done mostly tile based games, but never really bothered with optimization. I always just rendered all the tiles that convered the viewport. I am currently working on platformer for a mobile ...
-1
votes
4answers
2k views

Collision detection between many objects

I'm working in a 2d environment and have hundreds of objects, brute force collision checking would be out of the question, but would my method below work? For example, lets say I have a ...
1
vote
2answers
317 views

Boolean checks with a single quadtree, or multiple quadtrees?

I'm currently developing a 2D sidescrolling shooter game for PC (think metroidvania but with a lot more happening at once). Using XNA. I'm utilising quadtrees for my spatial partitioning system. All ...
5
votes
2answers
601 views

How to generate portal zones?

I'm developing a portal-based scene manager. Basically all it does is to check the portals against the camera frustum, and render their associated portal zones accordingly. Is there any way my editor ...
1
vote
2answers
335 views

Recasting and Drawing in SDL

I have some code that essentially draws a column on the screen of a wall in a raycasting-type 3d engine. I am trying to optimize it, as it takes about 10 milliseconds do draw a million pixels using ...
1
vote
2answers
156 views

What calls trigger a new batch?

I am finding my project is starting to show performance degradation and I need to optimize it. The answer to my previous question and this presentation from NVidia have helped greatly in understanding ...
6
votes
2answers
778 views

Correct way to handle path-finding collision matrix

Here is an example of me utilizing path finding. The red grid represents the grid utilized by my A* library to locate a distance. This picture is only an example, currently it is all calculated on ...
2
votes
3answers
2k views

Optimized rendering of a cube mesh world

I want to render a cube-mesh (a.k.a. Minecraft-style) world. If I render each existing cube it will eat up FPS pretty quickly. How can I optimize it? I understand that the point is to not render ...
3
votes
1answer
258 views

Collision Detection Efficiency

I've just written my first successful collision detection code, and it works great for a small scene of actors (player + 4-5 obstacles). However, I realize that since it checks every possible ...
0
votes
3answers
553 views

Optimizing updating thousands of enemies? (Or break up the enemies that need updated?)

Thanks in advance for wanting to help. I have an array of (right now) ~1000 enemies that I need to update every frame. The issue, I believe, is mainly brute-force checks. I've profiled my ...
0
votes
2answers
864 views

Detecting if line crosses rectangle in python. Need speed boost

I am currently writing a top down man vs robot shooter. The game works now, but if I have a decent sized level it runs slowly when you are being chased by robots. While just roaming around it can go ...
2
votes
2answers
401 views

Dealing with string memory pollution

Consider following example. I have a title screen for a game which displays top scores list, and some other text. The Update method looks like (simplified): // remove all text textList.Clear(); // ...
5
votes
2answers
2k views

Which opcodes are faster at the CPU level?

In every programming language there are sets of opcodes that are recommended over others. I've tried to list them here, in order of speed. Bitwise Integer Addition / Subtraction Integer ...
3
votes
3answers
3k 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 ...
1
vote
0answers
405 views

Good practices when optimizing HTML5/Javascript Game Developement [closed]

I'm just starting out as a game developer and have created a few crappy but playable clones of classic games like pong, and bomberman. Being self taught (bless the internet) I do this by just stuffing ...
6
votes
4answers
2k views

Smoothing found path on grid

I implemented several approaches such as A* and Potential fields for my tower defense game. But I want smooth paths, first I tried to find path on very small grid ( 5x5 pixels per tile) but it is ...
3
votes
2answers
1k views

Which is worst: Too many VertexShader instructions, or FragmentShader instructions?

I want to have a better understanding of how to create shaders with optimal performance and realize where some bottlenecks can occur. Is it usually favorable (when possible) to delegate most of the ...
0
votes
1answer
103 views

Setting up speedtests in Actionscript 3 for an entire game

I'm very new to this so please forgive the questions possibly ill-stated nature. Firstly is this even a valid way to speedtest: public function L1() { tree.x = 200; tree.y = 200; ...
0
votes
2answers
537 views

Optimize a render call to draw out several semi-transparent sprites

I'm writing a 2D side-scrolling style game in C++ and openGL. In this game I have several cloud sprites which are rendered across the top of the screen. They rotate and scale and such so they're not ...
3
votes
2answers
461 views

Rendering 3D out of layers - optimizing fillrate?

I'm rendering a city of several million cuboids that are all axis-aligned, touching each other and same-sized. They only differ in height. Rendering them as real geometry is vertex-bound and too ...
1
vote
2answers
815 views

Optimizing UV Map Sheet Based On Surface Area?

I am trying to get my UV Map Sheets Optimized Based On Surface Area , I need Them optimized cause my scene area is huge and i want to use them in UDK so i am trying to get maximum possible ...
4
votes
2answers
1k views

Rendering a lot of Models at once with XNA

In an hexgrid based game, I render all terrain tiles as a separate model, reusing the same texture objects on all similar tiles. The tiles is a pretty simple model. When the terrain is set to be at ...
2
votes
2answers
2k views

Loading and rendering one large image or many smaller ones

I am working on an android game with a top down style view similar to the original GTA's or a scrolling version of Legend of Zelda. I have recently begun designing some prototype levels for the game ...
3
votes
1answer
2k views

Optimizing HTML5 canvas transformed drawing in Javascript

I am trying to optimize my HTML5 game engine and have noticed that currently a majority of the time taken in the game loop can be taken when drawing transformed tiles. I think this is because each ...
6
votes
1answer
425 views

Display Lists in OpenGL

I heard that there was a faster method of displaying vertices, rather than recreating the GL_TRIANGLES, each time the scene is drawn. I thought I read somewhere that this method was obselete. Why ...
10
votes
1answer
1k views

Is precomputed pathfinding still relevant?

Context Old Lucas Arts (ScummVM era) point and click graphic adventure games used precomputed pathfinding. Here's a rough outline of the technique. Step 1 The floor in each room was divided into ...
3
votes
2answers
217 views

What is a fair latency, to cut off game connection at?

I'm currently coding a realtime game. I'm doing alot of technical operations with the physics world (resimulations of old world states etc.) to prevent game lag. I save the world state every physics ...
11
votes
5answers
2k views

Why do computer games differ so much in size?

There are alot of PC games out there that have (seemingly) roughly the same graphics (with bump-maps, shaders, etc), sound complexity and play-through time yet one of them needs 4GB space while the ...
5
votes
1answer
171 views

Player Visibility Problem

I'm looking into designing and implementing an online RPG (or more accurately, redesigning an existing piece of server software). One of the problems is that of managing visibility. Update data for ...
14
votes
2answers
1k views

Why are big files better than small files for consoles?

Why do console game developers use large files to store game data instead of small files like on PC? Less streams in memory? Need to access file tree many times? Other reason?
2
votes
3answers
949 views

Coarse Collision Detection in highly dynamic environment

I'm currently working a 3D space game with A LOT of dynamic objects that are all moving (there is pretty much no static environment). I have the collision detection and resolution working just fine, ...
18
votes
5answers
2k views

Learning to optimize with Assembly

I am a second year student of Computer Games Technology. I recently finished my first prototype of my "kind" of own pathfinder (that doesn't use A* instead a geometrical approach/pattern recognition, ...
20
votes
7answers
2k views

Optimizing gravity calculations

I've got a bunch of objects of varying size and velocity which gravitate towards each other. On every update, I have to go over every object and add up the forces due to gravity of every other object. ...
5
votes
2answers
756 views

What are the time-efficiency characteristics of these voxel data structures?

Real-time, high-resolution voxel raycasters tend to use one of the following optimising data structures in order to achieve interactive frame rates. What are the pros and cons to these, and what other ...
6
votes
1answer
273 views

How do texture lookups for trig functions work?

I have a pixel shader that calculates a mandelbrot fractal. It uses the standard formula: z = z2 + c I'd like to extend it so the power z is raised by varies. To do this i have the following ...
8
votes
1answer
290 views

Chunking/caching large levels in a singleplayer game

Does it make sense to try to offload a large nonlinear level into file-based chunks, and load those on demand? We've implemented level chunking to improve rendering performance, but still all level ...
6
votes
1answer
949 views

Is the STL efficient enough for mobile devices?

When it comes to mobile game development on iOS and Android NDK, some developers write their own C++ containers, while others claim that STL is more than adequate for mobile game development (For ...
2
votes
5answers
2k views

Skipping glReadPixels and reading iPhone's “VRAM” directly

I'd like to rapidly capture "screenshots" of my OpenGL ES iPhone game and turn them into a video. I've tried the following approach (it works but degrades the game play to an unacceptable level): ...
7
votes
4answers
1k views

Efficient 2d Java Line of Sight for a lot of entities?

My problem today is this: I have many civilians going around, they are classes stored by an arraylist. The idea is when they see another civilian panic, they'll start to panic and it will spread. ...
2
votes
2answers
309 views

How do you handle iPhone graphics for both high and low DPI settings?

How do you guys create your game graphics for iPhone? Considering you need a retina version and a nomal one? Do you create a big version of your image, save HD, then resize to smaller version, and ...
1
vote
1answer
327 views

Graphic optimization for iPhone

Basically, I am creating a large iPhone game (with an overwhelming amount of 2d graphics). I am concerned about the game file size. Since the iPhone game will accept Retina and Normal display, we ...