I took a stab at reinventing the wheel a day or two ago. Using Python 3 and a version of curses for Windows, I made a crude little "video player", which is really more like an animation player.

from curses import *
import time
def m(s):
   def x():
      nonlocal r,c
      if (r!=r%R)+(c!=c%C):j=(r+1-(c<0)*2)*(c!=c%C)-(r<0);c=((c+1-(r<0)*2)*(r!=r%R)-(c<0))%C;r=j%R
   def d(l):nonlocal r,c,H;s.addstr(r+2,c*2+2,'  ',color_pair('0123456789abcdef'.find(l)));r+=H;c+=1-H
   resizeterm(R+3,C*2+4);curs_set(0);s.addstr('Hello, World!')
   for i in range(1,16):init_pair(i,0,i)
   while w:
      for f in F:
         while P<len(f):
            if b=='=':r=int(f[P+1:P+3]);c=int(f[P+3:P+5]);P+=4
            elif b=='*':
               for i in range(int(f[P-2:P])):
                  if p in '< >':c+='< >'.find(p)-1
                  elif p in '^ V':r+='^ V'.find(p)-1
            elif b in '< >':c+='< >'.find(b)-1
            elif b in '^ V':r+='^ V'.find(b)-1
            elif b in '-|':H=b=='|'
         if s.getch()>=0:w=0;break

This is the player after I "golfed" it. It takes video data that is R rows and C columns from F, and outputs it to the terminal. The data is interpreted like this:
Before drawing the frame, the cursor is set to the top left corner, and the drawing direction is horizontal.
If it finds a hex digit from 0 to f, a pixel is drawn at the current cursor position that is that color, and the cursor is advanced.
If it finds <, >, ^, or V, the cursor is moved in that direction, with wrapping. Wrapping down or right cause the column or row to increment, and wrapping up or left causes the column or row to decrement.
If it finds - or |, the drawing direction is changed to horizontal or vertical, respectively.
If it finds *xxy, y is done xx times. Only raw data and cursor movement can be repeated.
If it finds =xxyy, the cursor position is set to row xx and column yy.
If it finds #, the current frame is displayed to the screen, and the cursor and drawing direction are reset.

The video I have loaded now is a "Hello World" demo (a globe that says "HELLO"). One can change the R, C, and F values to whatever they want for their own custom video. Please let me know if you figure that much out.

Test this out on your own system! If it doesn't work, let me know.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum