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
1answer
39 views

Java Game Optimizing

I'm trying to optimize my game. I've got object Handler that goes trought all objects and then render and tick them. If I have lot of objects in game game lags or don't start. Could you please help me?...
0
votes
1answer
160 views

Integer linear program solver based AI

Is Integer Linear Programming a viable solution for a turn based game AI? My current AI solution uses an ILP solver. If you are unfamiliar with ILP, it uses a collection of Booleans to find most ...
1
vote
1answer
54 views

Unity Vector3.Angle() direction

I have a space fighter AI. I need to determine how to pitch, yaw and roll the craft to aim at the target. My current solution: To obtain the Yaw angle to position the target above the fighter, ...
2
votes
1answer
668 views

Unity Grid Layout causing multiple draw calls

We are developing a game in Unity 4.6.6 for both Android and iOS. Currently I am building the game UI with the new Unity UI system. In particular I am building a button list to create kind of ...
0
votes
0answers
43 views

Why does some games have long unloading screens? [closed]

When I select exit -> return to main menu on certain games (XCOM 2, Enemyfront etc), it takes almost the same time to go back to the main menu as it did to load the level in the first place. Why ...
2
votes
1answer
306 views

How to choose and scale heuristics for A-star on a graph?

I am trying to find the best and scale my cost function for my algorithm. I am following amit blog which explain that (http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#manhattan-...
2
votes
1answer
388 views

submeshes and dynamic batching doesnt work as expected

I'm duplicating one object with submeshes frequently, and assigning a random material from five materials to each submesh. There is batching happening, but it's not quite as efficient as I would have ...
13
votes
5answers
2k views

How can I optimize a collision engine where order is significant and collision is conditional based on object group?

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 ...
1
vote
1answer
62 views

Terrain rendering using Geometry Shader

my idea is render an entire terrain based on heightmap using geometry shader, i am parsing only one point per quad of terrain with the heights of the corners, however for some reason i am not being ...
5
votes
2answers
882 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) ...
1
vote
1answer
128 views

Frustum culling takes ages c++

I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count. I read some forum answers, people say 0....
4
votes
1answer
129 views

On Android, How can I avoid FPS drops during sensor listener setup/tear down?

When I open my Android app after 5 or 10 seconds it sets up the sensor listener, during which I see clear stuttering and the FPS drops for a second to 40 instead of 60. Is there a way to avoid this? ...
0
votes
1answer
52 views

Which three points to use to calculate a frustum plane?

So I have a view frustum I'm going to be using for frustum culling. I have a method that finds the cross-product of three points but since each side of the frustum has four corners I don't know which ...
1
vote
2answers
67 views

Multithreading/Optimisation for Random Generation in Gamemaker

I have a FurGeneration() script in my game; when run, it randomly generates individual oFur objects in specified areas in the game's single Room. Each has a random depth and one of three sprites, and ...
0
votes
2answers
27 views

How do I optimize checking adjacency within a matrix (including diagonals)? [Gamemaker Studio]

