Mind Over Magic

Mind Over Magic

View Stats:
d_fauss Aug 6, 2024 @ 5:25pm
Worker Thread Count
Has anyone utilized this feature by reducing the worker threads when experiencing periodic crashes? Curious what worked for you, or how you approached it, if you did.
< >
Showing 1-13 of 13 comments
Drakmour Feb 28 @ 12:54pm 
What this option even does?
Presumably it would modify the normally very internal detail of how many threads (potentially-simultaneous work streams) the game is running to perform certain tasks.

Kind of directly into the software engineering weeds, for the typical user.
Drakmour Feb 28 @ 1:16pm 
So it won't help with performance issues? :-) I thought maybe it's related to workers in game. :-D
SpoonMan Feb 28 @ 1:34pm 
sorry in advance for spalling and gramah errors.

@d_fauss

Find out how many physical cores your CPU has, subtract that by three, and see if that helps. If not then it might be a race condition only the dev might be able to fix (after sacrificing the intern to the dark lord).

@Drakmour probably way more than you want to know. Modern CPU's have multiple cores with cores inside them (only a little hyperbolic) that run code that after multiple layers does something you can see. Generally game development have 3 threads: one that coordinates everything from your key presses to calculating the "thoughts" and actions of everything, the second might not be as busy but its job is to keep ahead of you by loading sounds, graphics, and textures into memory, and the third is a quasi-thread which hoovers up all the textures and drawing instructions to pass them onto your GPU,

A lot of games give every entity (creature, craft bench, etc ) that has some sort of action a couple nanoseconds upto a millisecond to "think" and respond to player actions.

This worked and still works in a lot of games but games like Magic have a substantial amount of entities that need to think and then do something. At 90hz refresh rate, of the top of my head you have 11 milliseconds for everything to get a chance to think, do something, and then update the screen. For majority of cases that can be the equivalent of an eternity. But sometimes there is too much work for either a singlke CPU core, the operating system to load data into memory, and to get everything to the GPU on time. That's generally the cause for stuttering and screen tearing.

Threading when done well is freaking awesome. Instead of your main game thread having to do everything it can spin up a thread which can take over some of the work of processing entities think phase and then in some cases they leave a message on a stack telling the main game process (I moved here or draw me so the player sees I did something).

If done right, a multi-threaded game can do a lot more in the little time it has to render the next frame. Meanwhile if done wrong or just a little wonky, a thread can be like a cat that jumps up on your desk and knocks over your drink while somehow deleting all the work you did in the last hour.
Last edited by SpoonMan; Feb 28 @ 1:38pm
Drakmour Feb 28 @ 1:45pm 
Yeah, I got about the simultanious "thinks", more cores is better. Just the game already stays at 3 by default, I don't think switching it to 0 will help if I already have very few cores on my PC. :-D
Originally posted by Drakmour:
So it won't help with performance issues? :-) I thought maybe it's related to workers in game. :-D
In theory, it could, if the game is using a bad number for your system somehow - but you'd probably need to basically change the number and see what happens. (And so would I if I was messing with it. Decent chance even the game's devs would.)

It almost certainly has no direct correlation to in-game mages doing jobs.


Setting it to zero would probably either not be respected or break the game. Also, I doubt your computer actually has that few cores unless you're running the game on a graphing calculator?
Drakmour Feb 28 @ 2:25pm 
Originally posted by ulzgoroth:
Originally posted by Drakmour:
So it won't help with performance issues? :-) I thought maybe it's related to workers in game. :-D
In theory, it could, if the game is using a bad number for your system somehow - but you'd probably need to basically change the number and see what happens. (And so would I if I was messing with it. Decent chance even the game's devs would.)

It almost certainly has no direct correlation to in-game mages doing jobs.


Setting it to zero would probably either not be respected or break the game. Also, I doubt your computer actually has that few cores unless you're running the game on a graphing calculator?
I tried to switch the thread count but nothing changed.
And I think I can call my PC a calculator nowadays cuz it's quite old. I got 2047MB NVIDIA GeForce GTX 1060 6GB (Gigabyte), 16,0 RAM, Intel Core i5 3570 @ 3.40GHz, latest drivers, SSD.
SpoonMan Feb 28 @ 2:27pm 
Originally posted by ulzgoroth:
Originally posted by Drakmour:
So it won't help with performance issues? :-) I thought maybe it's related to workers in game. :-D
It almost certainly has no direct correlation to in-game mages doing jobs.

