I'm trying to make a (simplified) version of the 1972 arcade game "Pong" in Stata but I've run into some difficulties. However, I'm not making pong in Stata because it is easy, but because it is hard.

The idea is write the program entirely in ado, and to use Stata's plotting library for the UI. The first sticking point is that the high level graphics function is too slow to capture the motion of the paddle and ball. I tried to draw the plot on the first iteration, then use 'display' to update the plot as the objects "move". It redraws much faster this way, but I don't appear to be able to use display to change the coordinates of the plotted objects. graph7 is fast enough for a flickery but functional UI prototype, but I don't like that its out of date. Still, I may be able to figure out how to consume the low level graphics stuff later.

The second sticking point is that there doesn't appear to be a good way to get Stata native keyboard interrupts for user input. Getting input from the keyboard or mouse seems much more difficult. I thought about writing a plugin for this but it would be cheating.

Any advice? The current source covers a few files and is a bit too much to post here but I'd gladly put it up on github if there were some interest. Everyone needs a hobby, right?