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.
1
vote
1answer
85 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 improves the performance.
How much ...
0
votes
1answer
49 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
64 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 ...
0
votes
0answers
15 views
Caching draw meshes with indices-alike?
I'm learning LibGDX, and I understand that we can make a kind of cache on vertexes by using indeces. So complex meshes could reduce the vertexes usage by reference it with indices.
For instance, a ...
1
vote
1answer
66 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 ...
1
vote
0answers
111 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 ...
5
votes
1answer
99 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
100 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 ...
0
votes
0answers
106 views
Performance spikes using unity for GearVR: what is PlayerEndOfFrame VR.DeviceSDK?
I use Unity to develop a Gear VR game and I hit 60 FPS most of the time but have some nasty performance spikes created by, according to Unity's profiler, "VR.DeviceSDK" under "PlayerEndOfFrame". See ...
1
vote
0answers
97 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
63 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> element would listen for all its ...
0
votes
2answers
174 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 ...
0
votes
1answer
58 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).
...
0
votes
0answers
64 views
Unity debug build runs better than release build
When running the debug build with the Profiler we're getting a good frame rate that bounces between 55 and 60. When we make a release build the frame rate randomly drops from down to 30 for a few ...
1
vote
1answer
83 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
317 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 game's single Room. Each has a random depth and one of three sprites, and ...
0
votes
2answers
34 views
How do I optimize checking adjacency within a matrix (including diagonals)? [Gamemaker Studio]
How I was checking adjacency before:
if (obj_Handle_Links.Last_Link.Matrix_Location_y = (Matrix_Location_y-1)
|| obj_Handle_Links.Last_Link.Matrix_Location_y = (Matrix_Location_y+1)
...
1
vote
1answer
69 views
Multiple traversal of a component-based hierarchy
Let's say a game use a component-based hierarchy to store all of its entities.
So it can have objects, characters, lights organized in some kind of tree.
When rendering the game, it needs to first ...
1
vote
2answers
153 views
Unity Vector3.Angle() direction
I have a space fighter AI. I need to determine how to pitch, yaw and roll the craft to aim at the target.
My current solution:
To obtain the Yaw angle to position the target above the fighter, here ...
0
votes
1answer
62 views
AI parameters for Tetris like game
I am building an AI to play a variation of Tetris. The rules are changed in that there are 19 different types of pieces, rotation is not allowed, and the pieces can be placed anywhere in a 10X10 grid. ...
0
votes
2answers
38 views
How to Check and Destroy “linked” gems quickly efficiently
Engine: Gamemaker Studio
(simplified) Situation: I have a 6x6 board (at this moment) stored in a 2D matrix, a mechanism for linking adjacent squares, similar to Puzzlecraft, and a button that ...
0
votes
0answers
69 views
How to determine which chunks to load/unload when moving through an infinite voxel terrain
I'm implementing a smooth voxel terrain engine in C++. The terrain is split into same-sized rectangular 'chunks'. After I moved chunk generation and loading into a background thread, I don't have to ...
1
vote
1answer
211 views
2D Sprite batching in OpenGL: How to send transformation data to GPU
OpenGL newbie here.
So I'm trying to implement sprite batching to draw ~100 sprites per draw call. I've created a VBO that contains texture coordinates, vertex coordinates, color data (for tinting), ...
0
votes
1answer
148 views
Configuring Implicit Multi-GPU Rendering Driver Settings Programmatically
What is available to game developers to take advantage of implicit multi-GPU rendering technologies as of 2016? For this question I will only be asking about Nvidia's SLI and AMD's Crossfire ...
3
votes
1answer
114 views
Why create meshes instead of using Planes?
I'm working on a top down 2D game in Unity and I want to create levels dynamically. All tutorials I find tend to talk about generating meshes so I've followed some great tutorials such as this one. ...
0
votes
0answers
308 views
Unity Level Streaming
I'm working on mobile 2D game, and every level has about 5000 sprites of a 256x256 resolution representing static objects like tiling ground, roads, etc.
I want to know whether or not that would ...
1
vote
1answer
137 views
Frustum culling takes ages c++
I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count.
I read some forum answers, people say 0....
0
votes
2answers
39 views
(Optimization) Efficiently discovering if a new day has been reached
I'm making an in-game clock/calendar system. In-game time is 12x real time. In addition, in-game events can fast-forward time. I also have in-game events that reset or trigger at the turn of each day.
...
1
vote
1answer
76 views
Terrain rendering using Geometry Shader
my idea is render an entire terrain based on heightmap using geometry shader, i am parsing only one point per quad of terrain with the heights of the corners, however for some reason i am not being ...
0
votes
2answers
92 views
reuse texture between quad objects
This question is specific to unity:
I want to spawn multiple blocks, each representing a letter. There will be more than one copy of an alphabet.
I have a big texture which contains all the letters ...
0
votes
2answers
75 views
Fastest way to neutralize scale in the transform matrix?
Let's assume we have 4x4 3D transformation matrix, that is the result of scale, rotation, and translation transforms. How to set its scale to (1,1,1) in the fastest way? Assume also that the matrix is ...
0
votes
0answers
49 views
Physics2D lag on increased timescale Unity
I have been working on an infinite runner kind of game in which i am trying to implement a speedup powerup kind of thing . Something that will allow me to boost through the levels at a high speed
I ...
0
votes
0answers
39 views
Convolution of luminance values in shader
For my fragment shader, I need to take the convolution of luminance values of a square block of pixels.
I tried with 3x3 block and took luminance and convolution.
But it ended up in huge performance ...
0
votes
1answer
55 views
Which three points to use to calculate a frustum plane?
So I have a view frustum I'm going to be using for frustum culling. I have a method that finds the cross-product of three points but since each side of the frustum has four corners I don't know which ...
0
votes
1answer
46 views
Any reason not to combine an AO Map and Cavity Map into one texture?
If an Ambient Occlusion Map is for mapping shadows based on closeness of neighboring geometry, and a Cavity Map is for mapping smaller shadows based on angle or distance, then is there any reason not ...
0
votes
0answers
43 views
My Movement Function is working good but called only once
I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not.
if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
1
vote
0answers
151 views
Why does reverse depth buffering provide more precision? (with DXGI_FORMAT_D24_UNORM_S8_UINT Datatype layout)
I lately came around methods optimizing the use of the depth buffer, as the easiest solution reverse depth buffering is mentioned but I cannot wrap my head around why I would be gaining a better depth ...
0
votes
2answers
156 views
How to fix my tile-based game's tile movement code ? (like a CandyCrush Style)
I'm currently creating a tile-based game like a CandyCrush style direction movement (no problem on only down movement) trying to smooth, not laggy tile movement with a board piece, and I'm writing a ...
7
votes
1answer
291 views
How to make illusion of round world?
I want to make a flat world, but i want to split it into pieces which will load in segments (for better optimization), and when you are at the end of map it will start loading segments from the ...
0
votes
2answers
156 views
Switched from immediate mode to VBOs, game runs slower
trying to improve draw performance on my c++, OpenGL, SDL game. Back in school we mostly learned immediate mode, so thats how my drawing was originally implemented. When I started reading up online ...
0
votes
1answer
77 views
Libgdx: more efficient way of using Vector 3?
I currently use
if(cam.frustum.pointInFrustum(new Vector3((float)posX, (float)posY, 0)))
To check if my sprite is in the camera's view. I have to make a new Vector3 every frame wich is very ...
6
votes
1answer
233 views
How can I speed up this HLSL shader?
I have written a lighting shader file that is used as the fragment shader part of a deferred lighting pipeline.
Unfortunately, each iteration seems to be adding 0.5ms to my frame time, so any more ...
2
votes
0answers
138 views
Recognize pattern in 3D building environment
I'm currently developing 3rd person building game (as bacheleor thesis). I need to recognize constructed patterns co I can mark corresponding structure as some building (so player can start using that ...
1
vote
2answers
161 views
Can I make this physics simulation any faster?
I've made a little real time physics simulation that solves some bodies. CirclevCircle && CirclevOrientedRect I would like someone to tell me if I'm doing something drastically wrong. I know ...
1
vote
1answer
50 views
How to add images?
I was adding images after reading in the documentation:
This means that if you generate a 200x200 image for xhdpi devices, you
should generate the same resource in 150x150 for hdpi, 100x100 for
...
0
votes
0answers
53 views
What is the best way to group lots of squares into one VBO?
I'm making my first game in OpenGL, using procedural generation, and it is a similar concept to Terraria. At the moment, I have one, very small VBO for a square ('block') and an EBO for its vertices. ...
8
votes
1answer
227 views
In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?
In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way:
FixedUpdate(dt) // I use fixed timestep
foreach collide c1 in allNotStaticColliders
...
0
votes
0answers
26 views
Different layouts?
I have had trouble in the past with optimizing my game for different layouts, so that the players don't see the game in different ways on different screens. Someone told me that the normal directory ...
0
votes
0answers
298 views
Culling And Optimization in a 2D Orthographic Game
I'm currently developing a 2D top-down space themed RTS game. I'm building the space procedurally from a seed. At the end of generation of all space objects, if i don't apply any optimizations I end ...
1
vote
1answer
139 views
How should I store a procedurally generated grid level of an infinite size?
I have a 2d grid level. It infinitely grows. If it was not of infinite size, a 2D array would be perfect, as I need to constantly have each grid talk to its neighbors.
For example, with a 2D array,...