I once made simulation that calculated planets temperature for every polygon depending on distance to sun, heat emission, heat absorption and other properties. But it is rather limited in size. So I’ve been thinking of ways how to improve calculation time. Splitting calculations into smaller chunks per tick, is a good choice but it would increase overall time.
Multiprocessing seems to be a good way to solve that. But BGE doesn’t work hand in hand with multiprocessing.
So I thought to make separate program that runs in background, receives needed data (lists of numbers, nothing blender specific) and does all calculations using multiprocessing. This program should communicate to BGE via sockets.
Would this be a good solution? Would it give improvement in time? Is sending data via sockets fast enough? Is there any better way?
I don’t know how to work with sockets, yet. So I’m wondering is it worth spending time to learn it.