delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/01/21:07:58

From: "23yrold3yrold" <cbarry AT pangea DOT ca>
Newsgroups: comp.os.msdos.djgpp
References: <3a78f002_1 AT corp DOT newsfeeds DOT com> <95bkn1$ehe$1 AT nnrp1 DOT deja DOT com>
Subject: Re: Nasty, nasty graphic flicker
Date: Thu, 1 Feb 2001 17:29:29 -0600
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 64.4.88.45
Message-ID: <3a79f06e_3@corp.newsfeeds.com>
X-Trace: corp.newsfeeds.com!newsfeeds.com!crp!anonymous!127.0.0.1!crp 981069934 64.4.88.45 (1 Feb 2001 17:25:34 -0600)
X-Comments: This message was posted through Newsfeeds.com
X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to <abuse AT newsfeeds DOT com>
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Organization: Newsfeeds.com http://www.newsfeeds.com 80,000+ UNCENSORED Newsgroups.
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Tom St Denis" <stdenis AT compmore DOT net> wrote in message
news:95bkn1$ehe$1 AT nnrp1 DOT deja DOT com...
>
> Flickering normally happens because you are drawing during the vertical
sync.
>
> Try doing this
>
> do {
>    vsync();
>    // draw stuff
> } while (!done);

I thought vsync() was automatic for this. I've never had a problem before. I
assume it's a memory thing.

What I'm working on is a vertically scrolling shooter game. Half the time a
certian enemy class constructor is called (I create an enemy onscreen) there
is a flicker for that enemy's first blit onscreen. Usually it's OK.
Sometimes it blits a screenwide mess for the one frame, sometimes it's a
vertical mess even with where it's supposed to be, sometimes it's horizontal
and sometimes it just plain crashes. Most of my code is fine (I have other
enemy classes which work flawlessly) so I was just wondering if there was a
possible explanation for this; then I'll just look for the problem myself. I
recall having the problem before, but I just found some other way to do it
without really finding out what went wrong .....

I assume I'll have the problem again in a few month so finding the cause now
would mean a lot to me. I'll try your vsync() idea, though it's only the
enemy that gets messed up, not the background or any other sprites ....


Chris




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

- Raw text -


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