Page 1 of 2
how?
Posted: Mon Aug 08, 2005 10:15 pm
by ...
how do i stop a loop when some1 press a key without putting INPUT
Posted: Mon Aug 08, 2005 10:28 pm
by Steve
Here is what you use:
Do
Print "some random crap"
IF Inkey$ = "s" Then System
Loop
yeah! also
Posted: Tue Aug 09, 2005 12:19 am
by mennonite
depends on whether you want them to press a specific key or not...
if you want them to be able to press Any key:
Do
Print "some random crap"
Loop until inkey$ <> ""
also, to have them use ESC key:
Loop until inkey$ = chr$(27)
Posted: Tue Aug 09, 2005 8:55 am
by {Nathan}
I will explain it (and guys, use the code tag!)
Code: Select all
do 'duh, starts the loop
DOYOURLOOPCRAP 'psuedo code
loop until inkey$ = Chr$(Scancode)
'the line above loops the loop until the a key keyboard buffer
'(retrived by inkey$) is equal to a certain scancode. Then, if it is,
'it stops the loop. You can also use "loop until inkey$ <> "" because
'if no key is in the keyboard buffer, then it returns a null (nothing)
Just thought you should understand it. I refused to do soooo many things because I didn't understand it. I hated it when Vic said just "to put &h3da, 0 in your code. Just do it." without an exclamation!!!
Posted: Tue Aug 09, 2005 11:29 pm
by Zamaster
With you there 100%!
Posted: Sat Aug 20, 2005 10:34 am
by guest
i'm ...
sorry i didn't read the stuff because i didn't know that this message board go so slow.
i waited like ten minutes and no reply so i left.
i figured out myself. Surprise that this is still here after a month.
now i want to know how to compile .bas to exe using v1.1 qb
Posted: Sat Aug 20, 2005 11:55 am
by {Nathan}
it cannot be done. you must use qb 4.5 or above.
Posted: Sat Aug 20, 2005 2:35 pm
by guest
i have another question
with qb 1.1, can you add background music?
like make it play during gameplay
Posted: Sat Aug 20, 2005 3:24 pm
by Z!re
Look up PLAY in the help index.
No, you cant do 3d. No, you cant play mp3s or wav. No you cant do multiplayer over the internet. No you cant write an OS.
What else.. Nope, I think that covers it.
By the way, the whole idea of a forum is that you post, and wait, usually a few days. This is not a chatroom.
Posted: Sat Aug 20, 2005 3:42 pm
by guest
thanks but i read a tutorial dat says u cood do 3d but i don't want to anyways
well can freebasic do those? can u tell me where to get it?
can things happen simultaneously in qb?
like have something moving without any relation with something else that is moving at the same time
Posted: Sat Aug 20, 2005 5:25 pm
by Z!re
Yes, you "can" do 3D in QB.. but YOU can't (And neither can I for that matter)
Moving on:
Spelling, learn it, use it. Dat is sum good shitz u no!
And on:
www.freebasic.net
Further down the line now:
No, QB is unable to multitask in any way. You can fake that by quickly switching between actions. Using a loop is very common, then determine what to do and when either by user input or using fixed algorithms.
Multiple variables, or even arrays are also good to know about.
Are you a troll?
Posted: Sat Aug 20, 2005 9:23 pm
by ... or guest or ????
thanks alot
but i think i could try to learn 3d... maybe not anytime soon
another question: is freebasic the same as quickbasic or does it use different codes or whatever you call it like LOCATE x, y
Posted: Sat Aug 20, 2005 9:42 pm
by MystikShadows
Its atleast 95% equivalent to QB....the main thing is anything that is 16 bit related is no more being it's a 32 bits language now. hence no memory problems, no DEF SEG statement, it has inline assembly which is a bit better code wise

if you need it

. but remember that it's 32bit assembler, not 16 bits

.
It has many more SCREEN modes and parameters, integrated mouse support...in short, you don't really have a good reason to stay with QB today.

Posted: Sat Aug 20, 2005 10:42 pm
by ... or guest or ????
ok thanks although i had no idea what you mean by bits
i just need to know if the coding stuff is still the same
Posted: Sun Aug 21, 2005 9:55 am
by Rattrapmax6
Um... 99%.... Its only a few things that FB doesn't do that QB does, but what more FB does makes up for it.....
btw, FBC alone is a commandline compiler, to start off you might like a IDE:
http://fbide.sourceforge.net/
The FBIde + FBC 0.14b is the best choice.... gives you the whole nine yards....
Also, help on FreeBASIC commands is here:
http://www.freebasic.net/wiki/wikka.php?wakka=FBWiki
You should find that is very much like QB..
Also.. basicaly QB is 16bit and has issues with newer 32bit computers,... making FreeBasic compiling at 32bit better...

... As for what it totaly means, I don't keep up with.... just which is better...

Posted: Tue Aug 23, 2005 11:40 pm
by paulunknown
can anyone give me the code for the inkey$ of up down left right?
Posted: Wed Aug 24, 2005 12:13 am
by The Awakened
http://petesqbsite.com/sections/tutoria ... ycodes.txt
You CAN look this stuff up on the website before you come here.

Posted: Wed Aug 24, 2005 2:37 am
by Seb McClouth
In answer to bits:
Well, when I was back in school, only 3 year ago, anywayz, we still learned about bits and bytes.

But to cut to the chase... 16 bit... if you know MS-DOS, that's 16 bit. 16 bit is some kind of boundry. Until we got windows 95 (I believe we actually got it before with WIndows NT) we were introduced to a new boundry, the 32 bit. This standard worked a couple of years, until we noticed we needed to cross the boundry again, giving us: tada: 64 bit. Just for the record: 32-bit works just fine.
Just for the record: the bits in this case have nothing to do with the bits, bytes, kbytes, mbytes, gbytes of the RAM memory or Harddrives etc.
Grtz
Seb
Posted: Wed Aug 24, 2005 5:30 am
by kalc
LOCATE x,y is not really right. You usually use LOCATE y,x ... y down and x across.
INKEY$? I've finished with that.. GetKey now!
Posted: Wed Aug 24, 2005 10:03 am
by paulunknown
thanks
and i still use locate x, y
don't really matter