[cmds] Port ttypong to ELKS #1864
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a final tty game before the v0.8.0 release, mostly to test the ELKS curses library (which worked for the most part for this port),
ttypongis now running on ELKS.The per-frame output routine had to be rewritten, much like
slrunning extremely slowly as discussed in #1619 (comment) until it was rewritten. ELKS just can't process the huge amount of ANSI escape sequences our mini version of curses spits out.Tested only on QEMU. The default inter-frame delay is 40000 usecs, which can be changed to be half that using
ttypong 20000for instance, to speed things up. It would be interesting to see how fast this runs on real hardware.Unfortunately, at the moment
ttypongis only available on the 2880k disk image, as the 1440k only has ~10k bytes left, andttypongis 11k. Speaking of which, all these ncurses-based games are huge, compared to what ELKS is used to.Here are the current sizes of the tty games and
fm, which also uses curses:Use the up/down arrow keys or
handjto move the racket, andqto quit.