We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1answer
577 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
45 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
59 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. ...
3
votes
0answers
180 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
597 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
94 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
651 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
96 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
145 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
104 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 ...
1
vote
1answer
191 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
356 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
157 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 ...
2
votes
0answers
65 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 ...
1
vote
0answers
35 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
626 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 ...
3
votes
0answers
322 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 ...
1
vote
2answers
492 views

Don't message systems slow down game engines?

I am wondering, aren´t messaging systems slowing the speed of engines down? I mean, lets say that I want to zoom in my camera, without messaging I would do something like: ...
167
votes
9answers
32k views

Why is it so bad to optimize too early?

After looking into optimization a bit, I have discovered (literally everywhere) that it seems to be a universally recognized sin to optimize a game too early. I really don't understand this, would it ...
1
vote
3answers
911 views

How to make a static Material reference?

I have a class Edge which may change to multiple colors - materials in this case. I need to switch a Material on ...
4
votes
2answers
729 views

OpenGL 4 several glUseProgram overhead

I'm developing a little 2D game using OpenGL 4.x and I've also coded a very simple light system which does not take care of shadows. The main concept behind this light system is the frambuffer ...
3
votes
2answers
286 views

Do game engines put all interpolation onto the GPU?

Is it considered standard to push all the vertices and an interpolation of the next position onto the GPU? Suppose a sector is moving up every game tick at 50 units per second. You could put on the ...
0
votes
1answer
122 views

Any Code Based Driver Optimizations for Far-Object Rendering?

Are there any video card driver optimizations available to developers to mitigate considerable framerate drops (%50+) which may be caused by Draw Distance defects in a game? For example, when using a ...
3
votes
0answers
434 views

Rendering hundreds of animated characters in Unity3D

