Article View: rec.games.programmer
Article #741Re: fast VGA sprite routines
From: Jeremy Corley
Date: Sat, 15 Aug 1992 20:41
Date: Sat, 15 Aug 1992 20:41
45 lines
2488 bytes
2488 bytes
bbs.brienv@tsoft.sf-bay.org (Brien Voorhees) writes:
> I've been working on some graphics routines for VGA mode 13h to handle
>animating sprites while retaining the background and have managed to get
> 'em goin' pretty fast (about 25-35 fps on a 486) but that's without
>much other overhead. Once I add collision detection, sound, music, etc.
>I don't think I'm going to have enough cpu time to spare.
> Does anyone know techniques to speed up graphics routines? Here's an
>overview of how my routines work :
> During any given cycle, the following things happen :
> The Master copy of the background (in a 64k buffer) is copied into the
>work buffer (also 64k).
> All sprites are written to the work buffer.
> After all movement is done, the work buffer is copied into screen
>memory
>with a REP MOVSW. Predictably, this single instruction is where the vast
>majority of the CPU's time is taken thanks to the slowness of video
>memory.
[ gobs of stuff deleted ]
> Any help would be enormously appreciated!!!
>While I'm at it, does anyone have the specs to the .MOD music format?
> Brien "I Link Therefore I Am" Voorhees
>--
>Brien Voorhees (bbs.brienv@tsoft.sf-bay.org)
At the company I am working for we are doing two adventure games in
mode 13h. What we do is to break up the background into "tiles". If an animation
effects a tile ("dirtys" it), then it is redrawn. To keep screen flicker to a minimum
you also might try "paging" by reseting the screen start address back and forth
, actually having to display pages that you work with. If memory serves (no pun intended)
with 256k you can have 4 such "pages". Don't quote me on this stuff, I only
regurgitate what I read and hear from our graphics guru. I have done some of this
kind of work, but not recently.
--------------------------------------------------------------------
"Senator Kennedy, What are you going to do about the abortion bill?"
"Pay it, I guess."
J. Corley
n9046319@henson.cc.wwu.edu
Technical Details
Message-ID:
<n9046319.713911311@rowlf>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!ogicse!henson!rowlf!n9046319References:
<RVmgPB1w165w@tsoft.sf-bay.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!ogicse!henson!rowlf!n9046319 From: n9046319@rowlf.cc.wwu.edu (Jeremy Corley) Newsgroups: rec.games.programmer Subject: Re: fast VGA sprite routines Message-ID: <n9046319.713911311@rowlf> Date: 15 Aug 92 20:41:51 GMT Article-I.D.: rowlf.n9046319.713911311 References: <RVmgPB1w165w@tsoft.sf-bay.org> Sender: news@henson.cc.wwu.edu (USENET-WWU) Organization: Western Washington University Lines: 45