Commit Graph

9 Commits

Author SHA1 Message Date
Josh Goebel 993877b641 fix frame timing
previosly timing was calculating the next frame based on now + duration
when the correct timing should have been last_frame + duration.

This would have the effect of slowing the game down the higher your CPU
usage.  A 0% CPU usage game would  play at the request frame rate,
but a 100% CPU usage game would play at only half the requested frame rate.

(RR is render time below)

Timing with the bug:
60FPs requested, 35FPs actual, 3 frames, 87ms.
|         29ms         |         29ms         |         29ms         |
| RR 12ms + 17ms sleep | RR 12ms + 17ms sleep | RR 12ms + 17ms sleep |

Timing after the fix:
60FPs, 60FPs actual, 3 frames, 51ms.
|       17ms      |       17ms      |       17ms      |
| RR 12ms + sleep | RR 12ms + sleep | RR 12ms + sleep |

After this fix you may need to change your games timing mechanics or
adjust your frame rate (to slow things back down). Your game will run
faster after this fix, even if you were using "100% CPU" before.
2016-05-26 17:19:18 -04:00
Josh Goebel 390e5919dc break out printing into separate class (-2,014 bytes)
- stated savings is for any graphics only programs
  not using the printing code at all
2016-05-26 17:19:18 -04:00
Josh Goebel 6d13d7cb43 faster drawFastHLine from Adafruit SSD1306 lib
- +32 bytes for faster line rendering
2016-05-26 17:19:18 -04:00
Josh Goebel 37cae4704b remove beginNoLogo, do not deprecate 2016-05-26 17:19:17 -04:00
Josh Goebel 6ff1c13b22 we already have a minimal begin, it's boot() 2016-05-26 17:19:17 -04:00
Josh Goebel c25668de0e move utils back into begin() until we have more 2016-05-26 17:19:17 -04:00
Josh Goebel eb5fb39e28 minimal boot mode to save flash space 2016-05-26 17:19:17 -04:00
Josh Goebel 1e95b4edfe [spacing] remove extra spaces 2016-05-26 17:19:17 -04:00
Arduboy 982175ecac Squash commits up to Arduboy V1.1 release 2016-05-26 17:18:33 -04:00