Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger profiler on longer frames #172

Open
tehKaiN opened this issue Nov 12, 2022 · 1 comment
Open

Trigger profiler on longer frames #172

tehKaiN opened this issue Nov 12, 2022 · 1 comment

Comments

@tehKaiN
Copy link
Contributor

tehKaiN commented Nov 12, 2022

Suppose I'm making a 50fps game and it works 99% of time, but sometimes stuff executes longer due to unfortunate branches taken. It would be extremely cool to have some kind of way to inspect this.

Best solution (possibly related to #105):

  • make special mode where profiler starts to collect data as the game is running until canceled (watch out for memory/disk usage)
  • stop execution and show the graph if last frame exceeded desired execution time of game loop
  • bonus points if that special mode can be disabled/enabled in code (e.g. when asset loading has ended and game loop starts)

Not-so-good-and-probably-cumbersome-but-acceptable solution:

  • I'm coding a game so that it can replay inputs and replay is deterministic
  • somehow I get notified from the emulator that last frame execution took longer than expected
  • I change my game code and rerun it so that it triggers a profile on start of problematic frame
@BartmanAbyss
Copy link
Owner

Let me think a bit on this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants