Hi faustf,

as far as I know the compiler already creates multiple threads by itself. Manually dealing with multiple threads is very complicated. But if you want to break your code manually into multiple threads you may use:

Code
CreateThread(0, 0, my_function, 0, 0, NULL);


With my_function executed in another thread. More about the CreateThread can be found here. I did not deal with multiple threads by now, so maybe I am still missing something here.

And perhaps as advice since this was posted in "Staring with Gamestudio": Usually other means to make your code faster are better and easier to accomplish than multithreading.

Last edited by Jerome8911; 02/19/21 23:25.

Visit my indieDB page for Tactics of World War One

Or download Scheherazade's Journey, made for the A8 Winter 2020 Game Jam