Jittery graphics using Borland 3.1 and BGI graphics 
Author Message
 Jittery graphics using Borland 3.1 and BGI graphics

Quote:

>I have been playing around with graphics for an assignment I have. I have been making
>objects move by getimage()ing them and then putimage()ing them into changing locations
>followed by erasing the previous image. This works but the image is dim and
>flickering. I believe I am running in to problems with timing and the refresh of the

Borland BGI is too slow for good movement. However, you might try page
flipping:
1). setactivepage(0);setvisualpage(1);
2). do your stuff in page 0
3). setactivepage(1);setvisualpage(0);
and so on.

Quote:
>screen. I have tried different delays and printing mutiple images at the same time
>without much luck.
>Does Borland C and its BGI graphics have some sort of sync function like some other

Not that I know of. As faras I understand, BGI works through BIOS,
which is the worst way to do graphics.

Quote:
>languages to help with this. Any other methods of making the thing look smooth would
>be appreciated.

Try redrawing only parts of it. That is, if you have this image:
  #+--------+
  #|     :-)|
  #|  :-)   |  
  #+--------+

      and you want to shift it one position to the right, you have to
erase only this (marked with #s) column, not the whole thing. Then,
redraw your image. You might also try displaying the image first
(remembering its old position), then doing all the calculations, then
quickly removing it from the old position and drawing it in new one.
The time for calculations would act as a mini-delay, minimizing the
time the image is off the screen => reducing flicker.



Tue, 24 Mar 1998 03:00:00 GMT  
 Jittery graphics using Borland 3.1 and BGI graphics
I have been playing around with graphics for an assignment I have. I have been making
objects move by getimage()ing them and then putimage()ing them into changing locations
followed by erasing the previous image. This works but the image is dim and
flickering. I believe I am running in to problems with timing and the refresh of the
screen. I have tried different delays and printing mutiple images at the same time
without much luck.
Does Borland C and its BGI graphics have some sort of sync function like some other
languages to help with this. Any other methods of making the thing look smooth would
be appreciated.

Regards Alan Laing



Wed, 25 Mar 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VGA Graphics in Borland C 3.1

2. Borland C 3.1: graphics.

3. Borland C 3.1: graphics.h problem

4. Graphics double buffering in C (bgi graphics drivers)

5. Printing Borland BGI graphics - help

6. Wanted: 256BGI.BGI Borland Graphics Driver

7. Borland graphic drivers (EGAVGA.BGI)

8. borlandc++ 3.1 / graphics ?

9. Drawing/Plotting Graphics in BC/C++ Windows 3.1

10. Help needed with BC/C++ 3.1 graphics lib

11. Help with writing and using DLL using Borland 3.1

12. Need Help using Hi-Res Graphics in Borland C

 

 
Powered by phpBB® Forum Software