events - Biggest beef with game loops -


what hate modern game loop? can game loop improved or there better alternative, such event-driven architecture?

it seems ought cw...

i'm taking grad-level game engine programming course right , they're sticking game loop approach. granted, doesn't mean it's only/best solution it's logical. using loop allows ensure game systems turn run without requesting own timed interrupts or else. control can centralized: in current project, have gamemanager class that, each frame, loops through update(float deltatime) function every registered object in turn. don't have debug event system or set timed signals, use loop call series of functions. no muss, no fuss.

to answer question of hate most, loop approach logically lend liberal use of inheritance , polymorphism can bloat size/complexity of objects. if you're not careful, can mild-to-horrible pitfall. if careful, may not problem @ all.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -