As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [performance]

The quality, efficiency, and speed of running gameplay as a result of several factors in the design and structure of the game and its architecture.

Filter by
Sorted by
Tagged with
4 votes
2 answers
2k views

Performance problems with quadtree for dynamic objects

I´ve implemented a quadtree spatial partitioning to my game engine as I wanted to try it and see how it affects the performance checks. The results were great (instead of hundreds collision checks ...
Pins's user avatar
  • 549
1 vote
1 answer
139 views

Scalability/Performance of physics-based character animation

I am asking this question because I am currently at the point where I have to think about how the characters in the game that I am making will be animated and I want to check if my desired approach ...
stimulate's user avatar
  • 145
27 votes
3 answers
8k views

How to handle a large number of pickups in a MMO game

How do games like Minecraft, or really any MMO game that has pickups, handle them? Say terrain spawns 3 pickup drops of "dirt" everytime you dig said terrain. Say every item has a rotation ...
Alakanu's user avatar
  • 705
2 votes
2 answers
776 views

ECS: is it beneficial to manage the data organisation of components before updating a system?

When I process a bunch of component data, I'd like that data to be sorted in such a way that I can iterate through the component buffers linearly. For instance when I want to update the physics system,...
PhilipMR's user avatar
0 votes
1 answer
672 views

GLfloat vs GLfixed vs GLint performance in 2017

Some people claim that floats should be used for rendering vertices in modern graphics cards, because graphics cards are optimized for floating-point arithmetic and therefore, integer calculations are ...
Cpp plus 1's user avatar
4 votes
1 answer
4k views

FPS drops when I maximize the game tab in Unity Editor

I have a simple unity scene with some primitive objects like cubes and spheres. Most of the objects are static and I made backed GI for lighting, The light is a point light. I also used unity post-...
Emad's user avatar
  • 1,126
1 vote
1 answer
463 views

Best practice for 4x game management in Unity? [closed]

I'm trying my hand at creating a turn-based 4x game in Unity, with a galaxy map and 2D hexagon grid maps for each individual planet. The planet grid hexes would be gameobjects, with the overall grid ...
Alex's user avatar
  • 113
8 votes
2 answers
8k views

Why is the for loop more efficient than the for each loop in Unity?

During a Unity talk about performance, the guy told us to avoid for each loop to increase performance and use the normal for loop instead. What's the difference ...
Emad's user avatar
  • 1,126
0 votes
1 answer
165 views

Using 10 materials for one Model? [duplicate]

I made more than 10 robots. all of them had not less than 4 materials, and some had 12 materials. I can't go back and fix this. How this will effect on the game performance later ?
user43474's user avatar
  • 537
0 votes
1 answer
488 views

How to efficiently implement Dijkstra's path finding algorithm?

As per this answer: How to devise an algorithm for a person being on a walk? I tried to implement a simple path finding algorithm. The map is 60x60 tiles total, and walkable tiles are even fewer: (...
gaazkam's user avatar
  • 867
0 votes
1 answer
4k views

Unity Performance: How many Materials per Object?

I have learned that a Mesh with 4 Materials each 1024x1024 in Size is somewhat slower than a Mesh with 1 Material 2048x2048 in Size? In my usual workflow I tend to seperate different Materials into ...
AzulShiva's user avatar
  • 629
44 votes
6 answers
8k views

When is the best time to consider performance?

I am coming from software development background. During the software development cycle, we usually focus on functionalities and the working product. At the end of development, we start optimizing ...
Emad's user avatar
  • 1,126
0 votes
0 answers
23 views

Fast selection of visible child components

I'm working on gui and I have next realization of base UI component: So when I want to get absolute component position I need to sum all parent positions with component position. Also if I want ...
ShchAlexander's user avatar
1 vote
1 answer
229 views

Should I switch to a game development library?

I'm making an RPG-like 2D game from scratch with Java. By now I'm in a pretty advanced stage with my game, but I encountered a problem- my game using too much CPU. I know it's because my game loop ...
TNT6's user avatar
  • 21
0 votes
0 answers
1k views

OpenGL Slow rendering of half a million points on Windows

How can I speed up the drawing of my points in OpenGL on Windows? I have an Qt 5.9.1 app that shows real time Lidar data, so at a certain frequency I add points to my buffer (which I've overloaded to ...
Matt's user avatar
  • 155
1 vote
0 answers
461 views

How to efficiently batch blocks and reduce drawcalls in a voxel-like game

To fully get the benefits of GPU instancing in Unity in a voxel-like game I'm trying to batch as many static blocks as possible (the terrain won't be destructible, and I can't set these blocks to '...
guest01's user avatar
  • 11
1 vote
2 answers
7k views

How to efficiently spawn / instantiate a large amount of objects from a prefab

I am trying to make a game where the whole world is consists of a very large amount of cubes (sort of a Minecraft / Trove clone), but I keep running into huge performance issues due to the large ...
natiiix's user avatar
  • 111
13 votes
3 answers
7k views

3D models budget. What matters more number of triangles or vertices

When I am making a model for a 3D game what should I take as a measure in my budget Polygons (triangles) or vertices? I have made an experiment with two sets 40000 cubes one with 8 vertices and 12 ...
Michał Leszczyński's user avatar
3 votes
0 answers
148 views

Camera concept in OpenFL

I'm starting a project using Haxe and OpenFL. I defined a big level in Flash, when I try to scroll the level in the game I have a really bad performance. I think that moving all the objects is ...
Matías González's user avatar
1 vote
2 answers
758 views

What would be theoretical the perfect texture size?

I am more a newbie considering game development but I am dealing very often with optimization of games for work and because I am interested in it. So as far as I know higher texture size need less ...
Lala_Ghost's user avatar
0 votes
1 answer
928 views

Unity Profiling - Mesh.Bake PhysX CollisionData Doubling CPU cycles

I have a mob that, when it dies, spawns smaller versions of itself. When this happens there's a huge resource spike. The profiler narrowed it down to baking the meshes of the new objects. I have a ...
Jesse Williams's user avatar
1 vote
0 answers
357 views

Will my huge sprites for a 2d game create performance issues?

I'm new to Unity, and have been confused about this issue for a while. Some people say that for 2D games you don't need to worry about performance (I'm making the game for PC, not mobile) while others ...
Armaan Sandhu's user avatar
1 vote
2 answers
573 views

Performance issue in a simple game loop

I have a problem with a simple game loop. As my rendering and iteration functions together take 10 ms, the time between update and swapBuffers measuers around 140 ms. What is causing this. Is there a ...
fredric's user avatar
  • 23
0 votes
2 answers
671 views

Unity performance: change sprite from array or sprite sheet animation?

Quite some time ago I made a "GIF player" that basically reads a sprite array and swaps the sprite using a Coroutine, one after the other, in order to imitate a "...
agiro's user avatar
  • 269
0 votes
1 answer
2k views

GLSL shader performance reduced by loop?

I hav a fragment shader like this: ...
mrdlink's user avatar
  • 323
1 vote
2 answers
705 views

Why does my Unity/Android game get a small amount of lag when not being touched for some time?

I have made a 3d version of space invaders. I made all the assets myself in Blender. I feel that it's a very basic game and my Galaxy Note 3 test device should handle it no problem. (Although it's a ...
Big T Larrity's user avatar
5 votes
1 answer
4k views

How can I draw 500 million triangles with OpenGL?

I am a beginner. I have a problem with my frame rate. I am trying to see my GPUs maximum performance with using VBO. I saw that everybody says a GPU can draw 1 billion triangles (so 3 billion vertices)...
Emre Kaya's user avatar
  • 525
3 votes
0 answers
1k views

How many polygons count are reasonable for an Android mobile game ? [closed]

I'm trying to develop a mobile game but I'm facing issue regarding FPS. So my question is: 2016/2017 smartphone hardware, how many polygon counts are reasonable ? Thanks
stighy's user avatar
  • 867
1 vote
1 answer
857 views

Unity engine memory usage issue - taking up more than it should

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by ...
agiro's user avatar
  • 269
2 votes
2 answers
5k views

Alternatives to raycasts in unity?

I have an ai car script. The car needs to be able to slow down and or stop if it gets too close to another car. Right now I'm using 3 raycasts like so: ...
mr-matt's user avatar
  • 2,739
2 votes
1 answer
6k views

What is a faster alternative to a GetComponent from a RaycastHit?

I have a basic AI car script which needs to interact with other cars around it. I would like to access variables from the other cars to help one car identify what the other cars are doing so they can ...
mr-matt's user avatar
  • 2,739
3 votes
1 answer
4k views

Does pixels per unit property affect performance of the game in Unity?

The Sprite import inspector has a Pixels Per Unit setting that controls the size of the sprite objects when they're added to the scene: Will Unity resize the sprite at run time or will it be resized ...
Yaroslav's user avatar
  • 771
93 votes
3 answers
15k views

How can I clean up excessive player-created rubble?

In my latest game I'm making, you can slice a 2D object arbitrarily, demonstrated in this gif: You can continuously cut it into hundreds or thousands of pieces. This doesn't create a lot of lag, ...
Ducktor's user avatar
  • 1,030
8 votes
2 answers
3k views

Dynamic frame rate in Unity

I'm developing a 3D visualization tool based on Unity, targeting WebGL. The user rarely interacts with the 3D scene and when he does it's only about adjusting the camera like rotating or zooming the ...
qCring's user avatar
  • 620
0 votes
0 answers
53 views

Determining whether a large building should be split into multiple scenes

This is about designing a first person retro game in Unity3d. In this game the player would walk around inside a large maze-like building that has corridors on 10-15 different floors. Each floor has ...
SherlockEinstein's user avatar
174 votes
10 answers
35k views

Why is it so bad to optimize too early?

After looking into optimization a bit, I have discovered (literally everywhere) that it seems to be a universally recognized sin to optimize a game too early. I really don't understand this, would it ...
mr-matt's user avatar
  • 2,739
5 votes
2 answers
2k views

OpenGL 4 several glUseProgram overhead

I'm developing a little 2D game using OpenGL 4.x and I've also coded a very simple light system which does not take care of shadows. The main concept behind this light system is the frambuffer ...
Andrew's user avatar
  • 111
1 vote
0 answers
850 views

GPU instancing vs combining meshes for performance

I have a relatively low poly procedurally generated scene in which I reuse a bunch of the same objects (walls, floors, etc). I've been writing some code to combine a room's floor tiles into one mesh, ...
papathor's user avatar
8 votes
2 answers
622 views

Efficiently updating building effect radius coverage

I've already searched for answers but I was not able to figure out the best approach for handling expensive functions/calculations. In my current game (a 2d tile-based city building) the user is able ...
Yheeky's user avatar
  • 305
0 votes
0 answers
2k views

Unity - strange performance impact with moving objects

I'm trying to find the solution for 46 hours now and I'd be really happy if someone knows it! I'm using a DOTween library for moving the objects. I also use ...
Jacob's user avatar
  • 2,522
0 votes
1 answer
607 views

GraphicRaycaster performance OnClick

Let's say I have two Canvases: BackgroundCanvas and UICanvas. Now, on BackgroundCanvas I ...
Jacob's user avatar
  • 2,522
5 votes
1 answer
123 views

What takes up more processing power between whole character models or models that are pieced together in Unity?

In terms of performance when it comes to animation what takes up more processing power: Whole character models or models that are pieced together? (1 object vs multiple objects). I also wonder if ...
user100614's user avatar
-1 votes
2 answers
218 views

How do I check the performance of my apk?

I have developed an app with Unity 5.2 for the Android platform. The app is running perfectly, but it's loading time is about 7 to 10 seconds, at least, on my Samsung S5. The first scene that takes ...
Muhammad Faizan Khan's user avatar
1 vote
1 answer
5k views

Unity, choosing a mobile shader

I have multiple 3d objects in my scenes. These are without any graphics and have different colors and some lights. I was building all of the scenes with a standard shader and now, when running on an ...
Jacob's user avatar
  • 2,522
1 vote
1 answer
290 views

Minecraft: What is the reasonable face/vertex limit for custom models?

When adding custom models to function as tile entity representations, what is a reasonable ceiling - based on performance - to maintain for individual models? Assume that the player will have the ...
Weckar E.'s user avatar
  • 812
1 vote
0 answers
599 views

SDL C++ Flood Fill Performance

I'm using SDL and I need to quickly fill a lot of polygons (fake 3D walls, made linking calculated points with the SDL_RenderDrawLine() function, that I need to ...
Fiorenzo Fiorenzi's user avatar
3 votes
0 answers
93 views

Automated performance testing

I'm wondering if there's anyway of automatically testing the performance of my game on multiple configurations because I know a game runs well on my computer but how do I know how well my game ...
Yatoniea's user avatar
  • 161
3 votes
3 answers
3k views

Would I need to develop a multi-threaded game or will a single thread suffice?

So I've been playing around and developing in C++ for a couple years now and have built a very simple C++ game engine for learning purposes. I now want to try and develop a simple 2d, stick figure ...
Jason's user avatar
  • 413
3 votes
1 answer
790 views

Unity, grass chunk or dynamic batching

In theory would it be faster to render a lot of grass patches that would dynamicly batch or big meshes of combined patches, too big for batching? Rendering chunks should be faster because unity doesn'...
Werem's user avatar
  • 148
6 votes
2 answers
970 views

Polymorphism vs cache-friendliness

How can we combine inheritance-based polymorphism with spatial cache friendly data structures? In a simple game engine we usually have some base Entity class which is inherited from to implement the ...
Anonymous Entity's user avatar

1
3 4
5
6 7
15