Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Screen 13 flicker reduction

Screen 13 flicker reduction

Screen 13 flicker reduction

Hey everyone, I'm working on some 3D graphics for a computer game I'm working on.  Previously, I was using SCREEN 7 because of the pages feature, but after some optimization, I got my code to run fast enough to look good in screen 13 using the "WAIT &H3DA, 8" command for vertical retrace.  My wireframe image spins and moves beautifully at 65 FPS, but when I try and draw something over the top of it, such as my title screen, which uses a pretty simple for loop that draws ONLY when the color isn't black (that way the image behind isn't even messed with), but for some reason, even though I draw it after and on top of the wire frame image, the wire frame still appears on top of it in some areas (but not in others!)  I'm frustrated.

So, here's a summation of my code:

x = 1
y = 2
color = 3

EraseLines   (Sub that draws black lines over the old image)
DrawLines (Sub that draws the new lines of the 3D image)
FOR i = 1 to NumberOfPixels
 PSET(ImageArray(i,x), ImageArray(i,y)), ImageArray(i,color)

ImageArray is an array that has the x,y, and color of each pixel of the overlay image.  That way it only draws the pixels that aren't black and saves time.

It works pretty well, but as I said, for some reason, in some areas, the wire frame image that is made in the sub DrawLines still appears over the top of the picture drawn with the FOR loop.
Is there any way to be CERTAIN that the WAIT command will wait until after the last pixel is drawn to put it to the screen?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close