Browse files

Explanation of basic game loop

  • Loading branch information...
1 parent 49f25f3 commit 12e32c23fdc82b923610de7dbd9b848c301139c8 @kthakore kthakore committed Oct 4, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/04-game.pod
@@ -2,17 +2,22 @@
=head1 Simplest Game Loop
+The simplest game loop can be boiled down to the following.
=for programlisting
- do_events();
+ get_events();
=for programlisting
+In C<get_events()> we get events from what input devices that we need. It is important to process events first to prevent lag.
+In C<calculate_next_positions> we update the game state according to animations and the events captured. In C<render()> we will update the screen and show the game to the player.
=head2 Problems
Not good.

0 comments on commit 12e32c2

Please sign in to comment.