Questions tagged [optimization]

The process of modifying software to make some part of it work more efficiently or use fewer resources. Generally, this means it executes more rapidly, or will require fewer resources.

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
0answers
20 views

Removing detail in terrain grid where it's not needed

Let's say I have a terrain system which uses a brute force approach to rendering; a typical regularly spaced grid which covers the whole area, and there's no level of detail system. One possible ...
2
votes
1answer
96 views

How to calculate a perfect Super Mario speedrun?

I've dedicated my time to Super Mario lately, so eventually I ended up watching some speedruns. I thought to myself, how could one calculate the perfect set of minimal in-game movement? I considered ...
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 ...
1
vote
1answer
69 views

Optimizing spawning 500 objects every 3 seconds

Using Object Pooling, assuming I'll like to spawn 500 cubes once every three seconds. How do I make it performance friendly? I need ideas, not the code itself.
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 ...
0
votes
1answer
81 views

Dealing damage over multiple frames without damaging the same enemy twice

I am using Physics.Overlap to find which enemies are in my damage range. But dealing damage in only one frame is not what I want. Some attacks should be active for ...
1
vote
1answer
102 views

To split or not to split large 3D objects?

I have a fairly simple question for which I'm seeking guidance: Should large 3D objects be splitted into smaller ones? By wide, I mean an object that would be as wide as a game level is, below is ...
3
votes
1answer
134 views

Quadtree for AABB collision boxes

I have a whole bunch of entities constantly being processed and testing for collisions. I've tried to optimize this by stopping certain entity types from checking each other, dead entities not being ...
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. ...
0
votes
0answers
38 views

What are the pros and cons of using larger tiles in a 2d game with freely placed entities?

I am working on a 2d game with the Godot Engine and I'm about to start drawing the tiles for the ground tileset. These will be used solely for the purpose of painting the ground because the trees, ...
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
0answers
29 views

Text Pooling Optimizations

In my game I have created popup text for gained points when enemies are killed. it pops up wherever the enemy was and will say something like "+32" float up a bit and fade away at the same time. ...
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 ...
0
votes
0answers
31 views

Optimizing large number of ModelRenderable cubes with ARCore?

I am creating an ARCore Android app that involves rendering up to thousands of cubes, of course using a Node and ModelRenderable object for each. Understandably, I'm unable to do that without running ...
0
votes
0answers
22 views

How can I reduce memory use when implementing an animation in UE4?

We've already made a tank's track spline animation but it's using a lot of memory because it's implemented inside a tick function. So, it needs to check every second but as you may know it requires a ...
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
88 views

How to make effective permament rubble in a voxel game made in Unity3D?

I'm working on a semi-voxel game, and I already optimized the voxel structures' meshes by combining and chunking them. When I destroy a voxel, I spawn a low poly voxel fragment, with a rigidbody and ...
0
votes
1answer
122 views

Using Burst Compile attribute on methods

Can we use BurstCompile attribute without using any Jobs or ECS System in Unity? does adding [BurstCompile] attribute before ...
2
votes
1answer
57 views

On changing a voxel, don't recombine everything again, only modify the changed parts?

I'm working on a voxel based game, where destructible structures are made out of cubes. (Some of them has 3000 voxels) I solved the framerate issues by combining them, but after making it able to ...
0
votes
0answers
50 views

Remove nested if statements

I have been learning a new method of programming. I have been programming many years and am recently finding out there is a better method in general via abstract classes. My question is how to ...
2
votes
2answers
416 views

Most efficient way to get the closest point to a 3d rectangle

I have a 3D rectangle, with 4 points (x,y,z) And I have a player, who can be anywere (inside the rectangle, outside, not even in the plane, in the corner...). I would like to get the closest point in ...
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
118 views

Unity using 40% GPU for just a UI interface on ultra but 90 on low?

So I made some software using unity for my FRC team. All this application is, is just a User Interface with labels, input fields, buttons, etc... When I choose the quality to be on Ultra, I will get ...
1
vote
0answers
29 views

Optimization of linear solving for small matrices (10x10)

How to optimize the hell out of linear system solving for small matrices (10x10)? This would be used in an AR engine for a few games, but has to be done very fast. This solver is to be executed in ...
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 ...
0
votes
1answer
41 views

Simplify Matrix math code- Sun billboarding

If was trying to set the correct position of my sun billboard in my 3d game. I tried long until it worked correctly, but I wonder why this code must be so complicated: ...
1
vote
1answer
93 views

