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

3
votes
2answers
223 views

Naive minmax optimizations

I'm working on a perfect information game in my spare time. I've implemented a naive minmax algorithm for the computer player. I've further optimized it using alpha-beta pruning. What I'm looking for ...
12
votes
2answers
2k views

“Optimal” game loop for 2D side-scroller

Is it possible to describe an "optimal" (in terms of performance) layout for a 2D side-scroller's game loop? In this context the "game loop" takes user input, updates the states of game objects and ...
6
votes
7answers
1k views

Wikipedia A* pathfinding algorithm takes a lot of time

I've successfully implemented A* pathfinding in C# but it is very slow, and I don't understand why. I even tried not sorting the openNodes list but it's still the same. The map is 80x80, and there ...
9
votes
5answers
4k views

OpenGL's matrix stack vs Hand multiplying

Which is more efficient using OpenGL's transformation stack or applying the transformations by hand. I've often heard that you should minimize the number of state transitions in your graphics ...
2
votes
1answer
259 views

Collision filtering by object, team

I am looking for a good method to determine which objects will be considered for collision with other objects. My current idea is that each object has the following properties: alwaysCollidesWith = ...
2
votes
2answers
728 views

Was C++ designed for speed, and is it better to not use high level features when teaming with inexperienced programmers?

I have read some optimisation guide for C++, and it seems it requires more knowledge to have a fast C++ code, than using C++ without the high level features of C++ (classes, templates, inheritance, ...
23
votes
6answers
988 views

Spell casting - How to optimize damage per second

Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff. Cooldown time: the amount of time (t) it takes ...
11
votes
3answers
4k views

Optimizing a mesh for voxel cube landscapes

Playing around with creating minecraftish/lego world landscapes in Unity 3D (procedurally generated voxel landscapes with cubes), I'm finding that the meshes created for these landscapes take up a LOT ...
15
votes
7answers
3k views

How does one optimize an HTML5 Canvas and JavaScript web application for Mobile Safari?

I've created an HTML5 Canvas and JS game that runs great on a desktop or laptop in Chrome (30fps), but on mobile Safari I only get around 8 fps. Are there any simple tips or tricks to increase the ...
6
votes
2answers
895 views

How to loop over a part of an ogg vorbis stream?

I'm successfully streaming ogg vorbis data to openAL with the Java library JOrbis, but now I want to loop over a part of this stream, e.g from 30" to 1'30". I thought that at the end of the loop, I ...
3
votes
1answer
408 views

What is the right process to get compatibility or at least a workaround for the ‘Threaded optimization’ feature of NVIDIA?

It's peculiar this issue is not well understood on NVIDIA forums and project forums. For example, the well known ioquake3 project based on id tech 3 requires to force 'Threaded optimization' off on ...
3
votes
3answers
1k views

Optimizing Bullet and ODE Physics on consoles and mobile phones

I'd like to use either Bullet or ODE on low powered devices (mobile and consoles), but the frame rates are below the acceptable 25-30fps for simulations. I've found that one articulated body by ...
3
votes
2answers
322 views

Profiling code with threads and script interpreter

Basically, how I profile a game that have multithreading and script interpreter? (Lua in my case) I have no idea of where to look for that. Also it would be nice to be able to profile code that ...
6
votes
3answers
607 views

Is Frustum Culling by itself enough for Consoles and Mobiles?

Software occlusion culling is often expensive, especially for smaller and older devices. Is frustum culling alone adequate on systems that can optimally display 10k triangles at most? If not, are ...
6
votes
4answers
1k views

Is it possible to use the GPU on a mobile device to accelerate a particle physics engine?

I am interested in answers for any mobile device but I am mainly considering the iPhone and devices that run Java. I am developing a game that relies heavily on a particle physics engine for core ...
7
votes
2answers
2k views

Frustum Culling with VBOs

I have terrain being rendered in my project using VBOs in OpenGL. I would like to apply some Frustum Culling but have no idea how to access each polygon as its drawn to check if it is in view. I think ...
11
votes
11answers
836 views

In general how often and when should I optimize my code?

In 'normal' business programming optimization step is often left until really needed. Meaning you should not optmize until it is really needed. Remember what Donald Knuth said "We should forget ...
3
votes
2answers
479 views

OpenGL: Precompute a texture rotation

I'm trying to speed up particles, and one way to do that is by precomputing the texture rotations. What I want to do is load the texture, rotate it and save it to a handle. How would I go about doing ...
10
votes
3answers
7k views

Rendering performance for Flash games

I was reading on SO about native flash rendering vs building a custom BitmapData frame buffer and some of the answers were a bit conflicting, so I was wondering: Is it generally best practice to go ...
21
votes
9answers
6k views

OpenGL optimization tips [closed]

What tips or tricks do you have when it comes to making the OpenGL more efficient?
8
votes
9answers
2k views

Large FPS vs consistent FPS

When optimizing the frame rate of a game, when should I focus on a large FPS and when should I focus on a consistent frame rate. This is often a hotly contested issue, so please note I'm not asking ...
55
votes
17answers
25k views

C++ low-level optimization tips

Assuming you already have the best-choice algorithm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet frame rate out of C++ code? It goes without saying that ...
29
votes
9answers
25k views

What is the fastest way to work out 2D bounding box intersection?

Assume that each Box object has the properties x, y, width, height and have their origin at their center, and that neither the objects nor the bounding boxes rotate.
9
votes
6answers
4k views

Make pygame's frame rate faster

By profiling my game, I see that the vast majority of the execution time of my hobby game is between the blit and the flip calls. Currently, it's only running at around 13fps. My video card is fairly ...