Commits

Radomir Dopieralski committed d07e7f7

Started the player character chapter, some small error fixes

  • Participants
  • Parent commits 0f71648

Comments (0)

Files changed (4)

    tiles.rst
    main_loop.rst
    sprites.rst
+   player.rst
 
 Indices and tables
 ==================
+Player character
+================
+
+It's finally time to add a little bit of interactivity to this game. We will
+introduce a player character that walks around the map. But before we do that,
+we need to clean up our main loop a little bit, get rid of most of the globals
+and create a Game object.
+
+Main loop cleanup
+-----------------
 Animation
 ---------
 
-That map is getting updated at 15 frames per second, but we can't really see that because there is nothing moving. Lets fix that and add some animated monsters.
+That map is getting updated at 15 frames per minute, but we can't really see that because there is nothing moving. Lets fix that and add some animated monsters.
 
 We actually already have almost all that we need -- just need to extend the Sprite class a little bit::
 
         pygame.init()
         screen = pygame.display.set_mode((128, 98))
         screen.fill((255, 255, 255))
-        table = load_tile_table("tileset.png", 24, 16)
+        table = load_tile_table("ground.png", 24, 16)
         for x, row in enumerate(table):
             for y, tile in enumerate(row):
                 screen.blit(tile, (x*32, y*24))