Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
64 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
70 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 (...
0
votes
0answers
51 views

Moving 100 sprites on mobile

I'm trying to achieve a good 60 fps performance with 100 moving Sprites on mobile. Objects are moving from top of the screen to the bottom, similar to falling cookies in cookie clickers. Objects are ...
1
vote
1answer
45 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
41 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
129 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 ...
0
votes
0answers
10 views

Optimizing character controller Move() for Mobile Games

Is there any way for optimizing character controller Move() for first person shooter mobile game? Because I heard , using that is expensive for performance. For ...
0
votes
0answers
28 views

Create new Gameobject once if raycast hit in update

multiple copies of the same squares are being created at the same locations, how do i create new Gameoejcts once if raycast hit in upadate? View from the top Players Perspective ...
2
votes
0answers
104 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
290 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
286 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
1answer
71 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
41 views
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
48 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
84 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
189 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
49 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
128 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 ...
3
votes
2answers
553 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
116 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
119 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 ...
0
votes
0answers
126 views

Unity Mesh Optimization

I am making a Minecraft style game and I am looking for a good way to hide block faces that are underground or blocked. Thank you for any suggestions. Below is my code. ...
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
32 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
76 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
311 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: ...
0
votes
0answers
124 views

Unity Performance Value

Ok so i wanted to know how good/bad each of the general collision checks hinder performance. Let's take a reference, say Raycast has a performance value of 1.0 (higher = better performance) How ...
1
vote
1answer
41 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
0answers
152 views

How can I have static lightmap on a dynamic object in Unity 3D?

We have a level in which objects are completely generated at runtime, So we can’t bake any lights the ordinary way because objects are not available in the scene in build time. But our Light direction ...
1
vote
1answer
48 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
100 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 ...
7
votes
1answer
408 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
51 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
357 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
70 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
132 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, ...
3
votes
0answers
80 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 ...
0
votes
1answer
121 views

Calculating real time moment of inertia around arbitrary axis in 3d

I have a 3d rigid body consisting of multiple triangles forming a closed mesh. I know how to calculate the moment of inertia around an arbitrary axis by splitting up the mesh into simpler shapes and ...
0
votes
1answer
117 views

DirectX11 bind all textures at once?

If my game will use say 100mb of raw memory for textures, would it be a good idea to put all of them in srv array, bind once and leave it for the rest of the program so that I won't have to bind them ...
0
votes
2answers
142 views

Optimization of animation for large quantity of objects

I have run into a problem where I need to animate plenty of circles just scaling up and down. When I use animator, it needs 16ms per frame for 10000 circles. It drops fps significantly from 1000 to ...
0
votes
0answers
154 views

Asset imported from Magica-Voxel in unity is too big for the scene view

I am new to game development, I have created a game scene in MagicaVoxel (126 x 126 x 126 i.e full dimensions). So when I import it in unity (as an Object) the size of the asset is too big. So I ...
2
votes
0answers
62 views

compiler optimixation interfering with threaded function

I'm making a block game in c++ that stores voxels in a octree and because, at least in my implementation, editing the octree is slow, I'm generating the chunks of land in a separate thread. I manage ...
0
votes
0answers
180 views

Upgraded to Unity 2017.1.0f3 and Now Scenes Are Not Loading Properly?

I just purchased Unity Plus and it automatically upgraded me to version 2017.1.0f3. It is great so far except for one thing... It seems like the SceneManager is screwing up now! Sometimes it does not ...
1
vote
0answers
32 views

Unity inconsistent memory profiling when running same scene

I'm in the making of a 2D silhouette style game where I'm trying basically 2 setups: One where it consists only of sprites, One where it consists of a mix of sprites and meshes with NO texture. Now,...
1
vote
1answer
446 views

Unity engine memory usage issue - taking up more than it should

I'm making a 2D game that consists mostly of sprites. As a lot of them were too large in file size, I swapped them into meshes with unlit materials without textures. Now, The problem is that Unity by ...
0
votes
0answers
53 views

What is the most optimal way of choosing a value from an array, in HLSL?

I'm creating a HLSL DirectX 11 Uber Shader. The shader has a series of "generator" functions, where the Float outputs are mapped to Float4 components. The shader exposes which function is mapped to ...
2
votes
0answers
212 views

Add Rigidbody and MeshCollider at runtime : is it a bad practice?

Good day. To simulate an explosion of a vheicle, I decided to do this: When I need to explode veichle , at runtime, i add rigidibody for every single part of veichle (5-10 part: door, wheel, hood ...
0
votes
0answers
143 views

Instantiating identical objects marked as static never batches

I'm instantiating a lot of identical objects (well into the 1,000s) that share identical attributes save for their position as part of a visualization project. Even though I'm instantiating them all ...
0
votes
0answers
121 views

How can I optimize my OpenGL rendering?

I'm developing a render program with OpenTK (OpenGL wrapper) in C#. I'm practically finished, but now my program works a bit slow, framed. I already use VBO, and now I was thinking about implementing ...