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.
0
votes
1answer
35 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 expensive.
Does there exist any algorithm ...
0
votes
1answer
52 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:
...
0
votes
1answer
78 views
How to optimize a cubes made world game?
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
40 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 ...
4
votes
3answers
128 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
34 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?...
0
votes
0answers
29 views
Optimized menu system: SetActive() vs. nested Canvases vs. nested CanvasGroup
Our game is 100% based on the new UI. I want to know your opinion about best performance optimized solution to make menus and screen transitions using the new UI.
Our original solution:
A root ...
0
votes
0answers
52 views
python 2d tileset rendering optimization
I've started testing a 2d isometric rpg I'm developing and find the frames per second to average 3.25 >. <
I'm currently rendering a 4 layer (ground, object, sprite, item) 128x128 tileset.
In the ...
3
votes
1answer
123 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++ ...
0
votes
0answers
29 views
Best way to reduce texture size and ensure a minimum quality
i've been working on this mobile game for about a year now, and we'll very close to the end but we're started to face many problems.
Mainly Crashes and HUGE size for a 2D game (on iOS only).
Those ...
1
vote
1answer
115 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
51 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
78 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
19 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
106 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
232 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
105 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
101 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
119 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
73 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
178 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 ...
1
vote
2answers
86 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
106 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
495 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
71 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
236 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
75 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
40 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
93 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
267 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
201 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
122 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
426 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
145 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
96 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
106 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
98 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
59 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
1answer
60 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
51 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
44 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
241 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
177 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
294 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
161 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
93 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
252 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
144 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 ...