AllExperts > Qbasic, Quickbasic 
Search      
Qbasic, Quickbasic
Volunteer
Answers to thousands of questions
 Home · More Qbasic, Quickbasic Questions · Answer Library  · Encyclopedia ·
More Qbasic, Quickbasic Answers
Question Library

Ask a question about Qbasic, Quickbasic
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Alex Barry
Expertise
I have been a qbasic programmer since 2000, creating games, minor libraries and various small programs. I have experience using interrupts, graphics, file input/output, the mouse cursor, and using libraries. I have also learned FreeBASIC, c/c++, python, php and html.
I do not claim to be an absolute authority in any language, but I don't mind looking things up and learning with you.

Experience
Hobby programming since 2000

I no longer belong to any community programming groups, but do have knowledge of *basic dialects and C/C++

 
   

You are here:  Experts > Computing/Technology > Basic > Qbasic, Quickbasic > im a begginer on Qbasic can you help me?

Qbasic, Quickbasic - im a begginer on Qbasic can you help me?


Expert: Alex Barry - 3/15/2009

Question
look i have been reading Qbasic for a little while now im on chapter 10 im having a hard time understanding some of this stuff i want to learn to make games like the multiplayer snake game so if you have advice tips please tell me

Answer
Hi, Greg,

I have no idea what book you are on chapter 10 on, but if you want advice for creating multiplayer games, here is what I'd say to you:

* learn and understand the graphics interface ie screen modes, coordinates
* have a basic understanding of trigonometry (sine and cosine is good to be familiar with) + a good understanding of algebra (being fluent in rearranging equations is also good)

Once you have that nailed down, some things to think about:
* how do I want the game to be multiplayer (share keyboard, network, ai)
* if there is keyboard sharing, you may want to google "qbasic multikey" (INKEY$ is really crappy when it comes to game making...very slow, and only one key is registered at a time)
* create the game to be as dynamic as possible.  This means using a lot of UDTs (User defined types), and functions specific to those UDTs
   something like this:

Type PlayerData
 x  as integer
 y  as integer
 ' other fields of information that all characters should have...
End Type

SUB DrawPlayer( pd AS PlayerData, ... )

There is a lot that goes into a game, more than you may suspect.  The best thing I can say is be as efficient as possible.  If you have four loops that modify the same variables, then combine them into one loop.  Sadly, QBasic is slow, and limited to the DOS environment, so every bit of efficiency is worth it.
Also, take into account computer speeds.  google "frame rate independant movement" - there is an article at gamedev that you will find useful.  It's in C, but fairly simple to understand.

If you need help, I'm more than happy to help you out
Take care,
-Alex

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.