How to play VT100 animations

  • Thread starter Deleted member 10519
  • Start date
D

Deleted member 10519

Guest
Ok, it might be a stretch to ask this is the multimedia section...

Over at textfiles.com there are VT100 animations, which appear to be text files that can be played like primitive movies. I've tried to view the files with `cat`, but they whiz by at unviewable speed.

Can anyone tell me how to view the animations properly?
 
Download the file, and feed it to a program that delays between each character, like this (tested):

vtplayer
Code:
#!/usr/bin/env ruby

pausetime = 0.0005

vtfile = IO.read(ARGV[0])
$stdout.sync = true
vtfile.each_char do |char|
  print char
  sleep pausetime
end
% chmod +x vtplayer
% ./vtplayer /tmp/bambi.vt

You may have to adjust the pausetime value.
 
To see the final result, just cat the file on a console, using the page code 437:
$ cat xmas-07.vt

To solve the prompt problem on some files (your new prompt will overwrite the last line:
$ cat xmas-07.vt ; echo ""

So what we need is a new slowcat command with a little sleep after some position/delete control codes.

By the way, the best results I were able to get were with PuTTY:
vt100-xmas-07.png
 
Indeed, your script is nice wblock!

Do you think it would be interesting to offer a telnet server allowing to select one of those files and playing it?
 
Dereckson said:
Indeed, your script is nice wblock!

Do you think it would be interesting to offer a telnet server allowing to select one of those files and playing it?

Maybe. Although most of these get old fairly quickly, like aalib.

It should be possible to get Firefox to use vtplayer as a "Helper Application", running it in an xterm:

Code:
xterm -bg black -fg green +cm -e 'vtplayer "$1"; read x'

For maximum realism, that's a greenscreen supporting color if the file has color sequences. To simulate 1200 baud, pausetime should be .007 or .008. It appears that sleep has a minimum time higher than that.

I can't recall exactly where to set this in Firefox; extensions.rdf?.
 
Dereckson said:
Speed seems also to depends from the file.

sship.vt requests a 400ms sleep time (0.0000004) to play smoothly.

Maybe you mean 400 microseconds? Where did you find that?
 
Cheers, wblock. Your program worked a treat. I found there is also a program in ports, sysutils/throttle that rate limits data passed from standard input to standard output.

% throttle -s 1 -b 9600 <globe.vt
 
Back
Top