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
28 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
1answer
30 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 ...
0
votes
1answer
32 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 ...
0
votes
0answers
41 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 ...
1
vote
0answers
48 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
2answers
94 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 ...
7
votes
1answer
273 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 ...
0
votes
2answers
135 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 ...
0
votes
1answer
51 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 ...
6
votes
1answer
174 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
0answers
121 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 ...
1
vote
2answers
149 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 ...
1
vote
1answer
30 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
45 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. ...
8
votes
1answer
128 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
...
0
votes
0answers
22 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
49 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
91 views
How should I store a procedurally generated grid level of an infinite size?
I have a 2d grid level. It infinitely grows. If it was not of infinite size, a 2D array would be perfect, as I need to constantly have each grid talk to its neighbors.
For example, with a 2D ...
1
vote
2answers
111 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 ...
1
vote
1answer
265 views
GPU usage below 90% = poorly optimized game [closed]
Ok so not exactly a "development" question but highly related.
When I play games I often look at performance numbers, like CPU usage, GPU usage, memory usage and others. Let us talk about GPU usage ...
4
votes
3answers
365 views
Efficiently Handling Entity-Interactions in a Tile-Based World
I've been programming Roguelike games lately and there's a common problem I always run into. I can't seem to find a satisfactory solution for handling Monster-Monster interactions.
For the intents ...
1
vote
2answers
116 views
FPS drop when detecting collision (sfml, c++)
So, I have this small class with a collision detection function in it, it's called every frame.
When I run the game I get around 8000 FPS, but when the collision function gets called it drops to ...
1
vote
1answer
112 views
How to combine tiles in a procedurally generated level in 2D tile based maps?
I am developing a 2D tile-based top-down game. It is currently instantiating square objects with a sprite renderer to procedurally generate the map.
Each floor and wall is a 1-unit wide object.
I ...
0
votes
1answer
65 views
Avoiding GC when rebuilding Mesh.uv and Mesh.vertices
Since unity will not allow users to iterate over mesh.uv and mesh.vertices, I am stuck having to use GC intensive calls when applying an array of uvs and vertices to a mesh. I run into high GC ...
1
vote
0answers
54 views
Techniques of graphics rendering with single CPU core? [closed]
I am interested in methods of 2d and 3d rendering using single thread on an average CPU (e.g. for programming games for old and low-end PCs).
While I usually have no performance problems when using ...
2
votes
1answer
72 views
Giving values to uniform in OpenGL
First thing is that I know how to give values to uniforms in OpenGL. Second thing is that it is a question related to optimization and performance.
The habit for changing the uniforms, we preferred ...
1
vote
0answers
184 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 ...
1
vote
1answer
67 views
Peer to Peer world download
I am creating a multiplayer JavaScript game with a PHP central server. Each user will be able to move around in a 3D world, with other users and NPCs. It came to my attention that SQL is not going to ...
3
votes
2answers
70 views
One big Instance or One instance for every moving entity?
I am creating a multiplayer JavaScript game with a PHP central server. Each user will be able to move around in a 3D world, with other users and NPCs. These NPCs will be controlled by the central ...
8
votes
4answers
639 views
How do I efficiently check if a point is inside a rotated rectangle?
Part for the sake of optimization, part for learning purposes, I will dare to ask: How can I most efficiently check whether a 2D point P is inside a 2D rotated rectangle XYZW, using C# or C++?
...
1
vote
2answers
162 views
How can I minimise memory thrashing when doing vector math in C# or C++?
I'm doing a lot of 3D math in my game engine loop using typical classes like Vector3D, Matrix4x4, Plane3D, etc. Currently every operation causes a new object to be created for the result value. The ...
0
votes
1answer
188 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 ...
1
vote
2answers
222 views
Optimize drawing “different” sprites in OpenGL ES 2.0 (batching?)
I started experimenting with OpenGL ES 2.0, and I'm trying to figure out a way to optimize/batch sprite drawing, where sprites only have the texture in common, but differ in the following properties:
...
2
votes
1answer
75 views
How do I stop off-screen tiles of a 2D tilemap from being rendered?
I am seeing lag because I render all tiles in my map at once. How can I exclude off-screen tiles from being rendered?
My tiles are 32×32 and my player is always in the centre of the screen.
Here is ...
1
vote
1answer
56 views
Calculating ln (natural logarithm) in games
I am developing a game for tablets using the Marmalade SDK and Cocos 2dX.
In my game I have implemented a separation steering behavior in order to keep some of my characters separated from eachother. ...
1
vote
2answers
278 views
How to PRECISELY measure execution time of a code?
In order to compare algorithms speed, I measure execution time of a code part with a method similar to the one described in this question.
I am not operating on Windows, but on Linux, so I use ...
4
votes
1answer
476 views
Memory-Efficient, Optimized Terraria-Like 2D Lighting
I am working on a terraria-clone and I am aiming for it to be able to be run on most Android devices. I am able to generate a world, jump around, etc but I am not looking to add in some efficient ...
9
votes
4answers
615 views
How to load a spherical planet and its regions?
I'm designing a game partially composed of planets exploration. I want to use pseudo-random generation for them, regenerating from a defined seed when I have to load them rather than store every ...
5
votes
2answers
213 views
RTS: Unit sight in fog of war
I am making an RTS game, and like most RTSs, you can see what's going on in a part of a map only if you have a unit over there.
I have few ideas how to accomplish this, but there are problems with ...
4
votes
3answers
439 views
How do I efficiently fill the background with a tiling image?
I'm learning Unity by developing a 2D game. It's similar to RimWorld and Prison Architect. I have a 32×32-pixel grass tile image that I want to fill the background with.
Here's a screenshot from ...
1
vote
1answer
79 views
How do I avoid lag when dynamically loading a map chunk?
I have a procedural 2d game which extends in all directions, on the surface similar to Terraria. When a player moves their camera close to the edge of the currently loaded terrain, I trigger an expand ...
0
votes
2answers
175 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
1answer
276 views
SerializeField vs GetComponent Efficiency
As far as I know, there are two built in ways to get an instance of a component in Unity.
1 - Serialize the field and drag in the component manually in the editor
[SerializeField] private MyScript ...
0
votes
0answers
201 views
Speed up the DirectX game - how else can I boost the fps with typical triangle drawing?
I am writing my own c++/DirectX engine. I've made the basic framework and here comes the time for optimizations.
I don't want to focus on optimizing the resources themselves right now (meshes, ...
1
vote
2answers
65 views
How to handle (0,0) in 2D game quad tree?
I am not sure how to handle situation when out objects (player) is in center (0,0) point of game which is crossing of four quads. How to handle that case?
This image shows problem:
Red rectangle is ...
0
votes
1answer
54 views
Best approach for level specific textures
TL;DR: Best way to handle level-specific textures without overkilling memory usage and killing performance and keeping things clean in OpenGL for mobile (also lower-end devices) and desktop using ...
8
votes
1answer
278 views
(Unity) Optimised networking solution for many moving objects
I've currently undertaking quite an ambitious project. In short, it's a real time multiplayer strategy game which has bacteria mechanics.
Essentially, I have two remote players in the environment, ...
2
votes
1answer
499 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 ...
1
vote
2answers
161 views
Optimization for lots of UV coordinates update for tilemap animation
In my game, I procedurally generate tile map mesh and modify it when travelling around the "world". Each tile is a quad. So they each, have their own UV points. (Obviously)
I am using Unity for this, ...
3
votes
2answers
90 views
What does D3DXOptimizeFaces function do?
I know that this function generates an optimized face remapping for a triangle list, but what actually this optimized remapping is?
The triangle faces are remapped, but based on what?