Quote from: Kiame on October 06, 2017, 01:14:15 PMQuote from: FrodoOf9Fingers on October 05, 2017, 07:35:20 PM
Heh, I guess we derailed too much
I should have known better, i just really like the idea of multithreading
Just curious, since we have a thread for this now, where's the multi-threading happening? My initial go at this would be to have the rendering engine be one thread and the backend/updating part broken down into multiple consumer threads with some type of load balancing (round robin probably assuming everything takes about the same amount of time to update)
I don't have the ability to really profile the code and see where it's needed, so I'm just doing at the main game update loop. In particular, I'm splitting threads in the TickList.Tick method. In there, there's a list of every object that has some update to do during a tick. In single threaded mode, it loops through each one. Currently, I make 8 threads (subject to change) that take an object, do it's tick work, and then return and grab the next one. It's using a thread pool too, so no need to worry about constant instantiation of threads.