delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/28/09:21:06

Message-Id: <199907281320.JAA24753@delorie.com>
From: "Dan Gold" <TedMat AT CoastNet DOT com>
To: <djgpp AT delorie DOT com>
Subject: Re: Vsync!
Date: Tue, 26 Jan 1999 21:26:39 -0800
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Nothing seems to happen because you can't notice it. Unless you see heavy
flickering then It should be working. Also vsync() works once and draw as
much as it can before the next vertical retrace but your drawing might take
longer than that so you will have to use it again...I sujest adding another
call before the draw_sprite's...

from Dan Gold

            -=-=[CATACOMB ABYSS]=-=- 
http://www.geocities.com/SiliconValley/Pory/1547/


----------
> From: Knutte <trumpetknutte AT swipnet DOT se>
> To: djgpp AT delorie DOT com
> Subject: Vsync!
> Date: Wednesday, July 28, 1999 2:00 AM
> 
> Hi
> Ive just started to use DJGPP and Im "porting" my game written in Watcom
to
> DJGPP. Everything works fine except that *nothing* seem to happen when i
use
> vsync().
> Can anyone help me with this ?
> 
> My main gameloop:  (Its hardly optimized but i think you get the feel...)
>   // Main Loop
> 
>       while(!key[1]) // Release ESC-key.
>                {
>                     // Wait for vertical ReTrace.
> 
>                 vsync();
>                 rectfill(screen,xBoard,yBoard,xBoard+20,yBoard+50,0); //
> Board
>                 rectfill(screen,xBall,yBall,xBall+10,yBall+10,0); // Ball
> 
>                   if(key[72]) yBoard-=5;
>                   if(key[80]) yBoard+=5;
>                   if (yBoard>=400) yBoard=399;
>                   if (yBoard<=29)  yBoard=30;
>                    // the ball
>                   xBall=xBall+vxBall;
>                   yBall=yBall+vyBall;
>                   if (xBall<5) vxBall=5;
>                   if (xBall>625) vxBall=-5;
>                   if (yBall<35) vyBall=3;
>                   if (yBall>434) vyBall=-3;
> 
>                   // Draw screen
>                   draw_sprite(screen, board, xBoard, yBoard);
>                   draw_sprite(screen, ball, xBall, yBall);
>                     }
> 
> 
> 

- Raw text -


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