Welcome to Pete's QBASIC Site!


There are many ways to test and practice your programming skills. The best way, as far as I'm concerned is to actually program something - all by yourself. You're the only one that can decide if you have what it takes to program the next full-length epic RPG, or the cool new action shoot 'em up, because those games are just combinations of small little lines of code in a certain way. The best way to learn how to organize those small lines of code is with...you guessed it... small bits of code! So try to do these challenges. If you have a hard time, you need to practice programming a little longer.

1.) Two names, One Variable
Write a program that asks a person their full name (first and last). The first and last name should be inputted at the same time, and in to the same variable. Now here's the hard part - you have to split the name's variable in to two new ones, one containing the first name, and one containing the last name. After you split the name up, do something cool with the person's name, like having it blink, or fly around, or something.
HINT: When splitting the variable in half, split at the space in between words.

2.) Horizontal Slide
Make a program that makes an ascii character graphic start on the left side of the screen, and slowly slide across to the right, and stop. It should be more than one row tall, and a couple columns. Make the program a loop, so after it stops, it can start over again.
HINT: This program should have two loops, one that moves the picture, and one that starts it over again.

3.) Pot of Gold
Make a game where the player moves around an ascii character graphic marker (a face, or an asterisk) to collect another ascii symbol. There should be at least five things to collect, and a certain number of times you can move. Use the numeric keypad to move (you only need up, down, left and right). If you really want to make it cool, make multiple levels, and items to pick up and use later.
HINT: Use LOCATE to put the character on the screen.

4.) Bank (sorry for lack of a better title.)
Make a program about a Bank. You should be able to Deposit into savings, withdraw from savings, take out a loan, start a new account, pay back a loan, and kill the banker! No, just kidding. Make it have a lot of features, like interest, credit evaluation, credit card features, all kinds of stuff. You will be using this in another program down the line, so make it good - you'll need it later!
HINT: If you keep track of time, interest and credit evaluations are much easier to figure out.

5.) Stones
This is an old game that some cave man made up about ten thousand years ago, but it's simple and fun. In stones, twenty-five "stones" are layed out on a table (or rock in the cave man's case.) Each turn, a player takes either one, two or three stones from the pile. The players alternate picking up stones. The object is to pick up the last stone. Make the game by drawing twenty-five zeros (stones) on the screen. Every move, ask a player how many stones he wants to take. After he takes the stones, get rid of them. The last player to take a stone wins.
HINT: The best way to "take away" stones off the screen is to PRINT a blank space on top of it.

6.) Alphabet Loop
Write a simple program that asks the user to input a character or number, and then return the ascii value of that number or character. If the person types in "C", the computer should return it's ascii value. If the person types in "219", the ascii character it is associated with should be returned. This utility can be helpful for making text based games.
HINT: To convert numbers to ascii symbols, use CHR$.

7.) Rule Your Own Colony!
Make a text - based Sim City clone. Have there be a certain amount of food that can be harvested per acre of crops, have each person eat a certain amount of food, have people's morale change, You can make money to get more houses and buildings. If you have schools, people harvest more food, you have to have a certain amount of people per acre of crop, etc. Make a lot of variables end up with the solution. The game should be text based, with turns. Each turn represents a year. The player decides what to buy, what to build, etc. Basically, it asks you how many of what you want built, then stores them in variables, then goes through a formula to figure out what the new values are.
HINT: Make each variable change depending on other variables. This makes the game much more realistic.

8.) Random Circles
Write a program that draws random circles on the screen. Use screen 13. Make the circles have a random color, location and size (up to 60 pixels in diameter). Make it a continuous loop, ending when a key is pressed. This is almost beginner material, but graphics are sort of intermediate.
HINT: Don't forget RANDOMIZE TIMER for a truly random set of circles.

9.) Tiled Sprites
Write a program to GET a random sprite, and display it in tiled form. First, take Challenge #7, the one with random circles. After the random circle loop is ended, GET a selection of it, clear the screen and display the random sprite you created in tiled form across the screen. Sometimes you can get pretty cool sprites this way! If you want to make it more complex, add a BSAVE feature so you can save the tile if you like it.
HINT: To tile sprites: PUT it across the screen the number of pixels apart that it is wide, than start a new line.

10.) Name Generator
Have you ever had a hard time coming up with a name for a character in your game? Or you just couldn't think of a good name for a town or city? Well...here's your solution - a random word generator! What this generator should do is pick two random consonants and one random vowel. The two consonants go on the outside of the word, and the vowel goes in the middle. If you want to make words with multiple sylables, just choose a random number and a random consonant. Put the vowel after the final letter of the word, then add the consonant after that. You can make words with lots of sylables this way, or very few. You might want to change the spelling of some of the words to make them look better. A good way to start this is to ask the user how many sylables he wants in the word.
HINT: To choose random letters, choose a random number, and CHR$ it.

11.) Wolf, Cabbage and Goat
The problem is for the farmer to transport everyone across a river with a rowboat that only holds himself and one other. He can't leave the wolf and goat alone (wolf will eat goat). He can't leave the goat with the cabbage (goat will eat cabbage). How will he get them all across the river in his boat? Make a program that does this.
Submitted by:Karen Johnson
HINT: Each object will need some type of location variable so you can find out where it is.

12.) Fading Two pictures to each other
Try fading one picture (Any size) to the next picture (Same size as other one. In other words.... load up two images with its own palette settings and fade them from one image to the next image like you commonly see on tv!
Submitted by: Mr. James R. Osborn
HINT: You're going to have to be strong in math to understand this! It's like fading the picture from black to original palette values only you're not fading from black, your fading from image A to image B!

13.) Email Program
Write a program that sends and recieves email messages. They do not have to be in HTML format, just text. This is really tough, and before you try it, you need quite a background in QBASIC.
Submitted by: Bryan Beck
HINT: You will need to access the modem's port in order to communicate online.

14.) Encryption
Write a program that encrypts a file into a hard-to-decipher file of characters. Make the program also able to change the file back to it's original form. This should also delete the original file after it is coded.
Submitted by: Bryan Beck
HINT: Look up WRITE, and OPEN for help.

15.) Gameshark: QB
Make a Gameshark-like program that edits variables that are being used by QBASIC with another program, like in Gameshark for PCs. It will let the user edit the variables to fit their preferences. It should be in another program, and searches for variables that are being used by QBASIC by PEEKing into the memory in the place that QB puts it's variable into. This is tough, so I suggest that you study a Game Shark and how it works, and learn find and use the memory addresses that QBASIC stores variables in to do this.
HINT: You'll have to know how to use PEEK to check the memory addresses for values in order to do this. This is very complicated, so take it one step at a time.

16.) Dos to Windows File Name Converter
Make a program that converts Windows-long filenames to Dos short file names. for example: c:\program files\directory name\start.exe will become c:\progra~1\directory\start.exe Remember that if there also a dir names c:\program files then it will become c:\progra~2time. Submitted by: HoLmEs
HINT: Try this: SHELL "dir /s /b > c:\files.txt"

17.) Memory Madness
Try to add at least one kilobyte of data into the memory (ram) to be recalled later for use in one of your programs. Submitted by: Breeze
HINT: Check the TSR tutorial in the tutorials section.

17.) QB Pocket
Make a Game Boy emulator in QBASIC. The memory, graphics and processing limitations of Game Boys easily will be acheivable in QB, but the GB ROM file type is difficult to open and 'decode'. Extra credit goes to people who mak it Game Boy Color compatible. :) Game Boy roms are available in many sites. I suggest that you search a search engine for 'emulat'. Then go to the sites that have Game Boy Roms and Emulators to get started.
HINT:"Download no-cash gameboy emulator, it shows the assembly instructions and the number and values of each byte, byte by byte... with this, and a whole MESS of experimentation, it MIGHT be possible to write an emulator... I don't want to try it though..." Hint submitted by B-Czar

17.) QB Web Browser
Try to make a program to connect to the internet and view a web page. And also send and recieve email. In other words make a web browser with e mail capibility.

p.s. If anyone completes it please send me a copy of the prog.
Submitted by Pikablu2288@aol.com

HINT:You're going to need to know a lot about ports and internet protocols before you attempt to do this.

Copyright © Pete's QBASIC / QuickBasic Site, 1998-2018.
All rights reserved. Site owned and operated by Pete Berg. Programs and submitted content are property of their creators, and appear on this site by direct or implied permission. Pete's QBasic Site is powered by Coranto. This site was created entirely in Notepad.