What’s the best way to optimize your 3D Unity game? I’m starting to run into heavy lag spikes when moving around my game map. I’m 100% sure it’s my inefficient coding, but I don’t know what I don’t know, I suppose.
If you don't know - use the Profiler.
I have a lot of scripts that point to each other to keep everything more compartmented because I’ll forgot for things do. I’m pretty sure having a bunch of scripts isn’t my issue. I’m fairly certain it’s my marching cube set up.
If you aren't sure - use the Profiler.
I don’t have a beefy computer, but I don’t have a potato either, so what’s some tips and tricks yall might have when it comes to optimizations? (Also, I have no idea if there even is a generalization answer for this kind of question, or if it will be more nuanced, but I figured I’d ask.)
There is a generalized answer for this kind of question:
You need to figure out what component is bottlenecking your frametime, whether it's the CPU or GPU. The profiler can tell you at a glance how long each component took to process the frame.
As far as coding and CPU-bound tasks are concerned - the Profiler can tell you what gets called when and how long does it take. If you want to go a step further, Unity's Profile Analyzer can analyze data over multiple frames.
When people describe bit count when refereing to assets - they usually refer to bits per pixel.
Most modern games today use 24bits per pixel (8 bits per color channel, no alpha channel) in their textures. Some use 32bits per pixel (8 bits per each channel) if texture transparency is important.
Gameboy Color supports up to 15bits per pixel textures (5 bits per color channel, no alpha channel).
Some feedback, purely based on your posted footage: It's mostly about the camera.
It freely phases through solid objects, obscuring your view. Also, when your character seems to dodge - it loses its target momentarily, so much so that your targeted entity goes partially out-of-frame.
Engine?
Unreal allows you to create logic in their own visual scripting model called Blueprint. You could give that a shot.
If you don't know - use the Profiler.
If you aren't sure - use the Profiler.
There is a generalized answer for this kind of question:
You need to figure out what component is bottlenecking your frametime, whether it's the CPU or GPU. The profiler can tell you at a glance how long each component took to process the frame.
As far as coding and CPU-bound tasks are concerned - the Profiler can tell you what gets called when and how long does it take. If you want to go a step further, Unity's Profile Analyzer can analyze data over multiple frames.
When people describe bit count when refereing to assets - they usually refer to bits per pixel.
Most modern games today use 24bits per pixel (8 bits per color channel, no alpha channel) in their textures. Some use 32bits per pixel (8 bits per each channel) if texture transparency is important.
Gameboy Color supports up to 15bits per pixel textures (5 bits per color channel, no alpha channel).
Skyrim mostly uses 24bit textures.
Some feedback, purely based on your posted footage: It's mostly about the camera.
It freely phases through solid objects, obscuring your view. Also, when your character seems to dodge - it loses its target momentarily, so much so that your targeted entity goes partially out-of-frame.
Where it makes sense - yes, it's normal, even in AAA.
TotK used the entire map from BotW.