How I was checking adjacency before: if (obj_Handle_Links.Last_Link.Matrix_Location_y = (Matrix_Location_y-1) || obj_Handle_Links.Last_Link.Matrix_Location_y = (Matrix_Location_y+1) ...
0
votes
2answers
35 views

How to Check and Destroy “linked” gems quickly efficiently

Engine: Gamemaker Studio (simplified) Situation: I have a 6x6 board (at this moment) stored in a 2D matrix, a mechanism for linking adjacent squares, similar to Puzzlecraft, and a button that ...
1
vote
1answer
57 views

Multiple traversal of a component-based hierarchy

Let's say a game use a component-based hierarchy to store all of its entities. So it can have objects, characters, lights organized in some kind of tree. When rendering the game, it needs to first ...
0
votes
1answer
46 views

AI parameters for Tetris like game

I am building an AI to play a variation of Tetris. The rules are changed in that there are 19 different types of pieces, rotation is not allowed, and the pieces can be placed anywhere in a 10X10 grid. ...
0
votes
0answers
36 views

How to determine which chunks to load/unload when moving through an infinite voxel terrain

I'm implementing a smooth voxel terrain engine in C++. The terrain is split into same-sized rectangular 'chunks'. After I moved chunk generation and loading into a background thread, I don't have to ...
2
votes
1answer
387 views

Unity Profiler - What would cause PlayerEndOfFrame to have 10-16MB in GC Alloc?

I can't find much documentation on what "PlayerEndOfFrame" does. Sure it is the end of a frame but what would cause the GC Alloc to go so high? This is the profiler results from a debug build on a ...
0
votes
1answer
72 views

Configuring Implicit Multi-GPU Rendering Driver Settings Programmatically

What is available to game developers to take advantage of implicit multi-GPU rendering technologies as of 2016? For this question I will only be asking about Nvidia's SLI and AMD's Crossfire ...
1
vote
1answer
98 views

2D Sprite batching in OpenGL: How to send transformation data to GPU

OpenGL newbie here. So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
3
votes
1answer
107 views

Why create meshes instead of using Planes?

I'm working on a top down 2D game in Unity and I want to create levels dynamically. All tutorials I find tend to talk about generating meshes so I've followed some great tutorials such as this one. ...
0
votes
2answers
50 views

Fastest way to neutralize scale in the transform matrix?

Let's assume we have 4x4 3D transformation matrix, that is the result of scale, rotation, and translation transforms. How to set its scale to (1,1,1) in the fastest way? Assume also that the matrix is ...
0
votes
0answers
125 views

Unity Level Streaming

I'm working on mobile 2D game, and every level has about 5000 sprites of a 256x256 resolution representing static objects like tiling ground, roads, etc. I want to know whether or not that would ...
0
votes
2answers
39 views

(Optimization) Efficiently discovering if a new day has been reached

I'm making an in-game clock/calendar system. In-game time is 12x real time. In addition, in-game events can fast-forward time. I also have in-game events that reset or trigger at the turn of each day. ...
2
votes
2answers
263 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 ...
0
votes
2answers
68 views

reuse texture between quad objects

This question is specific to unity: I want to spawn multiple blocks, each representing a letter. There will be more than one copy of an alphabet. I have a big texture which contains all the letters ...
0
votes
0answers
26 views

Physics2D lag on increased timescale Unity

I have been working on an infinite runner kind of game in which i am trying to implement a speedup powerup kind of thing . Something that will allow me to boost through the levels at a high speed I ...
0
votes
1answer
61 views

Libgdx: more efficient way of using Vector 3?

I currently use if(cam.frustum.pointInFrustum(new Vector3((float)posX, (float)posY, 0))) To check if my sprite is in the camera's view. I have to make a new Vector3 every frame wich is very ...
0
votes
0answers
32 views

Convolution of luminance values in shader

For my fragment shader, I need to take the convolution of luminance values of a square block of pixels. I tried with 3x3 block and took luminance and convolution. But it ended up in huge performance ...
0
votes
2answers
143 views

Switched from immediate mode to VBOs, game runs slower

trying to improve draw performance on my c++, OpenGL, SDL game. Back in school we mostly learned immediate mode, so thats how my drawing was originally implemented. When I started reading up online ...
-2
votes
1answer
405 views

Stop rendering to lessen amount of resources used?

Recently I've been writing a bot for a game which renders using DirectX. When I run multiple instances of the game, it takes a toll on my computer's CPU/RAM usage. Can I stop DirectX from rendering to ...
0
votes
1answer
34 views

Any reason not to combine an AO Map and Cavity Map into one texture?

If an Ambient Occlusion Map is for mapping shadows based on closeness of neighboring geometry, and a Cavity Map is for mapping smaller shadows based on angle or distance, then is there any reason not ...
1
vote
0answers
87 views

Why does reverse depth buffering provide more precision? (with DXGI_FORMAT_D24_UNORM_S8_UINT Datatype layout)

I lately came around methods optimizing the use of the depth buffer, as the easiest solution reverse depth buffering is mentioned but I cannot wrap my head around why I would be gaining a better depth ...
0
votes
0answers
43 views

My Movement Function is working good but called only once

I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not. if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
0
votes
2answers
115 views

How to fix my tile-based game's tile movement code ? (like a CandyCrush Style)

I'm currently creating a tile-based game like a CandyCrush style direction movement (no problem on only down movement) trying to smooth, not laggy tile movement with a board piece, and I'm writing a ...
1
vote
2answers
151 views

Optimization of Cube-based World

I'm currently working on taking an idea I've been toying with in C++ and bringing it into Unity, but I'm struggling to figure out how to make it performant and how to do things the "Unity way". My ...
7
votes
1answer
279 views

How to make illusion of round world?

I want to make a flat world, but i want to split it into pieces which will load in segments (for better optimization), and when you are at the end of map it will start loading segments from the ...
12
votes
4answers
6k views

Which opcodes are faster at the CPU level? [closed]

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 ...
6
votes
1answer
196 views

How can I speed up this HLSL shader?

I have written a lighting shader file that is used as the fragment shader part of a deferred lighting pipeline. Unfortunately, each iteration seems to be adding 0.5ms to my frame time, so any more ...
1
vote
2answers
154 views

Can I make this physics simulation any faster?

I've made a little real time physics simulation that solves some bodies. CirclevCircle && CirclevOrientedRect I would like someone to tell me if I'm doing something drastically wrong. I know ...
2
votes
0answers
128 views

Recognize pattern in 3D building environment

I'm currently developing 3rd person building game (as bacheleor thesis). I need to recognize constructed patterns co I can mark corresponding structure as some building (so player can start using that ...
8
votes
1answer
175 views

In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?

In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way: FixedUpdate(dt) // I use fixed timestep foreach collide c1 in allNotStaticColliders ...
1
vote
1answer
41 views

How to add images?

I was adding images after reading in the documentation: This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for ...
0
votes
0answers
49 views

What is the best way to group lots of squares into one VBO?

I'm making my first game in OpenGL, using procedural generation, and it is a similar concept to Terraria. At the moment, I have one, very small VBO for a square ('block') and an EBO for its vertices. ...
0
votes
2answers
193 views

How do I dynamically grow a voxel world in all directions with chunks?

I've organized a Voxel world already but the problem is that it can only "grow" outwards. As a result, there is a single corner where it grows from, then outwards from there on. I want to be able to ...
0
votes
0answers
24 views

Different layouts?

I have had trouble in the past with optimizing my game for different layouts, so that the players don't see the game in different ways on different screens. Someone told me that the normal directory ...
0
votes
0answers
171 views

Culling And Optimization in a 2D Orthographic Game

I'm currently developing a 2D top-down space themed RTS game. I'm building the space procedurally from a seed. At the end of generation of all space objects, if i don't apply any optimizations I end ...
1
vote
1answer
142 views

Texture Packer - Any way to make it combine intelligently

I am making a Pokemon Clone, using libgdx. I have the different types of sprites: e.g. Back, front, back shiny, and front shiny. The current way the Texture Packer combines the textures seems to be ...