Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added structure to Game Loop chapter.

  • Loading branch information...
commit 6fb4b02b099ebd57fa3f9df4dd5db0cb7d4d1365 1 parent 18b1c40
@kthakore kthakore authored
Showing with 29 additions and 16 deletions.
  1. +5 −4 Makefile
  2. +24 −12 src/04-game.pod
View
9 Makefile
@@ -10,10 +10,11 @@ ifneq "$(TEST)" ""
else
BOOK = build/SDL_Manual.$(PAPER)
CHAPTERS = \
- src/preface.pod \
- src/first.pod \
- src/drawing.pod \
- src/events.pod
+ src/00-preface.pod \
+ src/01-first.pod \
+ src/02-drawing.pod \
+ src/03-events.pod \
+ src/04-game.pod
endif
default: prepare pdf clean
View
36 src/04-game.pod
@@ -1,20 +1,32 @@
-=head0 The Basics
+=head0 The Game Loop
-Making a screen:
+=head1 Simplest Game Loop
-=begin programlisting
+=for programlisting
- use SDL:
- use SDLx::App;
+ while($quit)
+ {
+ do_events();
+ calculate_next_positions();
+ render();
+ }
- SDLx::App->new();
-
- sleep( 2 );
-
-=end programlisting
+=for programlisting
-This makes a screen as below:
+=head2 Problems
-WIP
+=head1 Fixed FPS
+
+=head2 Problems
+
+=head1 Variable FPS
+
+=head2 Problems
+
+=head1 Integrating Physics
+
+=head2 Problems
+
+=head1 Learn More
=for vim: spell
Please sign in to comment.
Something went wrong with that request. Please try again.