delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/02/14:55:05

From: "A. Jans-Beken" <jansb000 AT wxs DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: allegro
Date: Sun, 02 Jan 2000 20:05:59 -0800
Organization: World Access
Lines: 19
Message-ID: <38702027.57D1B5BD@wxs.nl>
References: <OCMb4.65$Va DOT 1217 AT weber DOT videotron DOT net>
NNTP-Posting-Host: vl0655-1.dial.wxs.nl
Mime-Version: 1.0
X-Trace: reader2.wxs.nl 946839864 1588332 195.121.202.143 (2 Jan 2000 19:04:24 GMT)
X-Complaints-To: abuse AT wxs DOT nl
NNTP-Posting-Date: 2 Jan 2000 19:04:24 GMT
X-Mailer: Mozilla 4.7 [en-gb] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Valkir wrote:

> I just fill the xcreen with 1 color, and add a little square that move 1 pixel each time.
> I delete de timer just so it's shorter, but it do only 5-6 fps.
>
> Is there a way for it to be faster or I must use sprite?
> thanks, Val

What you do is create a whole new bitmap, and then blit this to the screen. And that while
you only want to move a small square. Most "animators" would advice you to use a
dirty-windows technique. So, to make a long story short, yes - you should use sprites.

By the way, if the program that you wrote is for demonstration purposes than it doesn't
matter that it is slow. As long as other programs that you want to compare with allegro use
the same algorithm. If however you need smooth animation than you should use the allegro
sprite routines (and some form of buffering). Oh, and you probably know that the vsync()
function slows matters down, and is in many cases not needed at all.


- Raw text -


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