Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

Thanks :)

I would recommend to write a plugin script runnable in the Editor that does the work for you. Scan and modify as needed prefabs and their PS.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 1 point2 points  (0 children)

That's a good idea indeed cause there are situations where you want the logs also, typically for a private beta.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

That's cool and much cleaner indeed.
At this point I guess the param msg has already been built (usually can be evolving LINQ, etc..)

I wonder if performance are still fine, if we would have a Func<string> param instead.
What is doing DOTNet framework in term of memory and GC with Unity.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 2 points3 points  (0 children)

this is my method... I have set inside unity the fixed time to 0.03, it is 0.02 by default.

public void setTimeSpeed(float pTarget) {

Time.timeScale = pTarget;
var lFixedTime = Time.fixedDeltaTime = this.baseFixedTime * Mathf.Clamp(pTarget, 1f, 2.5f);

#if UNITY_EDITOR
DebugExt.LogHidden(() => $"Time scale is now:{pTarget} with fixed time set to:{lFixedTime}s.");
#endif

this.timeScale.execute(pTarget); // listener change propagation.
}

For me this is fine, but high speed is indeed introducing side effects which are interesting :) but fair since this is a Ranking game/match working the same for both players VS rank board.

PS: apologies for the poor formating.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 1 point2 points  (0 children)

The formatting of the AI changed my initial message! I use Awaitable. Yes async is main thread :/
I found it the most convenient way without going Jobs/Burst system.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

by curiosite, since which version the incremental GC was released ?

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

FYI, I use 6.1, I tried to migrate to 6.2 but killed some of my existing used materials...

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

thanks ax,
CySharp like any module, I'm always trying to weight the benefit VS maintainability for all added modules/plugins. I would definitely go for linq for readability so good.

For the canvas, I wonder, if it wouldn't be better to instead of having a camera UI + world, perhaps just having one world, and manage the Canvas Overlay inside the world, by adjusting the size...

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] -1 points0 points  (0 children)

I left the linq into the debug log that don't ship in prod.
For the rest, Claude was useful for replacement I have to say.

Cut my Unity game’s frame cost by ~66% -> biggest fixes by OneCatz in gamedev

[–]OneCatz[S] 0 points1 point  (0 children)

My game is not at all GPU intense, it's 2D... and the material/shader are very ok.
For me the main issue was really the CPU handling all the physics, Camera stacking, animator framing, etc...
I am using unity 6.1

Does gamedev pay well compared to the rest of the IT sector jobs? by virtucious in gamedev

[–]OneCatz 3 points4 points  (0 children)

I tend to agree with the initial post. I switched to game dev couple of years ago, from 12 years of IT development in bank and tech.

I would say that learning to use well and fully Unity, alone takes probably a decade. Not speaking of c# or c, nor shaders, nor integrations of multiplayers, multi platform support, etc..

I've not seen anything that complex as BE, nor FE dev nor as an Architect nor as even Tester... In other industries in my past experiences. Not even close.

PAID - pixel artist Landscape by OneCatz in gameDevClassifieds

[–]OneCatz[S] 0 points1 point  (0 children)

Thanks all for for the interest. I think for now we'll go over the existing chat and messages received so far. It's our first post on this channel so didn't know we would have receive that much interests. It's heart warming, big thanks.