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
0
votes
0answers
15 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
19 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
84 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
25 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
38 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
32 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
43 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
198 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
48 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
107 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
26 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
108 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
38 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
91 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
76 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
87 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
140 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
123 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
128 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
278 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
47 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
521 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 ...
2
votes
0answers
112 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
724 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
743 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 ...
2
votes
0answers
143 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
50 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
124 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
451 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
62 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
133 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
745 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
120 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 ...
0
votes
2answers
124 views

Code optimization

I'm making Space shooter game in Unity, in which I want to place boss. I have script in which I wrote how boss should move and it works but... I know i can do better. Any ideas how can I improve that ...
9
votes
3answers
2k views

How to reduce the time taken to path-find to an unreachable location? [duplicate]

I have a 2048x2048 map and if I path-find to an unreachable location, it makes the pathfinder go through every node on the map which freezes the thread for 4 seconds. How can I reduce that time? I'm ...
1
vote
0answers
33 views

string[] preallocation to prevent using ToString() and save memory

I have some levels, with enemy waves and two Text components for: Enemies killed, like: "13/57" Waves passed, like: "68" On each enemy kill/new wave, I make a <...
2
votes
0answers
129 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 ...
1
vote
1answer
475 views

How can I improve my rendering performance in Java?

How can I improve the performance of my rendering? Currently, I'm rendering with java.awt.Graphics, but it seems to be starting to slow down since I'm adding new stuff to render. My rendering setup: ...
1
vote
1answer
42 views

Unity: Render only select objects but show previously rendered objects

I am making an RTS game which is having performance issues. Is it possible to render the ground and units separately so I can only render the ground when the camera moves but keep the result ...
1
vote
1answer
53 views

How to optimize two-pass operations on an array with Unity Coroutines

I am working on simulating vacuum decompression in a 2D top down environment. I have 2 2-dimensional arrays: one that stores the pressure at a location, and one that stores the vector of fluid flow. ...
2
votes
0answers
158 views

Optimal solution to render sprites with transparent edges in Unity

Since I'm currently developing a 2D game for mobiles, overdraw and drawcall count is my first priority in the design of the application I've thought initially to split each sprite in two parts: one ...
8
votes
1answer
544 views

How can City-sim simulate hundreds of characters?

My games usually start lagging quite easily when there are a couple hundred of boxes representing possible characters. While games like SimCity or even Anno have hundreds of characters. I realized ...
0
votes
1answer
82 views

Unity frame-rate drops / stall

I have an issue where my game suddenly stops for a second and then continues. And I think it has something to do with my performance so I took at look at the profiler: I tried to take a screenshot as ...
1
vote
1answer
578 views

Efficient Rendering for multiple light sources

I'm building a 3D rendering engine using C++ and OpenGL. Right now, I've added support for multiple light sources in my GLSL shaders, but I've hit a bit of a bump for my rendering methods. I'm ...
1
vote
1answer
91 views

Reasonable amount of garbage collection for mobiles games?

I'm making a 2D game for mobile and I noticed that my GC seemed to spike during attack. My normal GC is 40b but during attack it could spike to 2.2kb. I think this is really high specially when I saw ...
-1
votes
1answer
142 views

Game is very slow. How to run it fast? [closed]

I'm developing Android 2D game by extending SurfaceView. This is my first game on Android, so I'm not very knowledgeable. I have taken care to optimise the code, ...
2
votes
0answers
97 views

android unity game optimisation

I'm finishing my game, i'm in the stage of optimisation, i tried multithreaded rendering and dynamic batching, with OpenGLES3.. i get a little bit increase , but now i'm getting function Clear take ...