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

The quality, efficiency, and speed of running gameplay as a result of several factors in the design and structure of the game and its architecture.

0
votes
1answer
17 views

Object pooling of different tpyes of agents (Mobile Game) in Unity

The mobile game I am developing consists of one to four players and different agents that are being spawned and act in their own way. All those Agents (Car, Animal and Powerup) derive from the same ...
0
votes
0answers
18 views

Using stopwatch to adjust Coroutines running period

I usually see in the code base that we use Stopwatche to adjust coroutines running period in each frame. Questions: ...
10
votes
2answers
3k views

Why does Unity use reflection to get the update method?

Why does Unity use reflection in order to access MonoBehaviour message methods like Awake, ...
0
votes
1answer
41 views

Have VSync on or off while do a game profiling

I'm trying to profile the game using Unity Profiler in order to catch any potential performance issues. The graphics settings support VSync feature. However, I am not sure which one is the best ...
0
votes
0answers
36 views

Solve SlowRendering issue with OpenGL

We have been seeing reports of slow rendering of frames in google play vitals. When trying to debug better, it was recommended to use adb shell dumpsys gfxinfo to get more information. Our game uses ...
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
1answer
46 views

GLSL - Efficient Point inside Box Check

I'm attempting to improve the performance of a shader that changes the colour of a region of the world that is inside a "zone". I am using a deferred lighting system, so the colour and world-space ...
0
votes
0answers
31 views

Unity3D - Improve game performance by destroying rigidbody

Im working on a multiplayer first person shooter game for (MOBILE). I assigned Ragdoll for characters in my game , For when they are killed. But I realized when ...
1
vote
1answer
69 views

Unexpectedly fast rotation after refactoring OpenGL code to add more abstraction

I've been working on an OpenGL program that simply renders a square that rotates in 3D space. The square also has a texture applied to both sides. Here you can see an example screenshot of the program ...
0
votes
1answer
25 views

How to get 60fps animation in terms of rounding/truncating position/alpha floats

I am wondering what gives the best animation performance running at 60fps with lots of objects. I have seen in a few places such as this that you should round or truncate your values so you don't get <...
1
vote
2answers
101 views

Event queue: tell or ask?

I'm working my way through a lot of game development resources, coming from a completely different field of software development, I'm interested in learning what patterns are frequently used in game ...
1
vote
2answers
69 views

Performance in pathfinding/road calculation

I have a question about the most effective way to detect road connection in a tile based world. Some time ago I already asked for "How to improve performance for expensive functions in 2d city builder"...
0
votes
1answer
57 views

Unity run-time creating material has performance impact?

Just found creating a material in a script for the first time would have performance impact. (Using Unity 5.6.5f) A very simple script for testing is to create a game object with MeshRenderer in ...
0
votes
1answer
36 views

Multiple image objects extracted from spritesheets or one-two object for all?

Let's say I want to make a 2D game and I'll use a spritesheet containing all of the animation frames and a texture-atlas for static sprites such as walls, non-animated decorations...etc. Should I ...
1
vote
1answer
65 views

Frustum culling with a single large object

I am helping to optimize performance in a mobile game. The artists who built a particular scene added a wall around the scene. The wall is a single mesh with 100k triangles. Because it goes around the ...
2
votes
1answer
66 views

Should LOD models be used in mobile games?

LOD models are widely used in PC and console games, to optimize performance by reducing the vertex count and texture size for distant objects. However, I'm having a harder time finding out if they are ...
0
votes
0answers
63 views

Cache friendliness of AABB-Tree: binary vs N>2

I found that state-of-the-art physics engines like Bullet and Box2D all use binary AABB-Tree for broad-phase collision detection. I wonder, did anybody tested AABB-tree with >2 branches per node ? ...
0
votes
1answer
59 views

Open world game state saving Android

As a hobby project I'm building a 2D game with a custom game engine in Android. Currently I can render a json map, and let the user interact with objects on the map. The game should be an open world ...
0
votes
3answers
255 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
1answer
106 views
0
votes
0answers
15 views

Performance: Culling done right- farplane and other things

I have more and more "hipoly" characters in my scene now. One way to solve this "more or less beautiful" is making a farplane and adding some fog. But the performance still is quite bad. Isnt there ...
0
votes
1answer
37 views

Unity3D: Constant Jittering when using Mecanim IK in game Mode

So I am trying to aim my player equipped flashlight at the mouse. It works good but there is some jittering when seen in game mode but none when seen in scene. Btw it is an FPS game. I am getting good ...
0
votes
0answers
203 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 ...
1
vote
0answers
60 views

Performance problems with scrolling html5 canvas for large tile-based game

I try programming a splix.io clone as an electron app and do the visualization via the html5 canvas. The movement across the tiles should look fluent like the original, so I target 60 frames a second. ...
0
votes
3answers
101 views

What are the differences between random encounters and permanent mobile enemies?

Random Encounter: A player has a 10% chance to encounter an enemy. while moving through a 5x5 grid. Permanent Mobile Enemies: There is one enemy that constantly moves through the 5x5 grid and only ...
1
vote
1answer
77 views

Unity3d - Cast dynamic shadows without processing multiple lights

Back Story I've built a game with a friend and all goes well until there are too many spheres under a group of 5 lights, then things start getting choppy. Troubleshooting I've found that by turning ...
2
votes
1answer
95 views

