The quality, efficiency, and speed of running gameplay as a result of several factors in the design and structure of the game and its architecture.
33
votes
7answers
4k views
What are the performance difference between unsigned and signed integers?
I am aware of the performance hit when mixing signed ints with floats.
Is it any worse to mix unsigned ints with floats?
Is there any hit when mixing signed/unsigned without floats?
Do the ...
22
votes
5answers
6k views
why would you use textures that are not a power of 2?
In the early days of OpenGL and DirectX, it was required that textures were powers of two. This meant that interpolation of float values could be done very quickly using shifting and such.
Since ...
17
votes
6answers
5k views
How can I improve rendering speeds of a Voxel/Minecraft type game?
I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD ...
16
votes
1answer
7k views
What is the benefit of triple buffering?
I read everything written in a previous question. From what I understand in double buffering the program must wait until the finished drawing is copied or swapped before starting the next drawing. In ...
14
votes
5answers
909 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 ...
13
votes
3answers
2k views
Logging library for (c++) games
I know a lot of logging libraries but didn't test a lot of them. (GoogleLog, Pantheios, the coming boost::log library...)
In games, especially in remote multiplayer and multithreaded games, logging ...
13
votes
1answer
539 views
Is there any performance benefit to sharing shaders between programs?
OpenGL allows you to share the same shader between multiple programs. Aside from saving small amounts of memory and a shader handle, are there any GPU-side performance benefits to doing this?
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 ...
12
votes
5answers
13k views
Objective-C or C++ for iOS games?
I'm pretty confident programming in Objective-C and C++, but I find Objective-C to be somewhat easier to use and more flexible and dynamic in nature.
What would be the pros and cons when using C++ ...
12
votes
3answers
919 views
Is there any documentation comparing/contrasting C++ standard library implementations?
(This is not game programming per se, but I'm certain if I asked this on SO I'd get told not to prematurely optimize, even though history tells us every large game ends up worrying about these ...
12
votes
1answer
585 views
Is nVidia's CUDA suited to performing pathfinding calculations?
I want to know if it would be worth executing pathfinding on the GPU (using nVidia's CUDA, or an equivalent) in certain situations, or whether it would be a wasted effort. The situation I imagine ...
11
votes
3answers
1k views
Python Performance vs Game Maker
I was originally thinking of creating a game with Python and SFML. I understand Python is slow compared to C++, but how is it compared to Game Maker?
The main reason I ask is I recently played a Game ...
11
votes
4answers
2k views
Is SVG a viable technology choice for web-based game?
I have started to read up about the web technology available for doing web-based game with only Javascript, but I have no where got feedback about SVG with HTML5. Is is a viable choice ? Does it ...
11
votes
4answers
1k views
How to continuously find all entities within a radius efficiently?
I have a very large number of entities (units). On each step, each unit needs to know the positions of all units near it (distance is less then given constant R). All units move continuously. This is ...
11
votes
2answers
865 views
Multiplayer FPS server side performance
This is related to MMO Performance except that question is about bandwidth. This is about cpu load.
I put together a simple FPS using node.js and webGL. It's extremely simple, a lot like the ...
10
votes
1answer
680 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 ...
10
votes
1answer
447 views
Speeding up procedural texture generation
Recently I've begun working on a game that takes place in a procedurally generated solar system. After a bit of a learning curve (having neither worked with Scala, OpenGL 2 ES or Libgdx before), I ...
9
votes
3answers
2k views
Why does OpenGL >= 3 only allow VBOs?
I see that OpenGL versions 3 and up eliminate the use of client-side rendering. Immediate mode has been eliminated, and vertex arrays seem to be deprecated. Instead, if I understand correctly, VBOs ...
9
votes
2answers
1k views
How should I account for the GC when building games with Unity?
*As far as I know, Unity3D for iOS is based on the Mono runtime and Mono has only generational mark & sweep GC.
This GC system can't avoid GC time which stops game system. Instance pooling can ...
9
votes
1answer
362 views
Is it worthwhile to use particle pools in managed languages?
I was going to implement an object pool for my particle system in Java, then I found this on Wikipedia. To rephrase, it says that object pools aren't worth using in managed languages like Java and C#, ...
9
votes
1answer
214 views
Efficient solution for multiplayer space partioning?
This question is a little tricky, but I will try to make it clear.
Lets say I am building an online game (not MMO-scale), but that supports as many players as possible, in a authoritative server ...
8
votes
4answers
2k views
Which Database (RDBMS vs NoSQL vs BOTH) to use for a Realtime Multiplayer Game?
I'm working on a realtime multiplayer game that will require a database (for features such as player profiles, friends, unlocks, news, etc.) This is a standard PC game (not browser-based) and will use ...
8
votes
3answers
6k 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 ...
8
votes
3answers
446 views
Vector3 vs. Vector2 - performance, usage?
I'm currently playing around with XNA, and creating a simple 2D platformer. I was thinking of adding multiple layers to make it a little bit of challenge.
In stead of having a Vector2 for my ...
8
votes
1answer
2k views
What does vsynched mean?
I'm always looking for ways to improve the smoothness of my games. When I read around the net I come across the term "vsynched" quite often. What does vsynched mean?
8
votes
3answers
1k views
What's a good data structure solution for a scene manager in XNA?
I'm playing with XNA for a game project of myself, I had previous exposure to OpenGL and worked a bit with Ogre, so I'm trying to get the same concepts working on XNA.
Specifically I'm trying to add ...
8
votes
4answers
6k views
How to improve batching performance
I am developing a sprite based 2D game for mobile platform(s) and I'm using OpenGL (well, actually Irrlicht) to render graphics. First I implemented sprite rendering in a simple way: every game object ...
8
votes
5answers
1k views
Geometric Transformations on the CPU vs GPU
I've noticed that many 3d programs normally do vector/matrix calculations as well as geometric transformations on the CPU. Has anyone found an advantage in moving these calculations into vertex ...
8
votes
2answers
221 views
Managing graphic state and components?
I often tend to do a lot of premature optimazation when dealing with graphics. There are a few principles I always try to follow:
Keep the number of D3D components to a minimum. (Render states, ...
8
votes
2answers
638 views
XNA stuttering at regular intervals
I'm trying to do hardware instancing but I'm hitting some strange performance problem. The average framerate is around 45, but it's extremely choppy.
Windowed
SynchronizeWithVerticalRetrace = false
...
8
votes
2answers
414 views
Automating XNA Performance Testing?
I was wondering what peoples approaches or thoughts were on automating performance testing in XNA. Currently I am looking at only working in 2d, but that poses many areas where performance can be ...
7
votes
1answer
464 views
Information about rendering, batches, the graphical card, performance etc. + XNA?
I know the title is a bit vague but it's hard to describe what I'm really looking for, but here goes.
When it comes to CPU rendering, performance is mostly easy to estimate and straightforward, but ...
7
votes
5answers
377 views
What implications does JIT (javascript/canvas) vs. AOT (Flash) have in terms of browser based game performance?
In my experience, even till this day, I still see more of a visual lag in entity movement / animation in JavaScript (Canvas) based games than I do in Flash based games.
Why is this - what exactly is ...
7
votes
2answers
1k views
Multi threaded game - updating, rendering, and how to split them
From the StackOverflow post (it was recommended I move this):
So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of ...
7
votes
3answers
1k views
Better Way To Set Up an Event System
Event Systems are amazing, they make extremely unwieldy code tame and really allow for dynamic creation of games through easy communication of objects and the game loop. I am having a hard time with ...
7
votes
4answers
3k views
Designing a flexible tile-based engine
I'm trying to create a flexible tile-based game engine to make all sorts of non-realtime puzzle games, just as Bejeweled, Civilization, Sokoban, and so on.
The first approach I had was to have a 2D ...
7
votes
2answers
431 views
Does use of simple shaders improve performace/battery life?
I'm making OpenGL game for Android. Till now i've used only fixed function pipeline, but i'm rendering simple things.
Fixed function pipeline includes a lot of stuff i don't need. So i'm thinking ...
7
votes
2answers
326 views
Windows Phone Performance Analysis makes game run faster. Possible reasons?
A XNA game I was making was running slowly on my WP7 device. However when I started it in Windows Phone Performance Analysis to find the bottleneck, the game ran smoothly on the same device.
I ...
6
votes
4answers
1k views
Is Carmack right about PC performance? And does Windows 8 address his concerns?
Here John Carmack claims that PCs are still slower that current gen console hardware because of the overhead.
"A lot of it's driver overhead issues, where there's so much that we
do in the game, ...
6
votes
4answers
1k views
Why do games run so much better in Windows than in OSX?
For example, on my Mac Mini with Bootcamp, Team Fortress 2 runs at about 20fps in OSX and 80fps in Windows. This seems to be a common case. Why is this?
6
votes
8answers
405 views
Is it useful to monitor framerate over the course of an arbitrary (but long) period of time?
How useful is it to keep a measurement of framerate over the course of long times (such as an hour) spanning multiple scenes/data environments?
I've had plenty of times where data throttling/pushing ...
6
votes
2answers
3k views
How to handle multiplayer in JavaScript?
I'm just doing a bit of research into tech to use for a mobile multi-player game.
It's more an experiment at present so for the moment, the only thing that Players need to be aware of is the other ...
6
votes
3answers
414 views
How often to save player's state in persistent online games?
In online games, people prefer to log on and off whenever they want. Usually, their game achievements are seamlessly saved, on the server. That is not that difficult to achieve, but I am wondering how ...
6
votes
1answer
816 views
Do Octrees, Kd-Trees, BSP only make sense for static geometry?
I'm still implementing my scene graph (see this question). Now, I wonder if a spatial representation such as a Kd-Tree or Octree to do View Frustum Culling (VFC) only makes sense with static geometry. ...
6
votes
1answer
636 views
How many shadow casting lights are in modern games?
I'd like to know how many shadow casting lights are supported in modern games, such as Uncharted 2, Crysis 2, Modern Warfare 2, Halo: Reach, etc. Do they all limit themselves to just a couple of ...
6
votes
1answer
686 views
Adding a simple mix() destroys the framerate
I have a very simple shader and added linear fog via mix like this:
finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);
Note that the view Z distance is in the variable that also ...
6
votes
2answers
381 views
An odd performance problem rendering a simple scene (less than 14k vertices) in OpenGL using two vbos with LWJGL
Problem
I have been having a strange degrading performance issue rendering a simple scene containing two "chunks" of 4x4x4 cubes each.
Video of problem
This is a screen capture showing my console ...
6
votes
3answers
381 views
Computing volumetric light effects analytically
In my previous question I have asked about an effect on how to visualize light spheres. The question resulted in a very nice formulated answer which described pretty well how to achieve this by adding ...
6
votes
1answer
144 views
Timestep schemes for physics simulations
The operations used for stepping a physics simulation are most commonly:
Integrate velocity and position
Collision detection and resolution
Contact resolution (in advanced cases)
A while ago I ...
5
votes
4answers
1k views
Can Flash games packed for iOS and other mobile devices achieve reasonable performance?
I was thinking of developing a game in Flash, as a hobby/educational project.
However, I was hoping I could make it run on a smartphone, but a friend who develops in Flash says that in their ...