Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [optimization]

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
60 views

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 ...
Benjamin's user avatar
1 vote
1 answer
92 views

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. ...
FrontEnd's user avatar
  • 1,789
0 votes
0 answers
85 views

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 ...
Job_September_2020's user avatar
0 votes
0 answers
156 views

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 ...
Job_September_2020's user avatar
1 vote
1 answer
141 views

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 ...
Binary Series's user avatar
0 votes
1 answer
109 views

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 (...
Almenon's user avatar
  • 113
0 votes
1 answer
147 views

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 ...
Cool guy's user avatar
  • 186
0 votes
1 answer
91 views

I have a problem with badly optimized palette cycling function of the background shader: ...
Tarak Tarakovich's user avatar
0 votes
2 answers
311 views

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-...
greenlagoon's user avatar
1 vote
1 answer
163 views

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 ...
Hash's user avatar
  • 93
0 votes
1 answer
117 views

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 ...
FrontEnd's user avatar
  • 1,789
0 votes
0 answers
24 views

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 +...
philB's user avatar
  • 331
0 votes
0 answers
66 views

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 ...
Depenau's user avatar
  • 111
0 votes
0 answers
83 views

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 ...
i_o's user avatar
  • 131
0 votes
0 answers
61 views

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: ...
i_o's user avatar
  • 131
0 votes
2 answers
264 views

I have the following Update() code which calculates the approximate number of loops per second: ...
user27520763's user avatar
1 vote
2 answers
199 views

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 ...
Raildex's user avatar
  • 812
3 votes
2 answers
188 views

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 ...
user avatar
1 vote
1 answer
161 views

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 ...
Askhento's user avatar
  • 123
1 vote
1 answer
179 views

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 ...
Felipe Dilho's user avatar
1 vote
2 answers
152 views

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 ...
X Y's user avatar
  • 111
0 votes
0 answers
70 views

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 ...
Pen's user avatar
  • 13
0 votes
1 answer
107 views

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 ...
Vandna Jadhav's user avatar
0 votes
0 answers
358 views

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 ...
Suratraak's user avatar
  • 101
1 vote
0 answers
217 views

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)...
Zoler1337's user avatar
0 votes
1 answer
70 views

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 ...
Ivan's user avatar
  • 379
1 vote
0 answers
101 views

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 ...
buzzbuzz20xx's user avatar
0 votes
1 answer
269 views

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 ...
buzzbuzz20xx's user avatar
0 votes
0 answers
80 views

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 ...
FrontEnd's user avatar
  • 1,789
0 votes
0 answers
101 views

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 ...
Job_September_2020's user avatar
0 votes
0 answers
108 views

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 ...
hoangphatmonter's user avatar
2 votes
1 answer
163 views

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 ...
Taylor Goeman's user avatar
0 votes
3 answers
146 views

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 ...
Grinding For Reputation's user avatar
0 votes
0 answers
167 views

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 ...
Echoleta's user avatar
  • 143
0 votes
0 answers
51 views

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 ...
Echoleta's user avatar
  • 143
0 votes
0 answers
171 views

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 ...
Cato's user avatar
  • 103
3 votes
5 answers
3k views

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),...
Qwert Yuiop's user avatar
0 votes
1 answer
85 views

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 ...
Noah Williams's user avatar
0 votes
0 answers
104 views

Say I have a canonized struct: { health: 100, items: ["apple", "knife"], name: "Bobby" } "Canonized" here means ...
Ibrahim's user avatar
  • 196
0 votes
0 answers
53 views

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 ...
Toki.u. Doki's user avatar
0 votes
1 answer
2k views

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 ...
pi squared's user avatar
0 votes
1 answer
239 views

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 ...
Daniel123455's user avatar
0 votes
0 answers
437 views

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/...
Miguel Myers's user avatar
17 votes
3 answers
6k views

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 ...
curiousguy_08's user avatar
0 votes
1 answer
138 views

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 ...
hmmmm's user avatar
  • 1
1 vote
0 answers
170 views

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-...
Tim's user avatar
  • 11
0 votes
1 answer
446 views

(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 ...
JensB's user avatar
  • 157
1 vote
0 answers
54 views

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 ...
noodle_run's user avatar
0 votes
1 answer
45 views

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 ...
Enceladus's user avatar

1
2 3 4 5
26