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
1
vote
3answers
111 views

Is there a difference between using one large mesh with 100k polygons and using 1000 meshes with 100 polygons each?

I'm planning on creating a first-person shooter for mobile. Now I know that fps games usually have a lot of meshes in the scene (trees, buildings, terrains, etc.). So I've been looking at a lot of ...
0
votes
2answers
76 views

Can I use the 2d physics engine in a 3d game (or viceversa) in Unity?

This is entirely for performance. The 2D physics are less expensive, but I require 3D for some scenes. I never need both at the same time. I know you can have 2D with an orthographic perspective in a ...
0
votes
0answers
28 views

Unity Light Baking for Best Balance between Performance and Visuals

I'm trying to optimize my Unity game. I have static objects, dynamic objects and (only) static lights. I wish to fully pre-compute lighting and shadows for the static objects while still ...
0
votes
0answers
30 views

Optimizing texture fetches with higher mip levels

Let's say I have some shader program in DirectX or OpenGL rendering a full screen quad. And in a pixel/fragment shader I sample some huge textures at random texture coordinates. That is one same ...
0
votes
0answers
41 views

How Lots of ComputeBuffers at Once Affect Performance Unity

How will lots ComputeBuffer instances affect performance? And why? I know that I should call ComputeBuffer.Release() on every <...
0
votes
0answers
34 views

Occasional lag-spikes in performance in heavily optimized game (profiler screenshots included)

So I've been working on a mobile-based platformer for a few years now. I've spent more than a year optimizing the game for mobile as much as I could. Almost every single one of my meshes are using ...
1
vote
0answers
51 views

Most efficient way to recalculate enemy A* path on the fly?

I'm working on implementing a more robust pathfinding algorithm for the enemies in my top-down shooter game, and I have the A* algorithm working, but now I need to decide when to calculate the path. ...
1
vote
1answer
137 views

How does my GPU know what game is running?

I am trying to understand how game ready drivers work. How does my gpu know what application i am running and which application to use a specific driver optimization. For example the new nvidia driver ...
3
votes
2answers
146 views

C++ Object management/deletion

I am working on a game with a lot of bullets, currently every second it loops through a vector of bullet objects and checks if its marked for erasure or not. ...
1
vote
1answer
122 views

How to make a smooth projectile in roblox?

I am trying to make a projectile (Energy ball) for my game. I am using body velocities, but the issue is is that it seems laggy. I shoot it then half a second through flight it seems to stop in mid ...
2
votes
1answer
55 views

Most optimal way to find closest object

So currently ive been using the physics.castSphere method with a small radius to find the closest of an object with a tag. However this is pretty performance heavy ...
0
votes
2answers
59 views

OpenGL ES model loader is slow?

I'm trying to load a 3D model in OpenGL ES, and I managed to find a project on "sourceForge" that can do this job. When I downloaded it and played the app, it took 50 second to load a small object (...
26
votes
7answers
8k views

Is the Microsoft recommendation to use C# properties applicable to game development?

I get that sometimes you need properties, like: public int[] Transitions { get; set; } or: ...
3
votes
3answers
182 views

Improve velocity obstacle calculation algorithm/performance

My goal My goal is to calculate the (velocity) obstacle that is imposed by unit B onto unit A. So I want to calculate the velocities from the center of unit A (circle) that will lead to a collision ...
0
votes
0answers
25 views

Is it efficient to use colliders on UI canvas in Unity?

Basically I have a task where the player will be able to drag an object (as UI Image), and place it inside a bag (another UI image). What's the best optimized way to do so? As I researched, I do not ...
21
votes
5answers
4k views

Improving an O(N^2) function (all entities iterating over all other entities)

A little bit of background, I'm coding an evolution game with a friend in C++, using ENTT for the entity system. Creatures walk around in a 2D map, eat greens or other creatures, reproduce and their ...
-2
votes
2answers
58 views

Is passing big objects in parameters not performant? [closed]

let's say that I have a big main class with a lot of variables, subclasses, etc... in it. Like "IngameScreen" What if this class is passed as a parameter very often for each frames ? For example ...
0
votes
1answer
56 views

frame rate drop in html5 game

i have Incorporated gravity mechanics and collision mechanics to my game. the game works fine for some period of time after that i am getting significant amount of frame rate drop.i am doing some ...
0
votes
1answer
83 views

Windows 10 GPU Engine Performance Counters - Phys / Eng Meaning

For performance tracing of intermittent degredation in performance I wanted to use the Performance Counters available in Windows 10 1809 under GPU Engine -> Utilization percentage. This particular ...
-1
votes
1answer
98 views

OpenGL performs very bad on laptop

I'm trying to write a game using C and OpenGL, I wrote some rendering code and camera, but the game is very laggy, framerate is so low (probably around 10-15fps), however, if I launch the game through ...
2
votes
1answer
109 views

Why is my openGL rendering faster when I time it with GL_TIME_ELAPSED

I have some code that was rendering too slowly, as in there was a noticeable lag in when updating the screen in response to user input. I tried profiling the CPU side code, but that did not seem to be ...
1
vote
0answers
76 views

Bullet Physics StepSimulation really slow when smaller TriangleMeshShape is inside bigger BoxShape

I observed that bullet physics StepSimulation is very very slow when a rigidbody with a TriangleMeshShape is fully inside a rigidbody with a simple BoxShape. I noticed that when I move the ...
0
votes
0answers
33 views

Low Res Atlas Texture vs. Many different materials without textures

So I have recently started to look into optimizing a medium complex 3D scene, more specifically i am looking to improve the performance i get from a fairly realistic bus. I am currently using the ...
0
votes
0answers
50 views

Using dom elements for game interaction - slow performance

I have a need for my html5 game (using melonjs) to allow users to click tile areas on the map. The idea is it will show a css styled hover area. The browser tested is chrome. I could do this natively ...
2
votes
1answer
115 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
0
votes
0answers
57 views

OpenGL Context creation takes over a second

I'm rewriting an old 3D editor with the goal to make it faster and easier to use. I noticed the following method takes over one second to run. It's called in the app's initialization on the main ...
1
vote
0answers
62 views

Junk movement with steady 60fps on Web canvas

I'm new to building games on canvas, and I'm trying to create one. But I encountered a problem with sprite movements. My sprites move is smooth, but sometimes it starts to "jump". FPS is stable 60 ...
1
vote
1answer
157 views

glReadPixels with GL_DEPTH_COMPONENT into PBO is slow

I need to read depth buffer back to cpu memory. It may be few frames old, so I use glReadPixels with a buffer bound to GL_PIXEL_PACK_BUFFER. I use several buffers and ping-pong them. Finally, I read ...
2
votes
4answers
1k views

High performance screenshots in LWRP

I'm trying to capture some screenshots for my game. They need to be saved as jpgs to a folder, latency is not an issue, I don't care if it happens over 10 seconds. My number one priority is to keep ...
0
votes
0answers
54 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
99 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
287 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 ...
0
votes
2answers
422 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
112 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 ...
1
vote
0answers
68 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
49 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
23 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
2answers
642 views

How can I 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
27 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
34 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
52 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
32 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 ...
11
votes
2answers
4k 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, ...
1
vote
1answer
1k 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
101 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
161 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
32 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
364 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
162 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
369 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 ...