Several questions
Several questions
I have a couple of questions. Firstly, I notice that well done games never have a problem with flicker. I've also noticed that in relsoft's polygon files, he uses something called the setvideoseg which seems to get rid of flicker and black blocks behind sprites. Can anyone give me anymore info on this?
Secondly, how do you make many frames of anime without using a seperate array for each, thus avoiding using hundreds of IF statements.
Finally, how do you rotate sprites so that you could make a 360 2d shooter?
Secondly, how do you make many frames of anime without using a seperate array for each, thus avoiding using hundreds of IF statements.
Finally, how do you rotate sprites so that you could make a 360 2d shooter?
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
In QBasic, the flickering can be controlled by:
Also doing LINE over CLS:
Those should help you out as for flickering...
Code: Select all
WAIT &H3DA, 8
Code: Select all
SCREEN 13
'Start loop
DO
LINE (0, 0)-(320, 200), 0, BF'Clear Screen...
'Calculate
'Draw GFX
WAIT &H3DA, 8
'Delay Loop
LOOP UNTIL INKEY$ = CHR$(27)
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
You tell people to do web searches to find out info about QB programming, yet it took you two years to find an active community? If you search "qbasic" in any search engine, you'll find about five active boards on the first page of results! Seems like you didn't even follow your own advice.Nathan1993 wrote:I just hate it when people go to these forums without searching google, or the expanse of tutorials on this site. just be glad you had forums, i programed in qb for 2 years until i found an active community.
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
I found QBN a few weeks after starting QB, with AOL's search (Imagin if I had Google).... I just never bother to regester (At the time, I wasn't allowed to talk via the internet also (Parents )),...
And two years coding allone isn't bad.. When you have to resolve your own problems, you can learn alot more.... Being the option of posting for help was never there for me in my n00b stage, I can say, I don't regret it....
It's rare I post for help, and it doesn't mean I don't ever have problems,. I've just learned how to fix them myself...
And two years coding allone isn't bad.. When you have to resolve your own problems, you can learn alot more.... Being the option of posting for help was never there for me in my n00b stage, I can say, I don't regret it....
It's rare I post for help, and it doesn't mean I don't ever have problems,. I've just learned how to fix them myself...
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
Re: Several questions
SetVideoSeg is a hack by Plasma that overwrites a QB internal variable, redirecting the drawing keywords as PSET, PUT, GET, LINE... to your buffer, when normally they only draw to screen. So you can draw to the buffer the same way you would draw to screen. Without SetVideoSeg you must use POKE to set individual pixels if you want to draw to a buffer.Anonymous wrote:I have a couple of questions. Firstly, I notice that well done games never have a problem with flicker. I've also noticed that in relsoft's polygon files, he uses something called the setvideoseg which seems to get rid of flicker and black blocks behind sprites. Can anyone give me anymore info on this?
When your drawing is ready you can send it to screen with a PUT.
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
actually, I did, I just never *visited* the forums... mostly because I hated them and thought they were dumb (bad experiences... *shudders*). Becuase of that, I never really checked the forums... then I saw that your forums were active (and nice :-p).Pete wrote:You tell people to do web searches to find out info about QB programming, yet it took you two years to find an active community? If you search "qbasic" in any search engine, you'll find about five active boards on the first page of results! Seems like you didn't even follow your own advice.Nathan1993 wrote:I just hate it when people go to these forums without searching google, or the expanse of tutorials on this site. just be glad you had forums, i programed in qb for 2 years until i found an active community.
I'm in the same boat. I started coding in QB 8 years before I bothered to look to see if there was a QB community on the internet, despite the fact that I belonged to comp.lang.lisp for seemingly ever. If I had found the QB communuity earlier I probably would have stuck to working in just QB instead of learning LISP, Perl, Python, TCL etc. I would have lost out on a lot.Laughing I found QBN a few weeks after starting QB, with AOL's search (Imagin if I had Google).... I just never bother to regester (At the time, I wasn't allowed to talk via the internet also (Parents Wink)),...
And two years coding allone isn't bad.. When you have to resolve your own problems, you can learn alot more.... Being the option of posting for help was never there for me in my n00b stage, I can say, I don't regret it....
It's rare I post for help, and it doesn't mean I don't ever have problems,. I've just learned how to fix them myself...
Share and Enjoy.
Here's my version of SETVIDEOSEG...
And this part is for PUTting the screen buffer at the VGA's (SCREEN 13)
beginning address...
Personally I think this version is easier to use than the other.
P.s..
If you need more help or any questions feel free to post or send a private message to me.
Cya,
Nemesis
Code: Select all
'
DEFINT A-Z
DIM SHARED VIDEO(32007)
SCREEN 13: CLS
VIDEOseg& = 1 + VARSEG(VIDEO(0))
DEF SEG : BSAVE "buffer.tmp", &H0, &HFA00
DEF SEG = VIDEOseg&: BLOAD "buffer.tmp", 0
KILL "buffer.tmp"
FOR I = 8 TO 32007 - 1
IF VIDEO(I) = &H7DA0 AND VIDEO(I + 1) = &HA000 THEN
VIDEO(0) = ((I + 1) * 2) - 16
VIDEO(1) = VIDEO(0) + 1
VIDEO(4) = VIDEOseg& AND &HFF
IF (VIDEOseg& AND &H8000) THEN
VIDEO(5) = ((VIDEOseg& AND &HFF00) \ &HFF) + &H100
ELSE
VIDEO(5) = (VIDEOseg& AND &HFF00) \ &HFF
END IF
DEF SEG
VIDEO(2) = PEEK(VIDEO(0)): VIDEO(3) = PEEK(VIDEO(1))
POKE VIDEO(0), VIDEO(4): POKE VIDEO(1), VIDEO(5)
EXIT FOR
END IF
NEXT
'
VIDEO(6) = 2560
VIDEO(7) = 200
'
beginning address...
Code: Select all
'
DEF SEG
POKE VIDEO(0), VIDEO(2)
POKE VIDEO(1), VIDEO(3)
PUT (0, 0), VIDEO(6), PSET
POKE VIDEO(0), VIDEO(4)
POKE VIDEO(1), VIDEO(5)
'
P.s..
If you need more help or any questions feel free to post or send a private message to me.
Cya,
Nemesis