Refactor rendering and throttle based on backlog

- Refactor rendering and metrics emission in ClientGameRunner to ensure updates occur only after all processing is complete
- Throttle renderGame() based on the current backlog
This commit is contained in:
scamiv
2025-11-25 18:46:25 +01:00
parent 6ab7136c3c
commit 7cf024fb6e
3 changed files with 66 additions and 21 deletions
+7
View File
@@ -136,6 +136,13 @@ export class TickMetricsEvent implements GameEvent {
) {}
}
export class BacklogStatusEvent implements GameEvent {
constructor(
public readonly backlogTurns: number,
public readonly backlogGrowing: boolean,
) {}
}
export class InputHandler {
private lastPointerX: number = 0;
private lastPointerY: number = 0;