1. How to...?

Howdy, y'all.

I'm creating a program where I need many lines of text... IOW, I need more
than your basic text screen.

I'm using video = graphics_mode(x) right now, but the screen flickers
horrendously when I "puts" text to it.

I'm thinking of using GFX or the ModeX libraries, but I'd like your
comments on which one to use. I'm going to need multiple windows. Is there
a package out there or a combination of packages that will work wonderfully
for me?

Thanks in advance!
ck

new topic     » topic index » view message » categorize

2. Re: How to...?

>I'm creating a program where I need many lines of text... IOW, I need more
>than your basic text screen.

    You could try modes with more lines.. ?

>I'm using video = graphics_mode(x) right now, but the screen flickers
>horrendously when I "puts" text to it.

Dunno why..

>I'm thinking of using GFX or the ModeX libraries, but I'd like your
>comments on which one to use. I'm going to need multiple windows. Is there
>a package out there or a combination of packages that will work wonderfully
>for me?

Well, GFX isn't the fastest out there, but its interface should be very
perfect for you. But with ModeX you can use more of you video memory (that
is lost with GFX)

A simple example:

sequence win1, win2, object1

win1 = MakeVS ({200,200},VS_TYPE_MEMORY)         -- Memory is the fastest in
most cases.
win2 = MakeVS({100,150},VS_TYPE_MEMORY)        -- A window/virtual screen of
100*150

object1 = SetWindow (win1, {{10,10},{20,20})        -- Now object1 is a
virtual screen of 10*10 but its inside of win2

The routines won't let you write or draw outside the screen or window.
You could change your window by saving the virtual screen over the old one.
Example:

win1 = SetWindow (win1, {{10,10},{40,40}}

All drawing, etc. now happens in 10,10 - 40,40
But you can't make the window larger that the memory allocated.

You can also set the window of the screen.

SCREEN = SetWindow (SCREEN, {[100,100},{200,200}}

Now you can only draw at that position.
And you can use CopyVS to copy two screens.

CopyVS (win1, win2)
CopyVS (win2, SCREEN)    -- Puts it on the screen

If you set do_wait_retrace to TRUE then their will be a wait-retrace call,
when you copy something to the real screen.

The compiled sprites have also one benefit. Their *very* memory efficient.
If you save the same sprite 100 times but at different scales, it will still
only take about 500% memory as 1 time that sprite.

The sprites are pretty fast, especially if you're invisible pixels are only
on the left and on the right of each line.

If you need more information, you can email me at:

nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu