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
118 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
1answer
569 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 ...
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 (...
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 ...
2
votes
4answers
5k views

Fastest way to get all adjacent tiles?

What is the fastest way to get all adjacent tiles in a two-dimensional array of tiles, converted into a single-dimensional array? If you don't know the answer, then the fastest way to do it in a two-...
1
vote
1answer
138 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 ...
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
31 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 <...
2
votes
1answer
147 views

Should I store ads in the background or recreate them every time I need them?

I am developing an XNA game for Windows Phone 7 and 8. The game is level-based. After finishing each level a screen comes up with a bit of stats summary. I wish to embed an ad in this screen, on which ...
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
125 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 ...
7
votes
3answers
793 views

Why do prefabs speed up loading?

I have a scene with a massive terrain. It took a long time to load (approximately 60 seconds) when I pressed play. I am in the editor. I prefabbed it. Now it only took about 5 seconds to load when ...
2
votes
1answer
116 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
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
3answers
4k views

Websocket server thread per connection

I'm creating an html5 multiplayer game and am looking at how to create a websocket server. I've been looking at various libraries and one thing I noticed is that each one will create a new thread for ...
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 ...
7
votes
2answers
4k views

How do collision meshes work in games like Zelda on the N64?

I was recently reading about the technology of Ocarina of Time/Majoras Mask and discovered that world collision is done using a single triangle mesh (vertices, normals, etc) for an entire area. There ...
1
vote
3answers
107 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 ...
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: ...
0
votes
2answers
396 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 ...
3
votes
3answers
183 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 ...
2
votes
2answers
644 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 ...
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 ...
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 ...
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 ...
-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 ...
12
votes
3answers
3k 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 ...
0
votes
1answer
59 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
85 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 ...
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
77 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 ...
7
votes
1answer
3k views

How to profile CPU and GPU performance if I have a monster PC?

I'm going to upgrade my PC soon. I'm worried that I will no longer spot performance losses in my game because of the better specs. I can check memory usage easily, but how do I check and debug CPU ...
15
votes
1answer
1k views

Is * calling *= (or *= calling *) slower than writing seperate functions (for math library)? [closed]

I have some vector classes where the arithmetic functions looks like this: ...
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
159 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
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
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
3answers
295 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
435 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
69 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 ...
5
votes
6answers
11k views

Gfx.WaitForPresent performance issue

I am making a 2D mobile game and it runs really well (60 fps) on my phone. However, in some cases the performance goes down drastically to the point where it runs at 20 fps or even less. It happens at ...