www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/16/09:13:42

From: hotpulp AT netidea DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Tile based scrolling?
Date: 16 Jan 1997 05:09:38 GMT
Organization: iSTAR internet Incorporated
Lines: 27
Message-ID: <5bkd6i$g8p@nr1.ottawa.istar.net>
References: <5bjnrh$bu2 AT dailyplanet DOT wam DOT umd DOT edu>
NNTP-Posting-Host: 204.191.228.61
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

James Jeffrey Benjamin wrote:
> 
> I'm slowly working on a tile based engine using Allegro (mainly for
> 640x480) and it has become prone to bugs. Anyway, what I'm doing is double
> buffer with blitting (moving) the virtual screen around as I add new rows
> of sprites. Is this faster or slower with the conventional way of just
> rewriting every (compiled) sprite onto the screen buffer? I know my way
> will get quite complex when I introduce parallex srolling. Sprite by
> sprite is easier, but is it faster?
> 

My opinion is don't worry about how fast or slow it is, just program it
the easiest way (within reason) and after you've gotten rid of all the
bugs and you've got an actual game or whatever, THEN start optimizing
your code. If you optimize the crap out of you code, you'll get tired of
this old programming project and never finish it. but that's just my
experience, maybe I'm just an unmotivated sort of guy.

I would say that both ways are farely close, the re-blit of every sprite
may be a little slower but will get a more consistant frame rate (I
think). And if your doing parallax scrolling and backgrounds moving
twice as fast as the foreground like Abuse, chances are you should just
re-blit each sprite. And if the background moves at a different rate as
the foreground, there's no other way than redrawing the entire screen
every frame.

-- Shawn betts

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019