Multithread the AI and pathfinding!

Started by hoochy, March 24, 2016, 11:21:47 PM

Previous topic - Next topic

hoochy

Rimworld should allow those of us with many CPU cores to be able to utilize them, which is more important on bigger maps and with more units.

I know the default Unity pathfinding is extremely poor at utilizing a CPU correctly but it is possible within the Unity framework to multithread pathfinding and other aspects of the AI. Though depending on how the game is written it may be a major effort to utilize more threads. Given how the game is currently I have the feeling you may regret having based the game on Unity, like most successful projects do that get to a certain size.

So I acknowledge that it may never be done because of the potential big effort required, rewriting a lot of the game may not pay off in terms of sales. But since this game isn't on steam yet I thought I might put the idea forward as it could open the game up to an even bigger audience and allow you to be more creative in the final game you deliver. At the very least it will allow mods to do more which will also increase sales. A game like Factorio which had a pretty cult following still ended of doubling its sales , in a 4week period, by going to steam, but you may still get that without the effort of rewriting a lot of it too, so I understand its probably not high on the priority list.

I have done a lock step multithreaded RTS within unity 5 so I am aware of quite a lot of its shortcomings and may be able to offer some advice, if wanted, even on multiplayer if that is a direction you are going. Thanks for a great game anyhow!

Toggle

Selling broken colonist souls for two thousand gold. Accepting cash or credit.

hoochy

Thanks for linking that thread. It seems Rimworld would likely get some boost just upgrading to Unity 5 then, if it is still on Unity 3. Not 100% sure on that one as it would depend upon how Tyrian has coded it. My main background is C++, with a heavy focus on state systems and multithreading like that found in games. I can't really see what parts of Unity RimWorld is using extensively that it couldn't do itself and have more control over. Either way Tyrian has been devving RimWorld for 3+? years and is probably getting tired of it, I know I would. So suggestions like this are probably pointless! :)

kobar

Maybe, alpha 14 will be updated to unity 5 support?