(14-07-2016, 06:30 AM)Yuri6037 Wrote: It was working very fine before Person put his rule. And the crash happens only when my game freezes because i enter a planet with many entities. The profiler tells my only 10K max run time. When changing planet i get sometimes 100K spike which crashes it !
Si doubt the problem is in my code.
If i stay in an environment with low entity count nothing crashes client side.
Only starfall screens seam to be saved from environment change spikes...
Starfall screens don't need to be redrawn every frame as they can (theoretically) be copied from the previous frame (thus saving rendering time since it's already pre-rendered). HUDs on the other hand are redrawn every frame along with other HUD elements (such as weapon ammo and toolgun info) and after the world is drawn. For a game running at 60FPS that means that the game screen is being re-drawn 60 times every second. To keep at 60fps all the elements on screen, both the 3d game world and HUD elements, rendering updates need to be completed in under ~16.5ms. if you have a chip that takes 10ms to update, it leaves about 6ms for everything else and if it can't be done fast enough, your fps becomes lower (technically the world will render first then any time left over will be used by HUDs).
The reason the limit is in place is so that time-eating chips don't bring a lower end client to a crawl just because the player who made the chip has the hardware to support it's load (a GTX1080 could do rendering updates faster than say a 560Ti).