Change font and debug text + screenshots for world gen writeup.
authorStan_Lewry <stanley.jml@gmail.com>
Sun, 18 Jul 2021 09:46:21 +0000 (10:46 +0100)
committerStan_Lewry <stanley.jml@gmail.com>
Sun, 18 Jul 2021 09:46:21 +0000 (10:46 +0100)
Assets/m12.TTF [new file with mode: 0644]
Renderer.py
Texture.py
Writeup/rooms1.png [new file with mode: 0644]
Writeup/rooms2.png [new file with mode: 0644]

diff --git a/Assets/m12.TTF b/Assets/m12.TTF
new file mode 100644 (file)
index 0000000..ac4cc8b
Binary files /dev/null and b/Assets/m12.TTF differ
index 87ccbf3..210a58c 100644 (file)
@@ -43,25 +43,27 @@ class Renderer:
                         actualHeight))
 
     def renderDebugUI(self, player, deltaTime):
-        drawY = 0
+        drawX = 2
+        drawY = 2
+        spacer = 30
         headerSurf = Texture.font.render("PyRoguelike Debug Mode", False, (255,0,0))
         fpsSurf = Texture.font.render(f'{int(1 / deltaTime)} FPS', False, (255, 255, 255))
         playerPosSurf = Texture.font.render("Player Pos ({x},{y})".format(x=player.worldX, y=player.worldY),
                                                 False, (255, 255, 255))
-        self.screen.blit(headerSurf, (0, drawY))
-        drawY += 30
-        self.screen.blit(fpsSurf, (0, drawY))
-        drawY += 30
-        self.screen.blit(playerPosSurf, (0, drawY))
-        drawY += 30
+        self.screen.blit(headerSurf, (drawX, drawY))
+        drawY += spacer
+        self.screen.blit(fpsSurf, (drawX, drawY))
+        drawY += spacer
+        self.screen.blit(playerPosSurf, (drawX, drawY))
+        drawY += spacer
         infoSurf = Texture.font.render("Standing on:", False, (255, 255, 255))
-        self.screen.blit(infoSurf, (0, drawY))
-        drawY += 30
+        self.screen.blit(infoSurf, (drawX, drawY))
+        drawY += spacer
 
         for gameObj in World.world[int(player.worldY)][int(player.worldX)].objects:
             objSurf = Texture.font.render("{t}".format(t=gameObj.texture), False, (0, 0, 255))
-            self.screen.blit(objSurf, (16, drawY))
-            drawY += 30
+            self.screen.blit(objSurf, (18, drawY))
+            drawY += spacer
     
     def renderDebugRects(self, cam, zoomLevel):
         actualWidth = int(Texture.spriteSize * zoomLevel)
index e3acc14..64987e2 100644 (file)
@@ -5,7 +5,7 @@ pygame.font.init()
 gameFolder = os.path.dirname(__file__)
 spriteSheet = pygame.image.load(os.path.join('Assets', 'doomSheet.png'))
 animationSheet = pygame.image.load(os.path.join('Assets', 'animation.png'))
-font = pygame.font.Font(os.path.join('Assets','alagard.ttf'), 30)
+font = pygame.font.Font(os.path.join('Assets','m12.ttf'), 28)
 
 sheetWidth = spriteSheet.get_width()
 sheetHeight = spriteSheet.get_height()
diff --git a/Writeup/rooms1.png b/Writeup/rooms1.png
new file mode 100644 (file)
index 0000000..23d08d5
Binary files /dev/null and b/Writeup/rooms1.png differ
diff --git a/Writeup/rooms2.png b/Writeup/rooms2.png
new file mode 100644 (file)
index 0000000..a0d0623
Binary files /dev/null and b/Writeup/rooms2.png differ