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?
Related Posts with Is it possible to make the computer game "pong" in stata?
creating a dummy variable based on percentageIn the following sample dataset the house election result in United States are given from 2002-2020.…
Editing graph with a TIFF fileHi everyone, Trying to find out if there's a way for me to edit my graph using stata's graph editor…
using newey west for heteroskedasticity and autocorrelation in vecmSo, I am trying to run a regression that requires me to log and take the first differences of it to …
local macro text with line breakHi there Does anyone know if there is a way to spread the text contents of a local macro across mul…
pweight with melogitI have a Panel dataset with 260,647 data points consisting of 260,647 Respondents within 43,400 hous…
Subscribe to:
Post Comments (Atom)
0 Response to Is it possible to make the computer game "pong" in stata?
Post a Comment