Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a good Perl module to do portable terminal animation (with ASCII art)? Something that will work with Bash, Korn, MS-DOS and other shells?

I want to be able to do something along the lines of what nethack does, deviding the screen up into three different regions, writing stuff to the top and bottom parts and drawing ASCII art in the middle.

How could I do something similar from Perl in a portable way?

Replies are listed 'Best First'.
Re: Portable Terminal Animation
by radiantmatrix (Parson) on Oct 18, 2004 at 13:27 UTC

    I haven't tested it on Win32, but I believe it works there as well: Term::Visual. It provides a split-screen visual terminal as a POE component, making it easy to integrate into a nethack-like application.

    Please let me know if try it with any success on Win32.

    radiantmatrix
    require General::Disclaimer;

      Term::Visual is great, but it probably doesn't work with ActivePerl. Not only does it use Curses, but it attempts to select() on STDIN. Four-argument select() only works on sockets in ActivePerl.

      You may get more mileage out of Cygwin, however. I have heard it can select() on things other than sockets.

      -- Rocco Caputo - http://poe.perl.org/

Re: Portable Terminal Animation
by Anonymous Monk on Oct 18, 2004 at 06:17 UTC
    Curses
      Does that really work in DOS (presumably means Win32 console), an explicit requirement? Also, the CPAN test results are not too encouraging: 1.06 (11 FAILs, 3 PASSes, 8 UNKNOWNs). I didn't delve into the severity of the failures. Win32 wasn't even attempted.
        Depends on curses library, which are not fully ported. console programming done using assembler, hard to reference and low interest.
        1.06 is old
Re: Portable Terminal Animation
by chanio (Priest) on Oct 19, 2004 at 05:28 UTC
    Text::JavE is a sort of ASCII movie making called jMOV done in JavE. You could also install JavE (that works in multiplatform JAVA with a stdrd.JRE) from here: http://www.jave.de/.

    A very good alternative to follow the ASCII art tradition without working too hard.

    I haven't tried the PM, yet, though.

    .{\('v')/}
    _`(___)' __________________________
    Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established.