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.
0
votes
0answers
30 views
Really weird peaks when profiling a simple scene with Unity3D
I need some help optimizing my game. I have spent last 3 days digging around with no luck. I have noticed really odd results in the unity profiler so, I have created a simple scene with just a cube ...
1
vote
1answer
49 views
Optimize a vertex buffer and generate its associated index buffer
I need to generate a 64*64 grid with each cell being 32*32 wide.
The following code works perfectly but I was wondering whether it can be further optimized when creating the index buffer for it.
...
0
votes
1answer
153 views
2D sort for inventory items?
I asked this question some time ago. Now I ended up with just a sorter method that will sort the items based on their bulkiness/nSlotsRequired. Here's what I'm doing:
I store all the items I have in ...
3
votes
1answer
190 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 ...
13
votes
4answers
886 views
Optimizing collision engine bottleneck
If this is your first time on this question, I suggest reading the pre-update part below first, then this part. Here's a synthesis of the problem, though:
Basically, I have a collision detection ...
7
votes
3answers
606 views
Are collision detection always O(n^2)?
Are physics engine able to decrease that complexity, for example by grouping objects who are near each other and check for collisions inside this group instead of against all objects ? (for example, ...
1
vote
1answer
66 views
SharpDX - How do I write multiple streams to Texture2D?
I'm working on a 3D map that is cut as a simple grid of textures. The idea is to draw only one object with all those textures, instead of having a tile object for each of them. Correct me if I'm ...
2
votes
1answer
89 views
Optimising skeletal animation
I am implementing a skeleton system for my latest game. I am using my own linear algebra classes which already have some optimisations, such as separate transformPoint and transformVector functions ...
7
votes
1answer
143 views
GL ES: Fragment shader optimization
Summary:
I get FPS slowdown as soon as I try to tint the sprites (i.e: multiply texture with color in the fragment shader)
Details:
Hardware: iPod touch 4
I am drawing 700 sprites on the screen ...
-2
votes
1answer
131 views
For loop optimisation [closed]
Here are some variations of for loops:
1) Standard:
for (int i=0; i<limit; i++)
2) Using preincrement
for (int i=0; i<limit; ++i)
3) Inverting the loop
for (int i=limit-1; i>=0; i--)
...
1
vote
1answer
118 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 ...
0
votes
2answers
159 views
Displaying possible movement tiles
What's the fastest way to highlight all possible movement tiles for a player on a square grid? Players can only move up, down, left, right. Tiles can cost more than one movement, multiple levels are ...
4
votes
3answers
292 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. ...
6
votes
2answers
230 views
In DirectX 11, batching primitives for performance, how does this actually work?
I don't seem to be able to understand this. Microsoft says that one of the possible optimizations of for a Direct3D 11 if to batch primitives draw calls. For example in order to draw say 300 triangles ...
3
votes
1answer
214 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
3answers
217 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. ...
2
votes
1answer
128 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 ...
1
vote
4answers
114 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
1answer
91 views
Alternative to soundeffect.play()?
I have been using a profiler to optimize my game for the Xbox, my aim is as with any optimization to reduce excess CPU and memory usage. I have managed to cut down a lot of the processor time and ...
0
votes
1answer
168 views
Xna “Game.Run” method appears to be using up a lot of resources in my game, is this normal?
The question really is in the heading, but i have been using the visual studio profiler to optmisie my game, i have noticed that the game.run method is eating through 93.6% of the overall game ...
1
vote
6answers
463 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 ...
16
votes
3answers
706 views
In modern AAA games with open environment and lot of static content (eg : crysis), how is occlusion culling performed?
Two ideas i have in mind :
1) Scene is rendered to a invisible buffer, using low resolution and low polygon count models (or even using only bounding volumes like cubes or spheres). The buffer is ...
1
vote
0answers
75 views
OpenWorld SceneGraph management and optimization
I have a SceneGraph class which for now is just a simple list implementation, and the only optimization I've planned so far is a check is something like this:
//GetDistance returns the distance ...
4
votes
2answers
157 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
3answers
497 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 ...
2
votes
1answer
104 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 ...
4
votes
2answers
335 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 ...
2
votes
1answer
3k views
Unity3D draw call optimization : static batching VS manually draw mesh with MaterialPropertyBlock
I've read Unity3D draw call batching documentation.
I understood it, and I want to use it (or something similar) in order to optimize my application.
My situation is the following:
I'm drawing ...
1
vote
3answers
176 views
Multithreading for a mixed-genre game in Python?
So here's the situation. I'm making a game that mixes two genres; arcade shooter and puzzler. They don't intertwine TOO much; all the interaction that really goes on is that every time an enemy is ...
4
votes
1answer
170 views
Cheap ways to do scaling ops in shader?
I've got an extensive world terrain that uses vec3 for the vertex position attribute. That's good, because the terrain has endless gradations due to the use of floating point. But I'm thinking about ...
4
votes
2answers
210 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) ...
9
votes
1answer
186 views
Good resources for learning about graphics hardware
I'm looking for some good learning resources for graphics hardware (and associated low level software). Basically I want to learn more about what goes on underneath the opengl/direcx API layers in ...
0
votes
1answer
203 views
Fast software color interpolating triangle rasterization technique
I'm implementing a software renderer with this rasterization method, however, I was wondering if there is a possibility to improve it, or if there exists an alternative technique that is much faster. ...
2
votes
2answers
316 views
Help w/ iPad 1 performance for tile-based DOM Javascript game
I've made a 2D tile-based game with DOM/Javascript. For each level, the map data is loaded and parsed, then lots of tiles ( elements) are drawn onto a larger "map" element. The map is inside of a ...
0
votes
1answer
322 views
Speed up lighting in deferred shading
I implemented a simple deferred shading renderer.
I use 3 G-Buffer for storing position (R32F), normal (G16R16F) and albedo (ARGB8).
I use sphere map algorithm to store normals in world space.
...
0
votes
2answers
133 views
GPU optimization question: pre-computed or procedural?
Good morning,
I'm learning shader program and need some general direction.
I want to add noise to my laser beam (like this).
Which is the best way to handle it?
I could pre-compute an image and pass ...
4
votes
2answers
178 views
Game has noticeable frame drops but when through a profiler it always runs smooth
I'm trying to optimize my PC game but I can find the bottleneck since every time I run it through a profiler (gDEBugger) it runs smooths. When running outside gDEBugger I get these annoying hiccups. ...
0
votes
1answer
219 views
How to make this game loop deterministic
I am using the following game loop for my pacman clone:
long prevTime = System.currentTimeMillis();
while (running) {
long curTime = System.currentTimeMillis();
float ...
0
votes
1answer
127 views
How can I speed up this design?
I am currently developing a game that includes a server and some clients. Currently, the server does its work based on user input then draws the image the clients should see and sends it. ...
2
votes
1answer
111 views
How to handle shoot instructions, in a multiplayer TD
I'm currently working on a Multiplayer Tower Defense game, using ImpactJS & Node. I seek some clarification about how to handle projectiles from towers, let me explain.
So the server is running ...
1
vote
3answers
409 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
186 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
110 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
376 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
195 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 ...
2
votes
1answer
208 views
Regarding cel-shading of existing games
Is it possible to cel-shade existing games through API interception? I would assume yes.
If done properly, could cel-shading be used as a rendering optimization technique? This means, rather than ...
2
votes
3answers
884 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
195 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
204 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 ...
2
votes
2answers
2k 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 ...