Vertical Retrace Question

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

BDZ
Coder
Posts: 49
Joined: Sun Nov 20, 2005 5:41 pm
Location: Wisconsin
Contact:

Vertical Retrace Question

Postby BDZ » Sun Feb 04, 2007 11:05 pm

A little background first. I'm using QuickBasic 4.0 on a Pentium II 333Mhz (Win98.) The other day I discovered from some tutorials about using OUT and INP to adjust the palette in Screen 13, so I wrote some subs for my RPG to fade the screen in and out.

I was a little disgusted by the flicker though, so I read further. I then Experimented with "WAIT &H3DA, 8" and "WAIT &H3DA, 8, 8" (another idea I had) to try to wait for the vertical retrace before messing with the palette in each iteration of the loops that fade and "unfade" the screen. These commands caused a delay, but they didn't really seem to affect the flicker much; it still remained.

I read in one of the shorter tuts that "WAIT &H3DA, 8" worked best on 486s and slower Pentiums. What I'm wondering is, is there a good way to wait for the vertical retrace in my program? I don't want to resort to ASM. I'd like my RPG to be pure QB.

Thanks for your help.

relsoft
Coder
Posts: 24
Joined: Wed Jun 07, 2006 9:04 pm
Location: Philippines
Contact:

Postby relsoft » Thu Feb 08, 2007 9:07 pm

What exactly are you experiencing? "snow" or "flicker".

You might want to use a double buffer and draw on that buffer instead of drawing directly on the screen.

As for vertical retrace, that's the only way I know of. (wait)
Hello. :*)

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am
Contact:

Re: Vertical Retrace Question

Postby Z!re » Fri Feb 09, 2007 4:19 am

BDZ wrote:I'd like my RPG to be pure QB.
Spoiler: It isnt and will never be. Game over. Try again?
I have left this dump.

BDZ
Coder
Posts: 49
Joined: Sun Nov 20, 2005 5:41 pm
Location: Wisconsin
Contact:

Postby BDZ » Fri Feb 09, 2007 11:25 pm

Yeah, it was a Windows driver problem (The nice people at RPGDX helped me.) The problem has been solved as of this time.

BTW, thanks for your help Z!re. What exactly you mean I don't know.

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am
Contact:

Postby Z!re » Mon Feb 12, 2007 9:24 am

BDZ wrote:BTW, thanks for your help Z!re. What exactly you mean I don't know.
You wont ever make a game in pure QB. It is impossible. Can not be done. Why? There is no such thing as pure QB.
So, get over yourself and just use something that actually works.
I have left this dump.

User avatar
burger2227
Veteran
Posts: 2157
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Postby burger2227 » Thu Feb 15, 2007 1:26 pm

Bullfeathers! I found this post all over the QB sites. Don't play games with people you jerk! Your the one not playing right by QB. :roll:

User avatar
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Postby sid6.7 » Mon Feb 19, 2007 8:38 am

If it was a joke it was a poor one.... people come here for help
in this particular section of of the forum and not to be made fun of or misled...:evil:


Return to “QBASIC and QB64 Questions & Answers”

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests