Hi! I semi recently started trying to develop homebrew wii games and so far it seems quite fun! I'm in the middle of making a small multiplayer game and have got player movement and some really rudimentary physics working. In the game I would like items to spawn at random intervals (meaning like every 10 seconds lets say) and was wondering how I could accomplish this without stopping the whole program? I could try and take advantage of the fact that it takes some time for each loop of the code to run and try and have it update based off that but that seems not so reliable. I would prefer to use a function like sleep(10) but if I do that the whole program will stop. I then thought that I could try multithreading but I can't get the windows api or pthread to work. Does anyone have experience with this that would be able to help? I feel like waiting for something to happen is common in video games but I couldn't find anything about it for wii homebrew online yet.
Thanks for any help!!
Thanks for any help!!