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

Questions tagged [performance]

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.

Filter by
Sorted by
Tagged with
0
votes
3answers
875 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
108 views

Do i lose performance doing this

...
0
votes
0answers
880 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
110 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
129 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
188 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
102 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
449 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
3answers
104 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
121 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
88 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
143 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 ...
1
vote
1answer
470 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
96 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
2k 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
1answer
527 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 ...
1
vote
2answers
104 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
2answers
379 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 ...
3
votes
0answers
151 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
368 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
332 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
1answer
73 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
805 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
430 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 ...
1
vote
2answers
331 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. ...
3
votes
2answers
941 views

How does layer based collision affect performance

In Unity3D, and others, there are Layer Based Collision System which makes collisions only happen between specified Layers. It defaults to all layers colliding with all others. Does making use of ...
4
votes
2answers
322 views

How do I implement Pokemon-style moves?

I'm developing a Pokémon/classic Final Fantasy inspired game, in the sense that game play consists in many creatures, possessing many moves with different effects (attacking, healing, buffing, ...
1
vote
1answer
579 views

No performance gain from instanced rendering?

I recently worked through this tutorial about instanced rendering. At the end it promises to draw a huge amount of instances of one model without performance drops. So I tried some simple instanced ...
3
votes
0answers
158 views

Generating color for mesh in Texture3D or shader?

In Unity, I'm trying to choose between two ways of procedurally colorizing meshes (with vertex color). The main concern here is performance, knowing that my software is already GPU bound (more ...
2
votes
3answers
107 views

Does the size/distance of a single object affect performance?

I have a moon that I would like to place in the sky, which will likely be anywhere from 1000-5000 triangles. Will I experience any performance degradation if I choose to place this sphere several ...
1
vote
1answer
179 views

Save game on server side

I'm working on a small management game. The player manage his hospital where he can collect items and new characters. Each player can visit others players hospital and gives collected entities. I ...
3
votes
0answers
179 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 ...
1
vote
1answer
647 views

Efficient way to load chunks of a 2d level to prevent game from loading stutters

I am building a 2D sidescroller game in Unity3D. It's tile-based. To get better performance I divided the level into chunks. I activate these chunks when the player enters 2D Triggers and deactivate ...
4
votes
2answers
930 views

Performance problems with quadtree for dynamic objects

I´ve implemented a quadtree spatial partitioning to my game engine as I wanted to try it and see how it affects the performance checks. The results were great (instead of hundreds collision checks ...
1
vote
1answer
91 views

Scalability/Performance of physics-based character animation

I am asking this question because I am currently at the point where I have to think about how the characters in the game that I am making will be animated and I want to check if my desired approach ...
26
votes
3answers
8k views

How to handle a large number of pickups in a MMO game

How do games like Minecraft, or really any MMO game that has pickups, handle them? Say terrain spawns 3 pickup drops of "dirt" everytime you dig said terrain. Say every item has a rotation ...
2
votes
2answers
465 views

ECS: is it beneficial to manage the data organisation of components before updating a system?

When I process a bunch of component data, I'd like that data to be sorted in such a way that I can iterate through the component buffers linearly. For instance when I want to update the physics system,...
0
votes
1answer
241 views

GLfloat vs GLfixed vs GLint performance in 2017

Some people claim that floats should be used for rendering vertices in modern graphics cards, because graphics cards are optimized for floating-point arithmetic and therefore, integer calculations are ...
4
votes
1answer
1k views

FPS drops when I maximize the game tab in Unity Editor

I have a simple unity scene with some primitive objects like cubes and spheres. Most of the objects are static and I made backed GI for lighting, The light is a point light. I also used unity post-...
1
vote
1answer
321 views

Best practice for 4x game management in Unity? [closed]

I'm trying my hand at creating a turn-based 4x game in Unity, with a galaxy map and 2D hexagon grid maps for each individual planet. The planet grid hexes would be gameobjects, with the overall grid ...
8
votes
2answers
3k views

Why is the for loop more efficient than the for each loop in Unity?

During a Unity talk about performance, the guy told us to avoid for each loop to increase performance and use the normal for loop instead. What's the difference ...
0
votes
1answer
88 views

Using 10 materials for one Model? [duplicate]

I made more than 10 robots. all of them had not less than 4 materials, and some had 12 materials. I can't go back and fix this. How this will effect on the game performance later ?
0
votes
1answer
301 views

How to efficiently implement Dijkstra's path finding algorithm?

As per this answer: How to devise an algorithm for a person being on a walk? I tried to implement a simple path finding algorithm. The map is 60x60 tiles total, and walkable tiles are even fewer: (...
0
votes
1answer
2k views

Unity Performance: How many Materials per Object?

I have learned that a Mesh with 4 Materials each 1024x1024 in Size is somewhat slower than a Mesh with 1 Material 2048x2048 in Size? In my usual workflow I tend to seperate different Materials into ...
45
votes
6answers
8k views

When is the best time to consider performance?

I am coming from software development background. During the software development cycle, we usually focus on functionalities and the working product. At the end of development, we start optimizing ...
0
votes
0answers
22 views

Fast selection of visible child components

I'm working on gui and I have next realization of base UI component: So when I want to get absolute component position I need to sum all parent positions with component position. Also if I want ...
1
vote
1answer
194 views

Should I switch to a game development library?

I'm making an RPG-like 2D game from scratch with Java. By now I'm in a pretty advanced stage with my game, but I encountered a problem- my game using too much CPU. I know it's because my game loop ...
0
votes
0answers
675 views

OpenGL Slow rendering of half a million points on Windows

How can I speed up the drawing of my points in OpenGL on Windows? I have an Qt 5.9.1 app that shows real time Lidar data, so at a certain frequency I add points to my buffer (which I've overloaded to ...
1
vote
0answers
255 views

How to efficiently batch blocks and reduce drawcalls in a voxel-like game

To fully get the benefits of GPU instancing in Unity in a voxel-like game I'm trying to batch as many static blocks as possible (the terrain won't be destructible, and I can't set these blocks to '...
1
vote
2answers
2k views

How to efficiently spawn / instantiate a large amount of objects from a prefab

I am trying to make a game where the whole world is consists of a very large amount of cubes (sort of a Minecraft / Trove clone), but I keep running into huge performance issues due to the large ...