From 1649bb6dc9b6fb4be2d8ac01088dec52dec285a5 Mon Sep 17 00:00:00 2001 From: Roz K Date: Thu, 29 Dec 2022 14:36:30 +0100 Subject: [PATCH] Run forever. --- game/game.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/game.py b/game/game.py index 2d6001b..e90597a 100644 --- a/game/game.py +++ b/game/game.py @@ -37,7 +37,7 @@ proj_ratio = 16.0 / 9.0 proj_near_z = 8.0 proj_far_z = 3000.0 -sun_direction = math.vec3_normalize((1.0, 0.0, 1.0)) +sun_direction = math.vec3_normalize((1.0, 0.0, 0.5)) sun_power = 1.0 def main(): @@ -162,6 +162,7 @@ def main(): print("Running... Ctrl+c to quit") start_time = time.monotonic() current_time = 0.0 + frame = 0 frame_min = 10000.0 frame_max = 0.0 frame_avg = 0.0 @@ -170,7 +171,7 @@ def main(): draw_avg = 0.0 perf_count = 0 try: - for frame in range(10000): + while True: current_time = time.monotonic() - start_time frame_begin = time.thread_time() @@ -250,6 +251,7 @@ def main(): frame_max = max(frame_max, frame_ms) frame_avg += frame_ms perf_count += 1 + frame += 1 except KeyboardInterrupt: pass