these qbasic problems will never quit...

Started by
5 comments, last by The_Tempest 21 years, 11 months ago
ok i have this:

screen 12
x=320:y=0
x2=320:y2=480
do
cls
circle (x,y),7
circle (x2,y2),8
press$=INKEY$
IF y < 640 THEN IF press$ = "s" THEN x = x + 1
IF x > 0 THEN IF press$ = "a" THEN x = x - 1
loop  until press$="q"
 
-the problem is that when the cls takes place, the circles blink constantly, how can i stop the blinking!!?
Advertisement
There are two things you should keep in mind.
One, CLS is slow compared to LINE(0,0)-(640,480),0,BF
Two, there is something about waiting for the vertical sync on your monitor.
I don't remember the code, but I believe I tried to add it in my Pacman clone.
You can find it at my website: http://www.gbgames.com
Look for code that starts with WAIT something or something like that.
I hope this helps!

-------------------------
(Gorgeous graphics)+(beautiful sound effects)+(symphonic music)+(no gameplay) != Good game

[edited by - GBGames on May 6, 2002 5:51:12 PM]
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
Instead of using cls, try drawing a black circle to erase the moving circle.
use page flipping, it goes something like this

cls
screen 7,0,1,0 ''the extra 0,1,0 is the 2nd page
do
cls
pset(x,y),3

pcopy 1,0 ''flips the page
loop while inkey$=chr$(27)'' esc

u use mode 7 but it kills the fliker
k ill try that
Start learning a real language. QB is dead I think....

Sand Hawk


----------------
-Earth is 98% full. Please delete anybody you can.
----------------(Inspired by Pouya)
I fully agree that Qbasic is dead. BASIC in and of itself is dead. Even VB is barely BASIC anymore. However, programming is still programming. The constructs are the same. The methodologies differ somewhat, but the basics are still there.

Besides, he didn''t ask what you thought of his language of choice.

Go with what you know - work on what you don''t.

Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.

This topic is closed to new replies.

Advertisement