Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
27 views

Overdrawn pixels vs many polygons, which affects performance the most?

I know that having overdrawn pixels is not desirable as well as having many polygons since they can decrease performance. Often when I model I have an option to decrease the number of polygons by ...
0
votes
1answer
31 views

Performance of delta force-esque voxel terrain

I've been reading about voxel terrain lately and often see people asserting that it will absolutely kill performance. What I don't understand is how games like Delta Force managed to have smooth ...
0
votes
3answers
113 views

Unity: Is type casting every frame too expensive?

I have a state machine that controls my enemy AI. Each AI has a target which may be a Player, an obstacle, a shell, or even a Vector2 position. I'm trying to abstract my "target" member, and my ...
1
vote
2answers
27 views

How best to detect device performance capabilities and set quality setting accordingly when using Unity

I am developing a Mobile game for Android and iOS on Unity. Currently Im in the optimisation stage of development and trying to work out what is the best way to detect device capabilities, with the ...
0
votes
1answer
89 views

Too many objects to update in db too often

We are creating a RTS mobile game and we face some problem dealing with updating a lot of object in db too often. Our game is a RTS in which players can attack enemies cities an take them. The world ...
2
votes
1answer
62 views

How to lower the cost of realtime lights?

Besides Deferred rendering, what can I do to make realtime lights cheaper to render? I don't really need them but I could make good use of them in my game. BTW I thought Deferred render would give me ...
1
vote
0answers
43 views

Whats the least expensive way to play video in unity?

Alright, Ive asked this various ways but my situation is I have several (over 100) objects that have screens that need to play animated videos on them. There does not need to be sound, but this is for ...
0
votes
0answers
19 views

Easily get several materials from different objects onto 1 UV map/material?

Im trying to improve performance, and I found an asset called https://forum.unity.com/threads/one-batch-combine-hundreds-of-materials-into-one-draw-call.555643/ that claims to do what I need - which ...
2
votes
1answer
92 views

C# Improve performance when looping and comparing values on Dictionaries?

On my quest to creating 0 garbage when procedurally generating points I've stumbled upon a performance issue when comparing values to another values stored inside Dictionaries. Initially I used ...
0
votes
0answers
18 views

Is a simple PolygonCollider2D really worse than several BoxCollider2Ds?

In my scene I have very simple quadrilateral blocks, which I'm considering using PolygonCollider2D for. These blocks will be the building blocks of the scenery so ...
0
votes
0answers
20 views

Unity static meshes and performance?

Ok, I need help understanding this as Im experiencing severe fps drops with different variations of applying materials to meshes. What is the advance of making a mesh static, regarding how it affects ...
0
votes
1answer
35 views

Why is there a difference in frame rate between my fps calculation and Unity's calculation

So I wrote my own script for calculating framerate but it consistently comes out with a different value than Unitys idea of current framerate. This is my implementation ...
0
votes
1answer
25 views

Object pooling of different tpyes of agents (Mobile Game) in Unity

The mobile game I am developing consists of one to four players and different agents that are being spawned and act in their own way. All those Agents (Car, Animal and Powerup) derive from the same ...
0
votes
0answers
25 views

Using stopwatch to adjust Coroutines running period

I usually see in the code base that we use Stopwatche to adjust coroutines running period in each frame. Questions: ...
10
votes
2answers
3k views

Why does Unity use reflection to get the update method?

Why does Unity use reflection in order to access MonoBehaviour message methods like Awake, ...
0
votes
1answer
250 views

Have VSync on or off while do a game profiling

I'm trying to profile the game using Unity Profiler in order to catch any potential performance issues. The graphics settings support VSync feature. However, I am not sure which one is the best ...
0
votes
1answer
57 views

GLSL - Efficient Point inside Box Check

I'm attempting to improve the performance of a shader that changes the colour of a region of the world that is inside a "zone". I am using a deferred lighting system, so the colour and world-space ...
1
vote
1answer
89 views

Unexpectedly fast rotation after refactoring OpenGL code to add more abstraction

I've been working on an OpenGL program that simply renders a square that rotates in 3D space. The square also has a texture applied to both sides. Here you can see an example screenshot of the program ...
0
votes
1answer
28 views

How to get 60fps animation in terms of rounding/truncating position/alpha floats

I am wondering what gives the best animation performance running at 60fps with lots of objects. I have seen in a few places such as this that you should round or truncate your values so you don't get <...
1
vote
2answers
149 views

Event queue: tell or ask?

I'm working my way through a lot of game development resources, coming from a completely different field of software development, I'm interested in learning what patterns are frequently used in game ...
1
vote
2answers
108 views

Performance in pathfinding/road calculation

I have a question about the most effective way to detect road connection in a tile based world. Some time ago I already asked for "How to improve performance for expensive functions in 2d city builder"...
0
votes
1answer
137 views

Unity run-time creating material has performance impact?

Just found creating a material in a script for the first time would have performance impact. (Using Unity 5.6.5f) A very simple script for testing is to create a game object with MeshRenderer in ...
0
votes
1answer
39 views

Multiple image objects extracted from spritesheets or one-two object for all?

Let's say I want to make a 2D game and I'll use a spritesheet containing all of the animation frames and a texture-atlas for static sprites such as walls, non-animated decorations...etc. Should I ...
1
vote
1answer
171 views

Frustum culling with a single large object

I am helping to optimize performance in a mobile game. The artists who built a particular scene added a wall around the scene. The wall is a single mesh with 100k triangles. Because it goes around the ...
2
votes
1answer
144 views

Should LOD models be used in mobile games?

LOD models are widely used in PC and console games, to optimize performance by reducing the vertex count and texture size for distant objects. However, I'm having a harder time finding out if they are ...
0
votes
0answers
82 views

