Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Game engines do not own their main loop anymore either. A lot of host platforms are event based now, including ios, macos, android, web, and to a lesser extend windows. This means you tell the host ‘call this function every X milliseconds’. This also means you do not have full control of a main loop and you get event calls. It is moving more towards event based like in web:) it prevents lockups


But even in that scenario, you have a main function that is called under a deadline, no? You don't necessarily set the heart beat, but you do have a specific method that is called over and over.

That is, yes, I shouldn't have mentioned the "main" method. You don't even necessarily want to own the main loop, if you will. The logic that you do every iteration of the loop, though, is something you will almost certainly see in most games. I don't think I've seen many (any?) applications where you could identify the main loop logic. Is typically spread out over god knows how many locations in the code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: