pymunk_demo_platformer_02.py Diff

pymunk_demo_platformer_02.py
--- C:\Users\craven\Desktop\WebServer\arcade\doc\tutorials\pymunk_platformer\pymunk_demo_platformer_01.py
+++ C:\Users\craven\Desktop\WebServer\arcade\doc\tutorials\pymunk_platformer\pymunk_demo_platformer_02.py
@@ -1,13 +1,29 @@
 """
 Example of Pymunk Physics Engine Platformer
 """
+import math
+from typing import Optional
 import arcade
 
 SCREEN_TITLE = "PyMunk Platformer"
 
+# How big are our image tiles?
+SPRITE_IMAGE_SIZE = 128
+
+# Scale sprites up or down
+SPRITE_SCALING_PLAYER = 0.5
+SPRITE_SCALING_TILES = 0.5
+
+# Scaled sprite size for tiles
+SPRITE_SIZE = int(SPRITE_IMAGE_SIZE * SPRITE_SCALING_PLAYER)
+
+# Size of grid to show on screen, in number of tiles
+SCREEN_GRID_WIDTH = 25
+SCREEN_GRID_HEIGHT = 15
+
 # Size of screen to show, in pixels
-SCREEN_WIDTH = 800
-SCREEN_HEIGHT = 600
+SCREEN_WIDTH = SPRITE_SIZE * SCREEN_GRID_WIDTH
+SCREEN_HEIGHT = SPRITE_SIZE * SCREEN_GRID_HEIGHT
 
 
 class GameWindow(arcade.Window):