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
1answer
109 views

Is it a bad idea to store all textures in linear color-space?

I am wondering about the performance behind color-space conversions for textures during reading. If a project decides to go with a linear workflow, as in, when doing any sort of color manipulation, ...
0
votes
1answer
47 views

How to implement toroidal mapping in SDL?

I am making an Asteroids clone in SDL2. I think the kind of world asteroids takes place in is called toroidal map. I'm refering to the fact that the edges of the world are connected so when you exit ...
0
votes
0answers
12 views

Do Unity bunch up similar materials automatically?

Imagine I have materialA and materialB. materialB is a direct copy of ...
22
votes
1answer
4k views

Optimization of rendering of cube world

I have a world made of many cubes (like in Minecraft), they have only color (not texture). I am rendering them using OpenGL 3.3 core profile (GLFW3, GLAD, GLM). I am already have done some ...
1
vote
1answer
50 views

How to choose what to use in Java: Enums or Objects?

I'm in a dilemma over using Enum Types or using class objects in that particular part of my java project. Let's suppose I have an array where I constantly add and remove things from it, but I also ...
0
votes
1answer
25 views

Unity Performance: Recycling Pooled Objects OR Re-Instantiating?

Re-using pre-instantiated objects in a pool. Destroying then re-instantiating objects in a pool. Both pools are limited. When creating loads of objects which is better for performance?
1
vote
2answers
90 views

Which is better practice in Unity? GetComponent<>() or making the variable public?

There are two main ways I am aware of to modify an attached component. Say, the component attached to an object is of type Animator and the name is ...
0
votes
1answer
40 views

Is it safe to save data OnApplicationFocus and OnApplicationPause on mobile?

Unity has messages called OnApplicationPause and OnApplicationFocus. They are called on each ...
0
votes
0answers
17 views

How do I calculate sprites/frame usage on my platform's ram?

I plan on building a 2d game for mobile and possibly pc. I also plan on using sprites/frames for the animation of my 2d game. What's stopping me from doing so is because I can't figure out if the ...
0
votes
0answers
49 views

Is it more performant to index in the vertex shader or fragment shader?

I have a shader that draws 2D quads from a texture atlas using instancing. I'd like to add a feature that allows me to map each of the RGBA channels in the texture using a 5x5 matrix. For example, the ...
0
votes
0answers
22 views

Correct placing of player distance logic

I'm going to leave behind the blueprints here as they do not contribute to the question. I can make enough abstraction to get to the point. Thank you reader. I've got a 2.5d level where each of my 2 ...
0
votes
1answer
26 views

Constraining ActorLocation X

My question is simple yet it's got me wondering..I'm trying to limit my character's ActorLocation's X movement by checking it each tick. If it's larger or smaller than my desired value I set it back ...
0
votes
0answers
59 views

Why don't games load assets while showing main menu?

Most single player computer games have rather frustrating pattern of loading: start game Game shows you some logo videos Game indicates it is loading (general assets are loading, that are always used)...
1
vote
0answers
51 views

Is Loading Assets Before Game Start Necessary? [closed]

I am creating a relatively simple game engine that uses opengl. Do I need to create a system that loads all the 3d models / textures from files before the game starts, or is loading them during ...
0
votes
0answers
14 views

Unity - paiting terrain details vs combining a large mesh

I am about to start making my landscape, and am using a low poly style. I think I'd prefer not to use the terrain system and instead just use a bunch of meshes, since all my grass/flowers are 3d ...
0
votes
0answers
102 views

C++ SFML Performance

I have recently started a project using SFML in C++. So far I haven't done much but I noticed an issue. Inside of the while(window.is_open()) loop I made a tick ...
1
vote
2answers
34 views

How to get chunks in a sphere rather than cuboid

I have a chunk system to load stars around the player. It takes a given "real" loading range (aka Unity-units of range), calculates the necessary chunk loading range (as integer), creates star ...
0
votes
1answer
97 views

Server-side “Fog of War”

I am working on my custom server for my online game and I was wondering if there is any way to accomplish this in a more performant way. Basically I will be spawning and despawning objects (such as ...
0
votes
0answers
35 views

Which communication should I use between server and client

For a school project I am creating a multiplayer game for the smartphone. I want the "GUI" to be a flutter application to cover IOS and Android. As backend I use Golang. Now I wanted to ask, what ...
1
vote
1answer
89 views

Resolving contradictions in WFC more efficiently than naive backtracking

I just recently got started with the Wave-function-collapse Algorithm (WFC) in 3-dimensional space. I got the fundamentals working and wanted to now move on to let the algorithm automatically resolve ...
1
vote
2answers
184 views

How to identify performance issues with large numbers of mods?

My current problem is with RimWorld, but in the past I had the same issue with Minecraft. Basically the game gets more fun with more mods, up until the point where performance becomes unmanageable. ...
0
votes
1answer
70 views

How can I keep track of which “rooms” characters and NPCs are in?

I have a Unity 2D project which has a player character and numerous NPCs all potentially moving (top-down) at the same time during play. The number of NPCs is not to exceed 100 (and will be, probably, ...
0
votes
1answer
139 views

When to destroy Google AdMob InterstitialAd object?

There are a few answers on this question but they don't give a satisfactory answer. I am using a singleton AdManager class that persists throughout the game. I am not sure if I should destroy the ...
1
vote
3answers
285 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
159 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
191 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
45 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
49 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
68 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
54 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
140 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 ...
4
votes
2answers
188 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
391 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
78 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
73 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
222 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
29 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
61 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
90 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
258 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
103 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
199 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
130 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
73 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
57 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
229 views

Strange GLSL performance problems

I'm having weird performance problems with a GLSL shader I'm working on. This small example fragment shader: ...
1
vote
0answers
83 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
262 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 ...

1
2 3 4 5
14