It looks like the game dev's are big fans of ONI as they took a lot of inspiration from it and likely listened to ONI's regrets or alternative ideas. Unlike ONI I haven't seen any entities randomly space out for a couple seconds or more until they get the time to find a task and a path to it.
SpoonMan Feb 28 @ 2:32pm 
Originally posted by Drakmour:
Originally posted by ulzgoroth:
In theory, it could, if the game is using a bad number for your system somehow - but you'd probably need to basically change the number and see what happens. (And so would I if I was messing with it. Decent chance even the game's devs would.)

It almost certainly has no direct correlation to in-game mages doing jobs.


Setting it to zero would probably either not be respected or break the game. Also, I doubt your computer actually has that few cores unless you're running the game on a graphing calculator?
I tried to switch the thread count but nothing changed.
And I think I can call my PC a calculator nowadays cuz it's quite old. I got 2047MB NVIDIA GeForce GTX 1060 6GB (Gigabyte), 16,0 RAM, Intel Core i5 3570 @ 3.40GHz, latest drivers, SSD.

Yeah you're bound on everything but file read speed. Definitely time to start saving for an upgrade but use this as a guide https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam You don't need the super latest and most priciest, just look what most people have and aim for that. One exception, I recently broke away from Intel and am happy with my AMD Ryzen 7
Originally posted by Drakmour:
Originally posted by ulzgoroth:
In theory, it could, if the game is using a bad number for your system somehow - but you'd probably need to basically change the number and see what happens. (And so would I if I was messing with it. Decent chance even the game's devs would.)

It almost certainly has no direct correlation to in-game mages doing jobs.


Setting it to zero would probably either not be respected or break the game. Also, I doubt your computer actually has that few cores unless you're running the game on a graphing calculator?
I tried to switch the thread count but nothing changed.
And I think I can call my PC a calculator nowadays cuz it's quite old. I got 2047MB NVIDIA GeForce GTX 1060 6GB (Gigabyte), 16,0 RAM, Intel Core i5 3570 @ 3.40GHz, latest drivers, SSD.
Your CPU model is old enough to be in middle school, but it's still got 4 cores if my lookup is accurate. You gotta go further back than that before core counts bottom out.
Drakmour Feb 28 @ 2:37pm 
Originally posted by SpoonMan:
Yeah you're bound on everything but file read speed. Definitely time to start saving for an upgrade but use this as a guide https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam You don't need the super latest and most priciest, just look what most people have and aim for that. One exception, I recently broke away from Intel and am happy with my AMD Ryzen 7
The reason why I can't upgrade cuz one little thing drags more and more upgrades. If I want to change CPU I need to change the motherboard, then I need to upgrade power cell and so on, so on until the price becomes unbearable atm for me. :-D
SpoonMan Feb 28 @ 3:50pm 
Originally posted by Drakmour:
Originally posted by SpoonMan:
Yeah you're bound on everything but file read speed. Definitely time to start saving for an upgrade but use this as a guide https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam You don't need the super latest and most priciest, just look what most people have and aim for that. One exception, I recently broke away from Intel and am happy with my AMD Ryzen 7
The reason why I can't upgrade cuz one little thing drags more and more upgrades. If I want to change CPU I need to change the motherboard, then I need to upgrade power cell and so on, so on until the price becomes unbearable atm for me. :-D

I was in the same boat and just made a grocery list and then took a bit more than a year to get it all. Seriously scary moment when I put it all together and at first it didn't turn on.
Drakmour Feb 28 @ 4:01pm 
Originally posted by SpoonMan:
Originally posted by Drakmour:
The reason why I can't upgrade cuz one little thing drags more and more upgrades. If I want to change CPU I need to change the motherboard, then I need to upgrade power cell and so on, so on until the price becomes unbearable atm for me. :-D

I was in the same boat and just made a grocery list and then took a bit more than a year to get it all. Seriously scary moment when I put it all together and at first it didn't turn on.
Hmmm. Yeah, good point to get one piece by one when I have spare money at least for 1 item, rather than to collect all the sum at once. Thanks. Somehow I didn't even think about it. XD
< >
Showing 1-13 of 13 comments
Per page: 1530 50