🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #917

Re: Tile Map Animation

#917
From: Khan
Date: Tue, 01 Sep 1992 12:54
50 lines
2880 bytes
In article <8190@dirac.physics.purdue.edu> saxena@maxwell.physics.purdue.edu (Virendra K. Saxena) writes:
>
>	I know people don't want IBM-graphics questions posted here, but 
>	there's no other group to post to right now, so for those of 
>	you who want to flame me, sorry :-)
>
>	Anyways...I'm working on a computer game that is like the 
>	Ultimas.  I'm using 640x350x16 Enahanced EGA mode.  I have two 
>	problems right now:
>
>	1) When I change modes to _ERES16COLOR(quick C 2.5), if I change the
>	pallette to suit me, it is different on an EGA and VGA card.  How
>	do I fix this problem???

I haven't noticed this, although I haven't compared EGA to VGA in a
side-by-side comparison. Worst case is you'll have to detect which type
of card your program is running on and select palette definitions
accordingly.
  
>	2) What is the fastest way to do tile map animation like in
>	the ultimas.  I have a two-d array in which each different tile
>	has a different number.  When you move, the program checks the tiles
>	around you and places the correct tiles at the correct location 
>	on the 2nd video page, and then switches pages.  This is smooth,
>	but it is VERY slow.  Considering that I have a 386-33...something is
>	definetely WRONG!!! Is there a faster way to do this??  Does anyone
>	have their own replacement to _putimage that is a lot faster?

In the Wilton book (Programmer's Guide to PC and PS/2 Video Systems)
there is some code for a BITBLT. I hacked it up to use fixed size bit
blocks and to allow for masked copies. If you arrange things in your
game such that all tiles are of fixed size and ALWAYS begin and end on
byte boundaries, the BITBLT will go a lot faster. These shortcuts will
undoubtedly outperform the more generic routines built into the Borland
and Microsoft graphics libraries.

If you don't have the book, the code from the book is floating around
the net somewhere are MSCVIDEO.ZIP/ARC/whatever. Perhaps an Archie
search will turn up some ftp sites.
  
>	3) Does anyone have code for loading PCX's that actually works?? I have 
>	typed in code from a Lee Adams book and tried some code that I dl'ed.
>	Didn't work.  Help?

Heh heh heh... Lee Adams' books have been flamed to death periodically
in various groups. I'm not surprised his code doesn't work. ;-)

Have you checked SIMTEL20/wuarchive? I'm sure you'll be able to find
some PCX code there...
Technical Details
Message-ID: <BtwH6x.H79@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
References: <8190@dirac.physics.purdue.edu>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
From: tmkk@uiuc.edu (Khan)
Subject: Re: Tile Map Animation
References: <8190@dirac.physics.purdue.edu> 
Message-ID: <BtwH6x.H79@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Date: Tue, 1 Sep 1992 12:54:32 GMT
Lines: 51