Board index » delphi » Best way of scrolling tiles

Best way of scrolling tiles

I am working on a program in Pascal in which I have scrolling tiles. I'm
using mode 13h. The way I make them scroll is I put the tiles on a
virtual screen in memory and copy it to the video screen.  The problem
is that this is terribly slow.  I'd like to draw the whole terrain in
memory first then get the appropriate section, but that would require to
much memory.  Does anyone have any better ideas.  Any help would be
appreciated.
--
R. Hannay                      
Rhi...@Cris.com
http://www.cris.com/~rhinoh/

 

Re:Best way of scrolling tiles


Quote
Robby Hannay wrote:
> I am working on a program in Pascal in which I have scrolling tiles. I'm
> using mode 13h. The way I make them scroll is I put the tiles on a
> virtual screen in memory and copy it to the video screen.  The problem
> is that this is terribly slow.  I'd like to draw the whole terrain in
> memory first then get the appropriate section, but that would require to
> much memory.  Does anyone have any better ideas.  Any help would be
> appreciated.

I would venture to say that, yes, you're using the best method, but your
graphics drawing procedure(s) and/or implementation are just slow.
You'll have to optimize the code to get good performance.  It's hard to
tell what exactly you're doing, because you haven't really shown
anything to look at.

Quote
> --
> R. Hannay
> Rhi...@Cris.com
> http://www.cris.com/~rhinoh/

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:Best way of scrolling tiles


Quote
Robby Hannay wrote:

> I am working on a program in Pascal in which I have scrolling tiles. I'm
> using mode 13h. The way I make them scroll is I put the tiles on a
> virtual screen in memory and copy it to the video screen.  The problem
> is that this is terribly slow.  I'd like to draw the whole terrain in
> memory first then get the appropriate section, but that would require to
> much memory.  Does anyone have any better ideas.  Any help would be
> appreciated.
> --
> R. Hannay
> Rhi...@Cris.com
> http://www.cris.com/~rhinoh/

You should move the tiles on the virtual screen (using the move-command)
and only add what's necessary. You could take a look at my
DEMOSCEN-program (source available on request) to see what it can do,
though this doesn't use tiles, but that makes no difference. It's at
http://www.xs4all.nl/~remcodek/download.html.

Remco de Korte
Soft Machine
Nederland
http://www.geocities.com/SiliconValley/Lakes7077

Other Threads