Skip to main content

Questions tagged [efficiency]

1 vote
1 answer
50 views

Can we avoid PCF shadow blur in area where it is full shadow or no shadow

I cast shadows in either opened or closed environment for a directional light whose lookat position follows the player position. So the shadowmap is refreshed regularly so that I cannot store a fixed ...
philB's user avatar
  • 221
10 votes
2 answers
4k views

Wondering if there is a more efficient way to store level data in my game?

I am trying to remake Super Mario Bros. in JavaScript and I am trying to figure out if there is a more efficient way to create and store the level data. I have created 1-1 and here's what the code ...
Jake Miahn's user avatar
0 votes
0 answers
85 views

Desynchronizing MonoBehavior's "Update" from the overall app or UI Toolkit graphic output rendering in Unity?

Is it possible to desynchronize Application.targetFrameRate and Monobehavior's Update() from the graphics output rendering rate ...
mike's user avatar
  • 501
0 votes
2 answers
1k views

Draw 2D circles/squares efficiently with Unity

I'm doing a lot of 2D simulations using Unity, and I usually instantiate a lot of squares/circles sprite. When the number of sprites reaches 1k or higher, the FPS usually reduces to 10-20, which makes ...
silverfox's user avatar
  • 117
0 votes
1 answer
1k views

More efficient/clean way of programmatically generating and customizing repetitive objects?

I am coding my UI in Unity C# with the UI Toolkit, and as I write more and more my code is getting quite annoying in terms of one particular issue. I find myself repeating many similar lines of code ...
mike's user avatar
  • 501
0 votes
1 answer
2k views

Does setting the alpha of a UI canvas group to 0 stop Unity from wasting resources rendering it? Is this a valid optimization for off screen UI?

I am trying to improve the efficiency of a big UI Scroll View in my Unity app. These Scroll Views tend to be inefficient and can be prone to jittery/stuttering motion if they are taxed. I came across ...
mike's user avatar
  • 501
2 votes
1 answer
2k views

How to re-render the scene only when something changes in Unity?

Does Unity continuously refresh the screen or constantly render 3D objects on screen with each refresh? For example, let's say hypothetically you had a screen where you were just text messaging ...
mike's user avatar
  • 501
3 votes
1 answer
1k views

In a chess simulator, how to efficiently determine checkmate?

I'm working on a small C++ chess simulator game for the first time, and I have a bit of a programming dilemma. I have searched for similar questions on this site and StackOverflow, but can't find a ...
Sciborg's user avatar
  • 604
1 vote
1 answer
115 views

Calculate coordinates of boundaries containing group of objects

I would like to understand how to calculate coordinates of boundaries group of objects as a parallelepiped in 3D game? Let's say for simplicity we have spheres randomly slowly moving in 3d space some ...
Arsenius's user avatar
  • 113
10 votes
4 answers
6k views

Switch statement efficiency in game code

Recently, I was digging into VVVVVVV's source code that was released on GitHub by Terry Cavanagh. I went into the Game.cpp file, and found that it contains an ...
Carmo's user avatar
  • 157
1 vote
0 answers
303 views

Most efficient way to recalculate enemy A* path on the fly?

I'm working on implementing a more robust pathfinding algorithm for the enemies in my top-down shooter game, and I have the A* algorithm working, but now I need to decide when to calculate the path. ...
Darin Beaudreau's user avatar
1 vote
1 answer
6k views

Efficient way to detect when audio clip ends

In Unity, I want to trigger an event when an audio clip finishes playing. Would it be more CPU efficient to keep checking if the audio clip is playing with ...
Jorge Luque's user avatar
1 vote
1 answer
439 views

What's the best practice to use the pbo to upload multi textures?

I have a basic model to upload textures as shown in the following picture. I design this for several reasons: Only the primary thread owns the OpenGL context, so I choose to create buffers, map ...
Sheldon Wang's user avatar
2 votes
1 answer
288 views

How to create a grid of 3d objects without making them actual GameObjects

Very simple question: If I'm going to be generating and placing a lot of 3d objects (in this case cubes), that are not going to be interactive, like no collision, no raycasting intersections etc. ...
Danny F's user avatar
  • 23
0 votes
1 answer
498 views

What is more efficient in Unity recorded animation or Slerp/Lerp?

What is more efficient in Unity recorded animation or Slerp/Lerp? What will be faster? It is obvious that the animation will take a lot more space.
hellomates's user avatar

15 30 50 per page
1
2 3 4 5