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

Camera animation stutters on first launch

The camera stutter for a fraction of a second when animating a camera from one position to another position. This issue only happens when the game is launched for the first time after installation. ...
1
vote
1answer
86 views

Are spritesheets worth it? Is a zip a good alternative?

I was wondering if spritesheets are worth it. I am making a game with pixi.js and was thinking about optimization, beginning with asset loading. I currently have an arraya of all files and use PIXI....
0
votes
0answers
26 views

Optimize spawn & destroy? (Unreal Engine)

I'd really like to know how you'd go about optimizing this? 20 actors each spawning 8 projectiles per 0.1 sec which are then destroyed 0.8 seconds later, all done through blueprints Gif: https://gyazo....
0
votes
1answer
44 views

Prevent mesh generation function from blocking other functions from running

So, I have a procedural mesh generation system with chunks that load in and generate as the player walks into a nearby cell, and get removed when the player walks out. When each set of 9 cells is ...
1
vote
2answers
135 views

Modern Compilers Inlining and Header and Implementation Practices in Game Development

I was taught that in general practice its best not to try to beat the compiler, at least until its proven to be stupid. So in general, and since I was told that its generally only used as a suggestion ...
0
votes
0answers
47 views

Good way to establish an inventory system?

Fairly new to Unity as a whole, and while making a prototype game I came across the issue of setting up an inventory system. So far, I've been stuck on what sort of structure it should have, given: ...
1
vote
0answers
166 views

Optimizing falling sand simulation

So, for the past couple of weeks, I've been working on a falling sand simulation inspired by games such as The Powder Toy, Noita, and Sandspiel. I've been making it in Love2D and I'm please with what ...
0
votes
0answers
20 views

Load all sprites up-front, or stream them?

I'm currently in the starting phase of my first large game in Swift and SpriteKit. It will be a Super Mario-like platformer game where each level is about two minutes long. Since I've never made a ...
0
votes
1answer
30 views

Looking for tips on how to optimize/debug Java/Eclipse

I made a raycasting engine with wall textures. Before adding the texture the engine was silky smooth. With textures it has small lags (or stutters) when i move around and i would like to know why. My ...
0
votes
1answer
136 views

Should 3D transformations be represented by a 4x4 matrix or a 3x4 matrix?

Since 3D transformations are represented by 4x4 homogeneous matrices we know that their last row is always (0,0,0,1), and as such the behavior of this final row is implied so long as we know whether ...
0
votes
0answers
22 views

Unity Optimization: Creating Multiple Similar Scenes Effectively

I've been working on a mobile game that uses the same framework for each level in the game, and I was wondering what would be the most efficient way to store all those levels in Unity. Should I only ...
23
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 ...
0
votes
0answers
30 views

Punching holes through a texture and making them regenerate back again in an efficient way

I'm working on a prototype where the user can use the mouse to punch holes through a texture, making this texture see-through in that area for a certain amount of time. After that time, the hole will "...
0
votes
0answers
37 views

Help deciding data structure for spatial partitioning, using only value-types in c#

I simply want to implement some sort of grid where I can sort units in an RTS into cells, and then for each unit check to avoid other units and attack other units, in 2d. My map grid is currently 10 ...
0
votes
0answers
24 views

Heuristic for Board Game AI Resulting in Tie

I'm developing a program for a Line of Action game (see specs here: http://www.boardspace.net/loa/english/index.html) For the AI, I've created a game tree, pretty similar to most game tree ...
12
votes
2answers
6k views

How do Minecraft know where village's buildings are if the village is not generated yet?

I'm trying to understand how chunk generation works in a deep level and all the information I found does not explain how the villages are generated properly without visual glitches during generation. ...
0
votes
0answers
30 views

Improving the efficiency of a grid-based ecosystem simulation

I'm trying to create a grid-based ecosystem simulation game. The design I came up with is something like a 1000 x 1000 (or larger) grid, with each cell being a representation of an object containing ...
1
vote
1answer
198 views

Do empty Update() methods get executed and slow down the game while playing?

From an optimization point of view, is it best practice to delete the predefined update() methods in all my C# scripts if there is no code inside them ? On hundreds/thousands of GameObject(s) with ...
0
votes
0answers
29 views
1
vote
1answer
49 views

Unity3D, voxel chunk mesh modification: Further performance improvements

I've flattened my 3D chunk array(Got nice 20ms speed up), modified my VertexData struct (that I use in Dictionary as a key) to have custom hashcode(another 20ms and -2.7mb GC.alloc data speedup). But ...
1
vote
1answer
278 views

Excluding geometry from a shadow casting light in deferred rendering

Is it possible to exclude geometry from a particular shadow casting light in a deferred rendering pipeline? If yes, can it be done correctly or are there limitations? This is mainly to reduce the ...
2
votes
2answers
989 views

HIGH energy consumption in Empty Scene Unity iOS

I am struggling from quite long about this issue where I am having High Energy Impact in Unity 2019.2.16f1 on iOS platform and it doesn't matter which device I am using. It occurs on iPhone6 to ...
1
vote
3answers
486 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
26 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
129 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
302 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
101 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
110 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
98 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
118 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
438 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 ...
4
votes
2answers
209 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
0answers
50 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
34 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
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 ...
0
votes
0answers
65 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
38 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 ...
0
votes
2answers
514 views
2
votes
1answer
256 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
182 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
277 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
274 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
58 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
677 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
65 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
168 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
32 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
123 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
44 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
2 3 4 5
8