Cache friendliness of AABB-Tree: binary vs N>2

I found that state-of-the-art physics engines like Bullet and Box2D all use binary AABB-Tree for broad-phase collision detection. I wonder, did anybody tested AABB-tree with >2 branches per node ? ...
0
votes
1answer
65 views

Open world game state saving Android

As a hobby project I'm building a 2D game with a custom game engine in Android. Currently I can render a json map, and let the user interact with objects on the map. The game should be an open world ...
0
votes
3answers
488 views

How to optimize collisions

I'm building a 2D MORPG using JavaScript, Node JS and socket.io To prevent cheating, I have to run all collisions for all players on my server. I'm currently doing fairly simple square collisions ...
0
votes
1answer
107 views

Do i lose performance doing this

...
0
votes
0answers
15 views

Performance: Culling done right- farplane and other things

I have more and more "hipoly" characters in my scene now. One way to solve this "more or less beautiful" is making a farplane and adding some fog. But the performance still is quite bad. Isnt there ...
0
votes
0answers
549 views

Amplify Shader for mobile

I'm recently learning Amplify Shader to make shader more easily. It's visual shader editor for Unity that allows to create shader by connecting nodes. Right now I need a shader for Android project ...
1
vote
0answers
87 views

Performance problems with scrolling html5 canvas for large tile-based game

I try programming a splix.io clone as an electron app and do the visualization via the html5 canvas. The movement across the tiles should look fluent like the original, so I target 60 frames a second. ...
0
votes
3answers
114 views

What are the differences between random encounters and permanent mobile enemies?

Random Encounter: A player has a 10% chance to encounter an enemy. while moving through a 5x5 grid. Permanent Mobile Enemies: There is one enemy that constantly moves through the 5x5 grid and only ...
1
vote
1answer
120 views

Unity3d - Cast dynamic shadows without processing multiple lights

Back Story I've built a game with a friend and all goes well until there are too many spheres under a group of 5 lights, then things start getting choppy. Troubleshooting I've found that by turning ...
2
votes
1answer
98 views

Does abstraction influence performance?

Say I have a GameObject class that is being extended by all of the objects in the game that are moving around. (This class provides basic stuff like a sprite, draw ...
1
vote
0answers
241 views

ParticleSystem, performance behind the technique on batching with different materials

I found that guide: https://thinhhb.wordpress.com/2016/03/27/unity3d-optimization-make-atlas-textures-for-particlesystem-reduce-drawcall-why-not/ which is quite clever. As far as I know, we can't ...
1
vote
2answers
73 views

How do i retrieve individual Tile Information from a tilebased procedural World fast?

I am concerned about performance with my current setup; as I want to expand on it i need to figure out if I might need to change it. Current Setup: The Game/Prototype is similar to Dwarf Fortress or ...
2
votes
3answers
85 views

Are there recursive variants for trigonometric functions to potentially improve performance?

This is perhaps a better question for mathematics SE, however, this deals more with the performance side of gaming, and software in general. When I say recursive function, I mean recurrence relation. ...
0
votes
0answers
69 views

How to speed up Unity Simulation?

I am trying to collect some data from UNITY but it is taking forever. I increased the framerate to 5 which accelerated the simulation without compromising the output but still it's slow. I am ...
0
votes
1answer
106 views

UNITY - Huge amount of GRAPHICS in RTS Tiled game

after year of development and week of unsuccessful optimization I turn for a help from you, guys. So, my game is turn-based strategy with hexagon map. One hexagon consists of one texture for hexagon ...
0
votes
1answer
317 views

Why is creating my sprites so slow?

My 2D Unity game has tiles and layers. It creates one game object per tile, anywhere from 100 to 10,000. To create 3,000 game objects takes 68 msec, which is just fine. But setting up the sprite and ...
2
votes
1answer
76 views

Calculating the difference between two numbers using exponential growth

I think this is a very basic game programming question, but I am bad with math and new to programming & game programming so I'm looking for some advice. I'm making a 2D sprite game for iOS. Every ...
4
votes
2answers
946 views

Why do separate loops run faster than one loop that does multiple things?

My game had some lag, so I tried to improve the performance. I found that if I write my loops separately like this: ...
0
votes
1answer
366 views

How to render a large tile-based 2D world efficiently (using JavaFX/ScalaFX or more generally)

I have a file tileset.png containing a dozen 32*32 tiles. When my game starts, it generates the world randomly with the available tiles and the size of the world ...
1
vote
2answers
81 views

Unity: Hiding Game Objects vs Creating them

My game project involves collecting items that will be displayed in trophy cases of sorts. There could be several hundred objects as the scale of the project increases, each with their own position, ...
0
votes
0answers
91 views

LWJGL - OpenGL BufferStorage no performance boost at all

I tried to implement a persistent mapped buffer instead of using glBufferData and glBufferSubData. Everything works and is ...
0
votes
2answers
247 views

How to render many tiles fast if zoomed out? (Monogame/xna)

I'm currently trying to optimize my tile engine. I used monogame with the spritebatch first, but that doesn’t works well. I have read many articles how I could optimize my rendering code. I moved ...
2
votes
0answers
103 views

MeshMemory causing constant spikes

I have a ready-to-launch application, cleaning everything right now. I have these strange spikes on Mesh Memory. The best part of it is that this view below is ...
4
votes
1answer
283 views

Why does an emulator use more RAM than the original system?

Why does an emulator use more RAM than the original system? What are emulators doing that requires so much more power? For example, when using the PSP emulator PPSSPP I'm experiencing lag on a modern ...
0
votes
1answer
216 views

How to get time since frame start in Unity for loading purposes

I am building a big world (1000+ game objects). It takes 2s on the device. I am doing it in the background (the world is hidden until fully loaded). I have figured out that I can maintain the FPS of ...