-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
Problem: too much js computation per frame makes things slow. We want to adapt our computation across different cpu speeds.
Detecting performance:
- don't detect; let user decide perf
- do a stress test when user first loads page
- save quality in localStorage
- realtime monitor framerate
Perf data modelling:
- "low" | "medium" | "high"
- "perf" slider number between 0-1 that represents how "fast" this machine goes
- two numbers - "cpu" speed and "gpu" speed.
- separate properties for: texture size, cpu speed, gpu speed, sfx on/off, etc.
How sketches actually implement quality:
- each sketch handles quality separately (e.g. through if/else checks), just looks it up from a service
- need sketches to adapt to changing quality values
- we provide a few APIs to make doing quality easier:
- "tunable number" - e.g. number of points in the particle system; write common logic to handle changing this number to adapt to the performance
- "job queue" - common API to break up all the computation into specific, 16ms-at-a-time portions.