Board index » delphi » Tile Game Graphic Help!!!!!!

Tile Game Graphic Help!!!!!!

I am writing a tile style rpg and I tried to code the program using
ascii text and redrawing the screen with a clrscr screen statement. I
wanted to now does any one know how to get the screen to redraw in a
faster way.  Tp 7.0.

Thank you
Chris Rouse

 

Re:Tile Game Graphic Help!!!!!!


On Fri, 20 Jun 1997 20:32:28 -0700, Christopher Rouse

Quote
<Cro...@worldnet.att.net> wrote:
>I am writing a tile style rpg and I tried to code the program using
>ascii text and redrawing the screen with a clrscr screen statement. I
>wanted to now does any one know how to get the screen to redraw in a
>faster way.  Tp 7.0.

>Thank you
>Chris Rouse

        I'd have the tile for each square stored in a 2d array (for
screen length and width).  Then, you have a routine, whenever the
display changes, which determines which characters actually have to be
changed, sets the cursor at that point to redraw.

Re:Tile Game Graphic Help!!!!!!


In article <33AB4B4C.8D0AC...@worldnet.att.net>, Christopher Rouse

Quote
<Cro...@worldnet.att.net> wrote:
>I am writing a tile style rpg and I tried to code the program using
>ascii text and redrawing the screen with a clrscr screen statement. I
>wanted to now does any one know how to get the screen to redraw in a
>faster way.  Tp 7.0.

>Thank you
>Chris Rouse

yes use asm. also for text you can use page flipping easily.
get some vgareg docs vgadoc4b.zip has a lot of info in it.

the text buffer is at 0B800h:0000  (for colour modes).
it has a word structure low byte being character high byte being attribute.
(or other way round can never remember :).

asm
mov ax,segB800
mov es,ax
xor di,di
mov ax,$0020
mov cx,screensize
rep stosw
end;

and voila one blank black screen(i hope :) colud need to be mov ax,$2000.

the 4th line is the crucial one.

the rep stosw stores cx number of words at es:di.
the word saved is in ax so place what you want to fill the screen with in ax
and go for it.

for an 80x25 screen screensize = 2000
for 80x50 = 4000 etc.

bevyn.

--
disclaimer

not only did i not post this i have never seen any of these letters before in my life.

Guaranteed silly posts or my money back!!!

Re:Tile Game Graphic Help!!!!!!


Quote
>    I'd have the tile for each square stored in a 2d array (for
> screen length and width).  Then, you have a routine, whenever the
> display changes, which determines which characters actually have to be
> changed, sets the cursor at that point to redraw.

        In other words, you just re-draw the tiles on the screen who needs
updating,  _not_ the entire speed which may be slower.

                                                        jaguar / ne

Other Threads