I am currently doing some research in anticipation to the development of a game where there is going to be hundreds of secondary entities which will interact with the player and among themselves (...
1
vote
1answer
156 views

Managing draw calls for customized materials when targeting mobile

I want to know how to minimize draw calls when rendering multiple customized characters onscreen, presumably with 3-4 materials apiece. Is there a better way to achieve custom color configurations ...
0
votes
1answer
150 views

optimizing collision detection with stationary objects (walls, floors, obstacles, etc.)

For detecting collisions between sprites, I know a 2D spatial hash is a way to optimize the number of collision checks that need to happen. But is there a way to optimize even further for objects that ...
0
votes
1answer
521 views

Multiple textures/texture atlas

Is there any performance difference between using multiple textures and using texture atlas in splatmapping? I would want to use multiple ones beacouse tiling and changing them would be easier but ...
0
votes
1answer
75 views

How can I roll N dice in constant time and preserve a binomial distribution? [duplicate]

If I want to throw a 100d6, I have to: int sum=0; for(int i=0; i<100; i++) sum += Random.BetweenInclusive( 1, 6); But for high dice count it may be ...
0
votes
1answer
99 views

Processing Vs Memory Optimization

I'm creating a game with a lot of elements. Should I store all components that I'll eventually access on class variables (memory) or should I access them when running the script(processor)? Example: ...
1
vote
1answer
304 views

How to optimize a cubes made world game? [duplicate]

I'm making a cube-world-game like Minecraft. And to render it I've splitted it in 16x16x16 blocks regions (also known as chunks in mc) and then, on rendering, I take all the chunks in the rendering ...
-1
votes
1answer
394 views

How to update everything but 1 thing in pygame and python

What I'm doing So I'm developing a game for my Computer Science final with python & pygame. It's done other then I have to make a main menu. I've been developing it over the last 2 weeks because ...
3
votes
3answers
821 views

Cube world rendering optimizations

I'm making a Minecraft like game and I would like to apply some optimizations. Firstly I didn't and I rendered the world using a vbo in which I stored a cube model and I drow all blocks of the worlds ...
0
votes
0answers
590 views

Fade or Cutout Render Mode, least performance expensive?

I would like to optimize my WebGL Unity game, so I was wondering if I have a plane with a texture of say a mountain for background, what render mode for its material be least expensive? Fade or Cutout?...
3
votes
1answer
274 views

Optimised server structuration

I've been wondering a lot lately about how to make an optimised server structuration, and i came to the conclusion that i severely lack knowledge on the subject. I'll be doing this with either C, C++ ...
1
vote
0answers
1k views

Best way to reduce texture size and ensure a minimum quality

We've been working on this mobile game for about a year now, and we're very close to the end but we've started to face many problems. Mainly, our game crashes and has a huge size for a 2D game (on ...
1
vote
1answer
1k views

How costly is an OpenGL draw call, and how do I optimise them?

How costly is a draw call in OpenGL? What are the ways to reduce the number of draw calls? I have seen people using glMapBufferRange, but I can't figure out how it ...
0
votes
1answer
75 views

Spell and Terrain Interaction in Game

I am currently thinking about working on a small game where the player has to get rid of mob waves in an arena. The game is going to be 2D top-down. What I want from this game is the player to be ...
0
votes
1answer
164 views

How to adapt to using a graphics library in a game coded using Java's native graphics methods? [closed]

I've spent months coding a game that uses Java's native graphics methods to create a polygon-based 3D engine, and at this point it's about 12,000 lines long. However, the graphics performance is ...
2
votes
1answer
409 views

How should I arrange storage for components referenced in a quad tree?

I like the Unity's entity-component-system approach, I'm working on something similar. However I'm not sure where and how I should store the components. An easy answer would be: "store the components ...
2
votes
1answer
257 views

Libgdx/Android/2D RPG game: optimizing time consuming when switching from Map to Map

I am completely new in game developing and even more new in the use of Libgdx. So far I have successfully done great thing on my game project thanks to all the advices I could have gathered on this ...
3
votes
2answers
3k views

Handmade Terrain vs. Terrain Engine in Unity?

I'm planning a game right now, to be made in Unity, and I'm trying to decide how I'll approach the basic level construction. Essentially, my game takes place on an island in an infinite ocean, very ...
6
votes
2answers
458 views

Possible to yield a coroutine when it is taking too long to run?

Suppose I have a function that raycasts from (0,0,0) to every object in the scene. Sometimes the scene contains just a couple objects and sometimes it contains several hundred. Is it possible to ...
1
vote
2answers
131 views

Add and remove tiles? Or better to have them all loaded off screen?

Which method do you expect would have better performance when stressed? It's a 2D tile map where the camera has view of a small portion of the map. As I pan up/down/left/right, should I be adding ...
1
vote
0answers
498 views

Why does occlusion culling have a negative performance impact on Gear VR in Unity 5.4.03f?

I am making a GearVR game using Unity 5.4.03f and Oculus Utilities for Unity 5. I have problem with Occlusion Culling. I've set appropriate objects as static and baked the data. The culling works ...
0
votes
1answer
385 views

May I put a ClickListener to the Stage or better if every Actor/Group has its own?

On the web it's almost always better to have a single click event listener at the top of a hierarchy. For example in a tabular data representation the <table> ...
0
votes
2answers
247 views

Does it matter who does the collision detection?

I gave an answer to How to decide which GameObject should handle the collision?, and received a lot of negative feedback on it, claiming that it does not matter who does the collision detection. I am ...
2
votes
2answers
389 views

SFML: Optimizing sf::Text?

I've been noticing that using multiple sf::Text objects has a huge impact on performance. The difference between using 1 or 4 sf::Text objects can result in almost a 40FPS drop (From 120 to 80). <...
1
vote
1answer
317 views

Java Game Optimizing

I'm trying to optimize my game. I've got object Handler that goes trought all objects and then render and tick them. If I have lot of objects in game game lags or don't start. Could you please help me?...
1
vote
2answers
1k views

Multithreading/Optimisation for Random Generation in Gamemaker

I have a FurGeneration() script in my game; when run, it randomly generates individual oFur objects in specified areas in the ...
0
votes
2answers
69 views

How do I optimize checking adjacency within a matrix (including diagonals)? [Gamemaker Studio]

How I was checking adjacency before: ...