Years ago I cobbled up a web-based version of the timeless classic, the addictive video game Tetris. Now I'm starting again from scratch. Programming an AVR microcontroller makes the matter slightly more difficult/interesting. My motivation was to re-use the monochrome Liquid-Crystal Display of a twentieth century cell phone, the Nokia 5110.
Its bare-bones resolution of 84*48 sufficed for the tetraminos to look half decent. But the initial tests proved disappointing. There was a visible flicker as the blocks moved down the screen. I assumed it had something to do with the code. Perhaps storing the bitmaps in flash memory was too slow? Or some routines in the Adrafruit_GFX library sucked? I tried different things, without changing the outcome one bit.
I even tried with a different monochrome display. Exactly the same result. Then it hit me. The issue was not the software, but the hardware. In the datasheet of the second display, the response time is stated: 200 to 300 milliseconds. Pretty awful. It's the time pixels take to fully turn on or off. Meanwhile, a tetramino falling at 40 pixels/second has already traveled far. In consequence, the display is simply incapable of showing a sharp image at this speed. The response time should be at least five times smaller to make it enjoyably playable.
No comments :
Post a Comment