It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

anyone good with qbasic 4.5

page: 1
0

log in

join
share:

posted on Jan, 17 2004 @ 09:23 PM
link   
for school I have to make a computer game in qbasic 4.5 it's worth 25% of my mark. so instead of using inkey$ for firing torpedoes I was hope to use the mouse cursor, so that when the user clicks where they want to shot the torpedoes will go to that spot. I read some online tutorials but they were so confusing! can anyone help?



posted on Jan, 20 2004 @ 07:27 PM
link   
*bump*
man i know qbasic is really old but c'mon someone must know something



posted on Jan, 24 2004 @ 06:02 PM
link   
I don't know much about QBasic, I haven't done BASIC programming for years now... But I have some ideas (Hope it's not too late)

Do you want to make the game using just text output with maybe some simple graphics? Or do you want a modern GUI format game?

If you want a modern GUI format game, then there may be some modules which you could download which let you make GUIs in Qbasic, then you could use 'event-driven-programming' so that you could use the mouse to do whatever you wanted.

I know there are loads of GUI frameworks for Turbo Pascal people have made (Usually in C/C++) which you can download, so like I said, maybe you could find ones for QBasic - Only problem is... As QBasic wasn't exactly a great programming language (for 1 it was a variant of BASIC, and 2 - it was 'made' by bill gates, lol)
Developers may not of wanted to make modules for it.

It's worth a look anyway. I'm not too sure how you would trigger events using the mouse in a text only based format game - not even sure it's possible. (But I am prepared to be stand corrected).

It is a mystery why your school is using QBasic... As it is such a bad programming language, in terms of style and structure. I would of thought you would of used Pascal (as most schools seem to use Pascal, lol).

Is this a introductory programming course your doing? If so... Your lucky to even be able to do this stuff. I am assuming you are in the US, or any other country apart from UK, lol. As in UK students are not even tought what a damn Ooperating System is, let alone programming, lol. Thats the schools I used to go to anyway
(Secondary [11+] schools I am talking about here)

Anyway, I hope this is of a slight help. I am just sorry that I couldn't be more helpful.



posted on Feb, 4 2004 @ 03:56 PM
link   
MetalHead, I live in the UK and on my computer courses I been learning Visual Basic for a few years and I consider myself quite good in the field
. I never used QBasic but its part of the basic language so it should be quite similar to VB. I also think the basic language is a good programming language to start with as I'm starting to learn C++ now and I think VB helped even though the languages are totally different.

f16falcon, QBASIC must be really similar to VB there both made by Microsoft so try learning some VB code from the MSDN library or www.planet-source-code.com and try some of the code in VB or try this code:

To say move a shape with the mouse and the shape is called shape1:

Shape1.Top = Shape1.Top + 100 )) This Code Will Move The Shape Down

Shape1.Top = Shape1.top - 100 )) This Code Will Move The Shape Up

Shape1.Left = Shape1.Left + 100 )) This Code Will Move The Shape Right

Shape1.Left = Shape1.Left - 100 )) This Code Will Move The Shape Left

Of Course that would only work if it is the same in QBASIC and the correct declarations are selected.



posted on Feb, 5 2004 @ 05:14 AM
link   
Mikomi...

Yes I have heard of some courses in 6th form doing Visual Basic, though I think it's a terrible language to start out with for you beginners, it teaches you bad habbits - I would say start with C or Python. Any language really, as long as you understand programming... i.e. variables, loops, arrays, hashes, structures, functions, pointers, etc. Then you can take it to another language, and just learn the new syntax.

The hard part of programming is when you start to learn all the different librarys, like the networking libraries, GUI libraries (pure code, not like VB), image libraries, etc.

Anyways... That VB code would not work at all in QBasic, QBasic is a text-only programming language (Also I don't think it is OO based), so that code would not work at all, unless like I said... You can find that someone has written a GUI framework for it... Even then, the code would be much different, as like I have said... I didn't think QBasic was OO based. I could be wrong though.

f16falcon... Think of VB this way... VB is a GUI framework for the BASIC language - Like Delphi is a GUI framework for Pascal.

So saying that VB *is* a GUI framework, your probably thinking why you can't use that? Well you can... But your teacher probably wouldn't like it, lol - as your course is in QBasic. Also you would have to buy the VB IDE and Compiler - Not cheap - about �100 for a standard edition (very limited).




top topics
 
0

log in

join