Avoid useless copies of buffers

The other day I was looking at a opensource engine, basically it was uploading the image from a file to a RAM buffer adding some decoding while streaming (I assume this is done "in-cache" so I can't ...
0
votes
0answers
183 views

Greedy Meshing : Slow to rebuild when updating chunk

I've a problem with my voxel based game. The game is sliced into chunks (Like Minecraft), each chunk is 16x256x16 blocks. When I started the project, I used a basic culling system when hidden blocks ...
1
vote
1answer
91 views

GPU (render time) increase if screen size increase

i create a simple 2d scene in unity 2017.3.1f1 I changed the size (height and width) in the Game View and proflie to see how it affects the rendering.. (below photo) I saw that the rendering time ...
0
votes
1answer
261 views

low FPS when battery is low ( unity android )

i make a simple 2d scene in unity 2017.3.1f1 (only 5 sprite renderer). I realized that when my Android device's battery is under 20 %, the frame rate will be 60 to 30. I did all the optimizations I ...
0
votes
1answer
163 views

Most efficient way to remove a Rectangle ? Monogame/XNA

I have a project in which I'm trying to remove the "collision box" (Rectangle class) of one of my enemy. My game logic basically is: ...
0
votes
1answer
171 views

OpenGL scene performance optimization

I am writing my 3D engine for Linux, and I ran into a performance problem. What was included at the time of testing: Bloom DOF (Depth Of Field) Soft shadows Point light source 1k, 2k textures (...
1
vote
1answer
372 views

Unity - SpriteAtlas memory consumption

I'm in the process of optimizing my application memory consumption. To do so, I'm using Unity profiler while connecting to an Android device, which runs a development build of the application. The ...
0
votes
1answer
51 views

Logic at a low framerate with interpolated rendering at higher framerate

It takes too much processing power to do game logic on every rendered frame (60fps), so what if I made my game save frames? It would actually calculate important stuff 20 times a second, and the ...
5
votes
1answer
854 views

How do I reduce overdraw in a forest scene with lots of foliage?

Unity comes with an overdraw view that looks something like this: We've probably all seen it, and have probably been advised to check for overdraw. How do you go about actually doing anything about ...
3
votes
0answers
122 views

Are GPU drivers hand optimized for specific games using low-level APIs?

The GPU drivers often have slightly different behavior depending on game or program, which is using them. It optimizes performance, bypasses bugs and improves overall experience in popular games, ...
0
votes
3answers
900 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
0answers
919 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 ...
3
votes
0answers
175 views

Pre-Hash Input Strings in Unity

So with the new Animator system, Unity has smartly allowed us to pre-hash the strings for looking up variables within the Animator state machine, using the Animator.StringToHash static method. This ...
0
votes
1answer
42 views

Optimizing expensive calculation for calculating touch of side of cube

I have this code: ...
0
votes
0answers
27 views

Unity, Replace or modify camera with own script

I am making an RTS game which has a slowdown when many units are on screen at once. I have a plan to write my own camera script to speed this up. Since I have an efficient way to find where units are ...
0
votes
2answers
52 views

Most effective way to perform dynamic list of actions?

I have a huge list of predefined game objects with different actions they do. What is the best (in terms of code simplicity and runtime performance) way to store, dynamically refresh and execute their ...
0
votes
1answer
145 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
2answers
599 views

Using std::threads to optimize drawing

I'm currently developing a 3D game with its own engine. I have some performance issues in the function that orders all the draw events and sends them to the GPU. I've heard about threads, and I ...
0
votes
0answers
73 views

Optimization for end-to-end multiplayer pong-like game

I've developing a small pong-like game for educational purposes and I've reached the point where I'm looking at implementing network gameplay. The idea is that a player can either wait for someone to ...
0
votes
2answers
135 views

Optimize polygons renderization

I'm developing a game (in Ogre3D) that, in short, consist in a vehicle that moves along a terrain and leaves a colored trail behind it. The trails are basically quads (a), these quads changes their ...
2
votes
2answers
928 views

Objects' coordinates and scale adjustment according to different devices resolution and aspect ration in Unity

E.g I have a bunch of objects which are generated in specific coordinates. Let's say in a range of - 5 to + 5 on X axis. I came app with these numbers because of camera size I have in Unity editor. ...
1
vote
1answer
123 views

How to balance GPU compute usage against render usage?

The GPU's primary purpose, obviously, is to render the scene. However, if we use compute capabilities on the very same GPU, how do we partitition and control these calls such that they do not ...