I’ve programmed Whack-A-Mole on my own graphic calculator Ti-83 plus using native Ti-Basic language when I was in grade three of senior school.

All interactions and cutscenes are animated in this game. It has complete health, scoring, and reward system while difficulties increase with gaming time. Moreover, a high score list is permanently recorded.

This may not be the most creative or technical one of all my previous works, but it is the proudest one. This experience makes me understand that a considerable number of small steps can make a vast and complicated job been finished.

Although the whole project seems immature from today’s perspective. There are still many obstacles to this work had been solved then, such as the low performance of the central processing core and screen refreshing frame rate, the lack of multi-thread and asynchronous mechanism, unfriendly native code editor and debugger, limited numeric and string-type variable, etc.

I used a mechanism that wipes dead objects and prints new ones instead of preparing the whole screen at every frame, which enabled me to overcome performance problems. The way I wipe dead objects is using a native API called “Text” to overwrite spaces on original objects, which leverages the ease and speed of primitive operation.

Furthermore, I introduced list variables to storage pixel pictures of different objects and key-map-functions, sub-program to increase code reusability and readability, synchronous timmer subprocess to implement animation and control the rhythm of the game.

Please enjoy the following video and share my excitement.

Demo Video

More information at zhihu.com