Hi,
I'm working on several games in Perl with an ncurses interface. One is a
roguelike, where I need a constantly centered map view. The other is an
interactive fiction experiment with a scrolling message queue (it displays the
last X messages). For both I have been manually implementing scrolling, which
is fine. The actual drawing is done with addstr, addch, attron, and standend.
(I am using colors) However, on my machine (which is somewhat old, a 500Mhz AMD
K6 box) the lag is too annoying. Rewriting some parts of the code in C helped
slightly and profiling has shown that the main problem is that I'm forced to
completely redraw the window (with rows of messages or a 2D colored grid) every
move. My algorithm obviously isn't optimal, but it's the best I can think of.
What I'd like is to ask for examples of scrolling with ncurses. I've examined
Cdk (both versions) and other high-level interfaces without much success. In
short, how can fast scrolling (with color) be accomplished with ncurses? I've
read the manpage for setscrreg but can't seem to figure out even a basic way to
use this. Could anybody please help?
Thanks,
Breeg
(I would have posted to help-ncurses, but it seemed dead save the spambots.)