Modifying the game loop

As we mentioned previously, our main game loop is accountable for performing many tasks, including handling user events, handing the grid, checking possible moves, and so on. We have been making functions that will check such actions, movements, and environments, but we have not called them once, which we will do in this section. If you observe the main game loop from a high-level perspective, it will contain four primary architectural building blocks:

  • Creating the grid and handling movements of the game objects. For instance, what should be the speed of the objects that will fall down into the grid?
  • Handling user events. We have already done this, when we checked the events and rotated the objects accordingly. But ...

Get Learning Python by Building Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.