From: Stan_Lewry Date: Sun, 18 Jul 2021 09:46:21 +0000 (+0100) Subject: Change font and debug text + screenshots for world gen writeup. X-Git-Url: https://stanlewry.com/index.cgi?a=commitdiff_plain;h=cc9eb9bc17e175c228aa3bb543d7ca4b100170a0;p=pyroguelike.git Change font and debug text + screenshots for world gen writeup. --- diff --git a/Assets/m12.TTF b/Assets/m12.TTF new file mode 100644 index 0000000..ac4cc8b Binary files /dev/null and b/Assets/m12.TTF differ diff --git a/Renderer.py b/Renderer.py index 87ccbf3..210a58c 100644 --- a/Renderer.py +++ b/Renderer.py @@ -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) diff --git a/Texture.py b/Texture.py index e3acc14..64987e2 100644 --- a/Texture.py +++ b/Texture.py @@ -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 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 index 0000000..a0d0623 Binary files /dev/null and b/Writeup/rooms2.png differ