All Questions
Tagged with performance or optimization
1,244 questions
1
vote
1
answer
61
views
D3D11 batching with texture arrays
When employing texture arrays how does typically communicate the associated indices when rendering to batch as much work as possible per draw? The only approaches I can think of are:
Supply texture ...
0
votes
0
answers
86
views
FPS improves when parents of skinned AI are disabled before play, but not when disabling them during play
I am playing a scene in Unity editor. If I play the whole scene, the FPS is 125.
Next, there are 2 test cases.
Case 1: If I disable some big game objects first, and then play the scene, the FPS is ...
1
vote
1
answer
143
views
Problem with SDL2 optimization (tree structure)
while I was trying to optimize SDL2 rendering phase as much as possible, I reached a wall. I tried to search on the internet but I could not find any solution. So, I need help.
Let me explain the ...
0
votes
1
answer
148
views
How much slower are decent ECS frameworks supposed to be, compared to a naive array lookup?
I'm developing an ECS framework in C++ and after doing every optimization I could think of, the comparison with a naive array look up is terrible. It's 10x worse in debug mode and 3x worse in release ...
0
votes
2
answers
312
views
How can I efficiently render lots of moving objects in a game?
I'm using OpenGL but this question should apply generally to rendering.
I understand that for efficient rendering in games, you want to minimize communication between the CPU and GPU. This means pre-...
0
votes
1
answer
117
views
Can LOD Groups be used for gameobjects that don't have a renderer component?
I am trying to work out how to use LOD Groups with interactive gameobjects. As a simple example lets say I have a prop which when the player is a certain distance away it plays a sound. The problem I ...
0
votes
0
answers
66
views
Analyzing lag spike in Monogame
The game I am making is having big lag spikes once every 10 seconds or so while running. The spikes seemed to correlate with garbage collection (although I can't be 100% sure), so I thought my problem ...
0
votes
0
answers
61
views
Android canvas clipping rectangle showing on canvas draw call with paint object that has blurmaskfilter and shadowlayer
I created a game using xml and views on Android. Yes, I know it was not the best choice of development for a 2d game. But, my game is turn based, so mostly static. You can test the game out here: ...
1
vote
2
answers
199
views
Optimizing recursive portal traversing
I am working on an engine that uses portals for rendering areas, called "rooms".
A room can have any number of portals, oriented in anyway, but the most common case are axis aligned portals ...
1
vote
1
answer
161
views
How to optimize an infinite runner game?
I am making an infinite runner game.
Here is the idea how it look like :
Camera stays at 0,0,0 position.
Game uses prefabs chunks with pooling system already.
Dynamic shadows. Baking is possible but ...
1
vote
2
answers
152
views
Relation between an object and its renderer
Recently I decided to start optimizing code in the game development field.
I found this pacman project on github a good starting point:
https://github.com/LucaFeggi/PacMan_SDL/tree/main
I found a lot ...
0
votes
1
answer
107
views
How do you handle game performance issues?
I’ve been running into some game performance issues lately and could really use some advice. How do you handle game performance issues? I’m talking about things like lag, slow loading times, and frame ...
1
vote
0
answers
217
views
Sweep and Prune algorithm performance
I just managed to implement my Sweep and Prune algorithm together with AABB and it's working correctly in the first axis (I haven't implemented second and third yet to complete the collision detection)...
1
vote
0
answers
101
views
Game published for web freezes for 2-3 seconds the first time an explosion effect triggers
Using Godot 4.2.1
when exporting my game to HTML5 it runs completely fine until an explosion effect is spawned on screen for the first time when killing a mob, the game freezes for an entire 2-3 ...
0
votes
0
answers
80
views
What is the best lighting & shadow setup for mininal draw calls and triangles?
I have been testing out various lighting and shadow settings in Unity since during play mode the stats are showing a much higher set pass call and triangle count to what I know my model has. I have ...
0
votes
0
answers
108
views
`textSubImage2D` inconsistent performance
I have a problem when creating a texture with WebGL. The thing that I do not understand is that the first call with texSubImage2D with a canvas leads to the ...
0
votes
3
answers
149
views
Reduce processing time of image to shape
I'm making a simple game engine using Java and have found a major issue.
To create accurate collision detection I decided to convert a transparent image into a ...
0
votes
0
answers
51
views
Does the Rec Room Studio Performance Explorer account for static batching?
The Performance Explorer in Rec Room studio appears to be doing the naive calculation for draw calls where it just adds up unique materials on unique meshes.
In the above image, all of the meshes ...
3
votes
5
answers
3k
views
Is there any performance penalty to unsigned integer underflow?
Is there any performance penalty to unsigned integer underflow?
Suppose I have a computation subtracting two unsigned integers (so underflow can happen if b > a),...
0
votes
0
answers
104
views
How to efficiently hash canonized structs
Say I have a canonized struct:
{
health: 100,
items: ["apple", "knife"],
name: "Bobby"
}
"Canonized" here means ...
0
votes
1
answer
2k
views
Int vs Float, which one is faster for gpu?
My game need to loop through massive amount of data, and the amount of data can increase by a lot depending on world settings set by player. The data is too big for CPU so i need to use GPU for it ...
0
votes
0
answers
440
views
How Virtual Textures work?
I'm trying to understand how Virtual Textures work. After coming across this post:
https://discourse.threejs.org/t/virtual-textures/53353
And more research here:
https://docs.unity3d.com/Manual/...
0
votes
1
answer
140
views
Improve performance of server updating game state
I have a Node.js game that sends update packets to players every 30ms.
The code I currently use works this way:
Get the entities within each player's vision.
Create a temporary object that stores ...
0
votes
1
answer
448
views
In C++, should POD-types be used for performance-critical parts, where many instances of the type will be handled?
(In C++)
For a type whose instances will be handled in great numbers in performance-critical areas, such as a Vector2 class representing 2D-positions, should such ...
0
votes
1
answer
46
views
Change of computing power/ time needed when imported Mesh triangle number changes
I am doing a Unity project, that makes it necessary to import a mesh consisting of triangles.
As it is possible to reduce the amount of triangles in a mesh and keeping the structure similar, I am ...