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

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 ...
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 ...
4
votes
5answers
480 views

Is Kip R. Irvine's claim of Assembly being practical for game development accurate?

Kip R. Irvine's book, Assembly Language for x86 Processors, sixth edition, begins by comparing the Assembly language against high-level languages. One of the pros for Assembly, was game development: ...
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 ...
4
votes
3answers
859 views

why is it faster to draw lots of small arrays than one big array?

This application on-line here has interesting performance characteristics: Sorting the rectangles to be drawn so it keeps having to change colour is faster than sorting the rectangles by their colour ...
4
votes
2answers
209 views

Optimizing models & improving performance

I've created a map editor for a game I've been developing. The maps (planets) are made using a form of meta ball editing. Basically, in the end the Marching Cubes algorithm is used to get my final ...
4
votes
2answers
614 views

Why is keeping a constant FPS harder than keeping high FPS?

I've noticed this ever since I started playing games, and now see it in my own experiments. If I don't do any capping my game runs at 200~250 FPS, with random drops to 150FPS, but if I cap the FPS to ...
4
votes
3answers
415 views

Are there methods faster than Strings for sending a sprite's state over UDP?

I'm programming a 2.5D networked game in Java. The networking works like this right now: Create new networked sprite object at the client. Send it to the server. Server distributes and saves it. ...
4
votes
1answer
330 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 ...
4
votes
1answer
182 views

Multiple render targets: Output target format performance questions

This is probably API independent (more dependent on hardware implementation), but just in case, I'm using OpenGL. The question is restricted to PC hardware. I have a couple of questions concerning ...
4
votes
2answers
3k views

OpenGL VBOs are slower then glDrawArrays

So, this seems odd to me. I upload a large buffer of vertices, then every frame I call glBindbuffer and then the appropriate gl*Pointer functions with offsets into the buffer, then I use glDrawArrays ...
4
votes
1answer
97 views

Large 2D Arrays Causing Garbage Collection

I've been working on a game in Java that, for this post's sake, looks like Terraria and has random world generation. I've been using Vectors to contain my tile/block objects, but recently due to the ...
4
votes
1answer
91 views

2D Boxes/Vertices merging

I want to optimize my colliders geometry, at the moment is composed by boxes (it's a tile based game) of the same dimensions, i want to remove the inner vertices to have, at the end, only the shell. ...
4
votes
2answers
404 views

Space-efficient data structures for broad-phase collision detection

As far as I know, these are three types of data structures that can be used for collision detection broadphase: Unsorted arrays: Check every object againist every object - O(n^2) time; O(log n) ...
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 ...
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
481 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 ...
3
votes
2answers
226 views

How to optimize my A* algorithm

I'm working on a roguelike, and I think my A* algorithm is insufficient. My general algorithm for building the dungeon is: Place rooms Figure out which rooms should connect by a relative ...
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 ...
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 ...
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 ...
3
votes
1answer
513 views

How can I optimize this flood fill algorithm?

I'm creating a sprite and animation editor like this one. I'm having performance issues with my flood-fill algorithm. Basically, I open an image with the different modules that are part of a frame of ...
3
votes
3answers
318 views

Javascript board game: looking for optimization

I posted this question on stackoverflow before but received no answers so I decided to post it here and see if someone could suggest me something. I'm working on a html/javascript game for android. ...
3
votes
2answers
153 views

A Star pathfinding algorithm, multiple node set optimization

I'm trying to determine if this is an optimization I should pursue or if this is way to complicated to be worth my time. I've successfully implemented the A Star Algorithm for my video game. I used ...
3
votes
1answer
424 views

The most efficent ways for drawing lines all day long with OpenGL

I'd like to put a computer screen that is running an OpenGL programs in a room. It has to run all day long (not in the night). I'd like to draw lines that are slowly fading in the background. The ...
3
votes
2answers
217 views

How should I choose quadtree depth?

I'm using a quadtree to prune collision detection pairs in a 2d world. How should I choose to what depth said quadtree is calculated? The world is made mostly of moving objects1, so the cost of ...
3
votes
2answers
228 views

HLSL: using “?” operator in Technique section produces branches?

I recently found that you can do this: int AnotherShaderConstant = 0; float4 PixShader(VSOUT input, uniform bool Direction) { float4 color; if (Direction) color = GoLeft(); else ...
3
votes
1answer
199 views

Texture prefetching in GLSL

I have a fragment shader which needs lots of semi-random access to 32x32 texture patch. Fortunately, the patch is constant for each poly, so there should be no issue storing the whole thing to the ...
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 ...
3
votes
1answer
734 views

Flash AS3 Tower Defense MouseEvents

In my tower defense game and every tile has its own mouse event listener. I am wondering, would it be better to use one event listener (MouseEvent.CLICK) and then when it runs the function, should I ...
3
votes
1answer
57 views

CSS Sprite position updates slow due to addition of 'px'?

I'm moving fewer than 10 position: absolute elements around the screen. An enormous amount of CPU time (profiled in Chrome as (program) i.e. native code) is used where I do the following: style.left ...
3
votes
1answer
282 views

how to represent a nested menu system?

I'm wondering what would be a clever way of making a layered menu system, in terms of what data structures to use. An example of what I mean: A unit has the ability to construct buildings, and to ...
3
votes
2answers
460 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 ...
3
votes
2answers
224 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 ...
3
votes
1answer
409 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
2answers
326 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 ...
3
votes
1answer
860 views

How to optimise mesh data

So i have some procedurally generated mesh data and i want to reduce it down to its minimum number of verts. In case it matters this is a unity project. Working on the basis of a simple example, ...
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 ...
3
votes
1answer
294 views

Looking for literature about graphics pipeline optimization

I am looking for some books, articles or tutorials about graphics architecture and graphics pipeline optimizations. It shouldn't be too old (2008 or newer) - the newer, the better. I have found ...
2
votes
2answers
738 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, ...
2
votes
6answers
750 views

Is it good to sort objects list before every rendering?

I need to render a "tile" game, which are like these: or or I don't know how to render them in correct order. I intend to perform a sorting operator before every rendering (depending on their ...
2
votes
3answers
2k views

Using SQL for a Realtime Multiplayer Game Server's Working Data (Fast Enough?)

The game I'm working on currently has a Client in Flash AS3, and a Server in C# (multithreaded). Currently I use mySQL to handle logins (Raw access: no middleman for accessing the database) which ...
2
votes
2answers
517 views

Store values or calculate values [closed]

We're talking about fairly anal levels of optimisation here that I wouldn't really worry about in anything other than mobile games. Let's say for example you were drawing a texture to the screen in a ...
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): ...
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 ...
2
votes
1answer
260 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
339 views

How can I remove branches from a fragment shader function?

I have a fragment shader, when I've carefully managed to remove most branching decisions, as I have found out through research here that they are bad. But I have one function that I just can't work ...
2
votes
2answers
122 views

Triangulating a point mesh at runtime

I'm familiar with various methods of triangulation (eg Delaunay), but since I have hundreds of thousands of regularly spaced points that may need to be revisited like this on each physics frame, I'm ...
2
votes
1answer
223 views

Optimising out tiles outside of viewport

I am playing around with the HTML5 canvas and have begun implementing a tile engine. However, it's currently very inefficient: I have a 100x100 2D array and my code loops through the whole thing ...
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 ...