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)
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()