All Questions
Tagged with performance or optimization
1,244 questions
1
vote
1
answer
60
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 ...
1
vote
1
answer
92
views
Is there a way in Unity to detect which gameobjects are making it take longer to enter/exit play mode?
I have a scene with quite a few gameobjects in it and for the first time since using Unity, when I enter/exit play mode (or even close and reopen the scene) it takes about a minute to complete this. ...
0
votes
0
answers
85
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 ...
0
votes
0
answers
156
views
Terrain vs mesh : which one is better in terms of performance and storage size?
I have heard many conflicting opinions about the pros and cons of using terrain vs mesh in Unity. Some people say that terrain has better performance while others say mesh does. So, I am not sure ...
1
vote
1
answer
141
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
109
views
How to reduce the size of my terrain?
I made a WebGL game at https://jugglecats.itch.io/startastic (password is "password"), but the game was far too large, making it take a too long to load. Upon inspecting the build report (...
0
votes
1
answer
147
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
1
answer
91
views
Unity shader optimization
I have a problem with badly optimized palette cycling function of the background shader:
...
0
votes
2
answers
311
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-...
1
vote
1
answer
163
views
How to implement engine sounds for racing games on weak systems without the use of tools like FMOD?
Asking this question because I want to implement performant sound handling on weaker systems. While focusing on such systems are a deadend since everyone has fast devices, I still want to do this as a ...
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
24
views
Defining camera settings to optimize the use of a shadowmap texture
In my engine I have the possibility to switch from isometric or first person camera, with a far/close camera point of view. In isometric mode the camera point of view can also be in either the -X or +...
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
83
views
Android ValueAnimator onAnimationUpdate jumps animated values!
ValueAnimator sounds like an awesome way to animate values which can be used on views. But, somehow the animated values are not showing up as they should!
I used this set up before to animate a ...
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: ...
0
votes
2
answers
264
views
Why are Time.realtimeSinceStartup and Time.realtimeSinceStartupAsDouble so slow when called repeatedly?
I have the following Update() code which calculates the approximate number of loops per second:
...
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 ...
3
votes
2
answers
188
views
How to make a digger-like procedurally generated maze that can be queried at coordinates without having to generate?
I would like to procedurally-generate ant farm-style layouts on a grid: long horizontal spaces connected by short vertical spaces. Also similar to cave systems formed by water erosion.
Every tile in ...
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
1
answer
179
views
Holographic principle applied to 3D rendering in video games
When reading about the usual methods of rendering 3D models in game programming one encounters ideas such as the Perspective Projection Matrix (rasterization), Ray tracing and Ray marching. On the ...
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
0
answers
70
views
Fast way to compare a large set of positions, rotations, velocities, etc. during runtime (possibly every frame)
The Goal
I'm working on a vr gesture recognition system. Normally these systems are dependent on "drawn" gestures, but I want something that compares position, rotation, velocity, angular ...
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 ...
0
votes
0
answers
358
views
How to efficiently instantiate large amount of GameObject?
The topic with the same title here
How to efficiently spawn & render many cube prefabs for a voxel world?
is actually asking about efficiently rendering.
Assume I need to instantiate a lot of ...
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)...
0
votes
1
answer
70
views
How to minimize cost of drawing 1-2 objects while keeping them bright enough to see?
I have a really simple scene that includes only one or two 3D objects, and the rest of it is UI. My target is WebGL so I am taking every chance to optimize thing as much as possible.
The game objects ...
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
1
answer
269
views
My Godot 4 2D game is running badly on HTML5 on some PCs
I'm using Godot 4.2.1 and my game is a pretty simple top down shooter. I tried exporting to HTML5 on Itch.io and the game runs fine on certain PCs but not others ?...
when running the game on my ...
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
101
views
Is Unity Legacy/Diffuse shader almost as efficient as Mobile/Diffuse shader (for mobile apps)?
I am developing mobile apps. I know that Mobile shaders are the best options for mobile apps in terms of fast performance.
However, I purchased 1 Unity asset, which only works with Legacy/Diffuse ...
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 ...
2
votes
1
answer
163
views
How to set up high-performance collisions for level geometry in Unity?
I'm new to Unity. I was wondering what the best workflows were for placing colliders.
I'm going for high performance, and I've heard that mesh colliders aren't as performant as just placing down box ...
0
votes
3
answers
146
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
167
views
What settings on light components actually work in Rec Room Studio?
In experimenting around with the Rendering settings for a spotlight, I've discovered that the Culling Mask does not actually apply when a room is built. Despite the ...
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 ...
0
votes
0
answers
171
views
Huge framerate drops in an empty scene - what is going on?
I would really appreciate you guys helping me out with a baffling problem I am experiencing. I have a near-empty scene. It has one object, i.e., a ball bouncing in it, targeting 60FPS.
I am deploying ...
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
1
answer
85
views
How do I go about Mesh Simplifcation in generating multiple LODs?
I have been recently looking for any information on creating multiple LODs (level of detail) for an inputted mesh. However, there does not appear a lot of articles or pseudo code on how to go about ...
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
0
answers
53
views
Efficient Implementation of Dynamic Snake-Like Body in UE5: Seeking Advice on Optimized Approach
Platforms: iOS, Android, and PC.
I want to implement a snake body that can dynamically grow in length, narrow, and bend (simulate body movement, similar to bending in an arc).
I'm using UE5, and ...
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
1
answer
239
views
Minecraft-like simulation optimization
I am working on a voxel game similar to Minecraft. The goal would be to handle more entities but also offer a more immersive experience by the fact that the player does not need to worry about loading ...
0
votes
0
answers
437
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/...
17
votes
3
answers
6k
views
Game loop isn't performing well enough, so my frame rate is too low (Windows Form + GDI+)
I decided to learn about building games, so I picked up C# to use it along with Windows Form - I already have C# experience, so that was the main reason I did so. That said, I tasked myself to build a ...
0
votes
1
answer
138
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 ...
1
vote
0
answers
170
views
How to implement MLAA (like SIMD-based approach by Intel)?
I'm looking for previously available public source code sample what was originally posted here https://www.intel.com/content/www/us/en/developer/articles/code-sample/morphological-antialiasing-mlaa-...
0
votes
1
answer
446
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 ...
1
vote
0
answers
54
views
How to quickly traverse bi-directional nodes without repetition?
I want to optimize a bidirectional node traversal algorithm.
Because the node is bidirectional, it may cause an infinite loop. The current algorithm uses memory records.
However, memory writing will ...
0
votes
1
answer
45
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 ...