Marshmallow Bear /
Multi-threading, network, and new Profiler
![]() Admin 2024-11-07 15:12:00 +0000 UTC Post #1 Posts: 28 |
We’ve been hard at work on the game engine as we are continuously developing games on it. The benefit of using our game engine for things like retro sketch is that it automatically gets the benefits that we add to the engine. ThreadingI’m still surprised at the great performance that we were able to achieve on a single thread. That being said, we have now moved into the multi threaded world. When our average frame rate in something like retro sketch is less than half a millisecond to draw absolutely everything on a single thread, you could imagine the numbers we’re getting now. We have developed a thread graph that allows us to execute groups of work and wait upon that work when needed. The thread graph used a pool of threads each with their own unique id. These threads are long lived so that their identifier stays the same, and we can track the performance of specific threads.NetworkingOur game engine previously had multiple forms of networking, but we have finally consolidated the dated them into a single networking library. This is a thin layer that sits inside of the engine that we abstract up for individual games. The networking system provides the ability to host a master server so that clients can connect to each other peer to peer using an identifier. This master server also facilitates any of the NAT hole punching that we have to do for UDP. Currently, the networking is working in our prototype game that we are actively testing. Though we could activate the networking code for multi-player support in Retro Sketch, but at this time we feel that is more of a gimmick than something we, or others, would actually use.Profiler and profilingAnd this time we have also developed an in-house profiler that works using our engine. The engine can output hundreds of thousands of points of data that need to be plotted in real time so that we can review them visually. This required us to overhaul our UI system and remove any inheritance that we were previously doing. The I system now also does not have any pointers to external data that is related to internal properties of the UI. This makes it so that we can have hundreds of thousands of ui elements without greatly hurting performance. I have tested this on my integrated gpu laptop and the performance is outstanding thus far. |
You must be logged in to post.