This commit is contained in:
Waylon Walker 2023-07-01 13:51:57 -05:00
parent 32c78767df
commit c3b1f40a58
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
3 changed files with 46 additions and 25 deletions

View file

@ -36,7 +36,7 @@ class Client:
self.menu = Menu(self)
self.map = Map(self)
self.light = Light(self)
self.font = pygame.font.SysFont("", 50)
self.font = pygame.font.SysFont("", 25)
self.joysticks = {}
self.darkness = pygame.Surface(
(self.screen.get_width(), self.screen.get_height())
@ -62,10 +62,10 @@ class Client:
return self._ws
def run(self):
# from pyinstrument import Profiler
from pyinstrument import Profiler
# profiler = Profiler()
# profiler.start()
profiler = Profiler()
profiler.start()
while self.running:
console.print("running")
console.print("handle_events")
@ -80,8 +80,8 @@ class Client:
Console().print(self.clock.get_fps())
console.print(f"time: {time}")
console.print(f"ticks: {self.ticks}")
# profiler.stop()
# print(profiler.output_text())
profiler.stop()
print(profiler.output_text())
self.quit()
def quit(self):