Why is a “main” game loop necessary for developing a game?

前端 未结 11 1818
自闭症患者
自闭症患者 2020-12-23 13:52

I find that most game development requires a main game loop, but I don\'t know why it\'s necessary. Couldn\'t we implement an event listener and respond to every user action

11条回答
  •  时光说笑
    2020-12-23 14:09

    It's not true that all kind of games require a dedicated main game loop.

    Action games need such a loop due to frequent object updates and game input precision.

    On the other hand, I implemented a minesweeper game and I used window
    messages for the notifications.

提交回复
热议问题