Does abstraction influence performance?

Say I have a GameObject class that is being extended by all of the objects in the game that are moving around. (This class provides basic stuff like a sprite, draw ...
1
vote
0answers
98 views

ParticleSystem, performance behind the technique on batching with different materials

I found that guide: https://thinhhb.wordpress.com/2016/03/27/unity3d-optimization-make-atlas-textures-for-particlesystem-reduce-drawcall-why-not/ which is quite clever. As far as I know, we can't ...
1
vote
2answers
69 views

How do i retrieve individual Tile Information from a tilebased procedural World fast?

I am concerned about performance with my current setup; as I want to expand on it i need to figure out if I might need to change it. Current Setup: The Game/Prototype is similar to Dwarf Fortress or ...
2
votes
3answers
80 views

Are there recursive variants for trigonometric functions to potentially improve performance?

This is perhaps a better question for mathematics SE, however, this deals more with the performance side of gaming, and software in general. When I say recursive function, I mean recurrence relation. ...
0
votes
0answers
61 views

How to speed up Unity Simulation?

I am trying to collect some data from UNITY but it is taking forever. I increased the framerate to 5 which accelerated the simulation without compromising the output but still it's slow. I am ...
0
votes
1answer
80 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
1answer
230 views

Why is creating my sprites so slow?

My 2D Unity game has tiles and layers. It creates one game object per tile, anywhere from 100 to 10,000. To create 3,000 game objects takes 68 msec, which is just fine. But setting up the sprite and ...
2
votes
1answer
72 views

Calculating the difference between two numbers using exponential growth

I think this is a very basic game programming question, but I am bad with math and new to programming & game programming so I'm looking for some advice. I'm making a 2D sprite game for iOS. Every ...
4
votes
2answers
578 views

Why do separate loops run faster than one loop that does multiple things?

My game had some lag, so I tried to improve the performance. I found that if I write my loops separately like this: ...
0
votes
0answers
254 views

How to render a large tile-based 2D world efficiently (using JavaFX/ScalaFX or more generally)

I have a file tileset.png containing a dozen 32*32 tiles. When my game starts, it generates the world randomly with the available tiles and the size of the world ...
0
votes
0answers
40 views

Rotating scenario in pygame

I want to create a top-down shooter and I am having performance problems with rotate or rotozoom in pygame. The effect I want is present in Daedalus (https://www.youtube.com/watch?v=ARclVI1e9k8&t=...
0
votes
0answers
45 views

Draw 100.000 3D lines with blending

For the visualisation of a physical experiment I need to draw multiple 10.000 particle tracks in a 3D space. Example 2D: Example 3D (low Energy): Each individual track should contain width and ...
1
vote
2answers
75 views

Unity: Hiding Game Objects vs Creating them

My game project involves collecting items that will be displayed in trophy cases of sorts. There could be several hundred objects as the scale of the project increases, each with their own position, ...
0
votes
0answers
57 views

LWJGL - OpenGL BufferStorage no performance boost at all

I tried to implement a persistent mapped buffer instead of using glBufferData and glBufferSubData. Everything works and is ...
0
votes
2answers
173 views

How to render many tiles fast if zoomed out? (Monogame/xna)

I'm currently trying to optimize my tile engine. I used monogame with the spritebatch first, but that doesn’t works well. I have read many articles how I could optimize my rendering code. I moved ...
2
votes
0answers
70 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 ...
4
votes
1answer
273 views

Why does an emulator use more RAM than the original system?

Why does an emulator use more RAM than the original system? What are emulators doing that requires so much more power? For example, when using the PSP emulator PPSSPP I'm experiencing lag on a modern ...
0
votes
1answer
152 views

How to get time since frame start in Unity for loading purposes

I am building a big world (1000+ game objects). It takes 2s on the device. I am doing it in the background (the world is hidden until fully loaded). I have figured out that I can maintain the FPS of ...
0
votes
0answers
38 views

Which is the more performance-friendly way to rotate one object around another in Unity?

If I want to rotate an Object around another Object, what would be better to use to get better performance when you need to do this to many Objects. Option 1: Animation. Would it good to use an ...
0
votes
1answer
63 views

Hardcode model data into geometry shader

I have this idea for creating a point cloud and passing an integer into geometry shader to determine which model to draw, each model has the same amount of vertices etc and it would be hardcoded into ...
3
votes
1answer
226 views

Efficient minimum distance between two axis aligned squares?

I have two 2D arbitrarily-positioned axis-aligned squares. I need to find the minimum distance between those squares – i.e. if you were to draw them, what's the length of the shortest line you could ...
0
votes
1answer
218 views

Camera and multiple shaders

What is the best way to handle a moving camera inside many shader programs? I believe most games need to have one common projection matrix inside all shader programs to use a moving camera. Currently ...
0
votes
0answers
102 views

Improve performance by depth checking drawn objects

So I draw many LINE_STRIPS and they all get rendered on top of each other. I would love to make this more effecient, but I just can't figure out what I have to do. I have performance issues and I ...
1
vote
2answers
150 views

Mesh complexity vs Texture Size (Performance)

From a performance view, which is preferable: A higher detailed meshes with small textures (like 32x32 pixels) or A less detailed mesh with a bigger texture (like 1024x1024 pixels)? Additional info. ...