How to make a QBasic game – A tiny snake game - playproduction.de

How to make a QBasic game – A tiny snake game

Bisqwit
Views: 90966
Like: 644
In this video, a game is created in Microsoft’s QBasic, from scratch. You see me type every line.
The background music has been created by me with the exception of the last song, which is created by Skaven / Future Crew. The S3M player (both of them) have been also written by me, though I created them long before making this video.

Twitter:
Patreon: (alternatives at )
Twitch:
Homepage:

Microsoft QBasic was shipped without extra charge with MS-DOS versions 4 through 5.
It was a popular programming platform for beginner programmers back then. Even today, it remains one of the easiest platforms to start programming something visual. In this video, I go a step further and demonstrate that it is even possible to play modular AdLib music (S3M files) with QBasic.

The source code (and the script I used for reference when creating this video) can be found at:

The QBasic S3M player can be found at:

45 Comments

  1. do not use bad words, dude
    " GIVE RESPECT & GAIN RESPECT'

  2. at 1:28, my QB says, Synatax Error after putting the ":" What should i do???? i have tried restarting it. after the veiw line.

  3. you are the best! is there somewhere where you can download the code

  4. I thought I knew qbasic well, now I feel like a noob.

  5. Shoham Chakraborty, Google+ will not allow me to approve your non-spam comment that is marked as spam for no reason. You get syntax error at that point in the file because Plot has not been defined yet; it will be defined a bit later. Ignore the error message, or turn off the "Syntax checking" option from the menus.

  6. Kizzeret, Google+ says I am not allowed to comment on your post when I tried replying to it. So I just hope you'll see my reply here.
    I like to use certain less-known features of the language, such as DEF FN. It is one of my favourites. Other than that, there's hardly anything in this program that there is not in Microsoft Nibbles, the one distributed with QBasic. Aside from the music player that is, but I'm not really explaining how that works in this video.

  7. OMG!! This is AWESOME!!You must be a genius to do this…
    BTW dont u think dat C++ is a better language 2 do this kind of programming?

  8. Wow! such a knowledge… still! i cant preform the same. This is kingly! I do understand it allmost fully. I was on the walls!

  9. HEJ can anyone please tel me how to make a bracket in qbasic

  10. What was the command that you used in DOSBox to get the EDIT like notepad?

  11. Hey Bisqwit. Do you know of any PDF manuals or books that go into deep understanding of the Qbasic language. Looking at your code I see a lot of arrangements to code I've never seen before like for example:

    DEFINT A-Z 'No idea what that is. (Update: This means that all letter from A-Z become Integers)

    (This was a stupid question. [Erased]

    CONST maxSnake = 50, maxLength = 300 'Didn't know you can use CONST like this

    VIEW 'Another keyword I learned from watching this video.
    =========================
    Here's the FOR LOOP you did in your code
    FOR x=0 TO w-1: Plot x,0, wallcolor: Plot x,h-1, wallcolor: NEXT 'What interests me is the (:) that you used. What is its
    'purpose in that (Update: The (:) is used to shorten code
    'into a single line.
    ===========================
    And lastly I saw you use the DATA keyword in the video you did for making a Tetris clone in GW-Basic (I know this is not the tetris video but since I'm typing all this here I might as well). I found it very interesting how you used:

    DATA CC,8C4,6C,4444,F0,264,C6,E4,4C4,4E0,464,8E,C88,E2,226,2E,88C,E8,622
    and
    DATA 0,0,0,0, 1,2,1,2, 3,4,3,4, 5,6,5,6, 7,8,9,10, 11,12,13,14, 15,16,17,18

    Were you drawing the Tetris block with the ASCII character (219) within the binary code. as your example says here:

    32 REM e.g. 8C4 = 1000, 2E = 0010
    33 REM 1100 1110
    34 REM 0100 and so on.

  12. Awesome. Too bad my knowledge of QuickBasic is too low and there isn't a lot of resources explaining advanced QuickBasic code in a simple, convenient manner.

  13. I always wonderd. Who is more pro in coding. The people who code. Or who made the programs like basic, qbasic, up to java/c++ and unity etc?

  14. can you share theme4_2.s3m?

    because its realy a beautiful song

  15. Check out my GTA style video game programmed in Qbasic! 🙂 Official trailer on my channel

  16. Well now ima get my old computer (VirtualBox), Grab my keyboard (laptop), and start coding (wasting my life)!

  17. CAN YOU PLEASE PROVIDE ME THE LINK FROM WHERE I CAN DOWNLOAD QB64

  18. there is an error on my 24th line can you verify that

  19. Great appreciate your work bro! It's working nicely

  20. bisqwit can you please write the proggram in the comment because i have been trying making it since one month (2 hours on tuesday), but unable to make the game.
    please also tell the version of q basic you are using because i dont think there is any version left that i have not tried for making this game.

    so i think that anyone or you would be replying to me soon
    Regards
    Mango cart

  21. PLAY "MBT160O2>L20CDEDCDL10ECC" ' This is from Nibbles!
    please help me with this line.
    it is showing some kind of sub/function error.
    please respond
    Mango Cart

  22. can you make a video on how to make gorillas game in qbasic?
    I am trying but i cannot make it

  23. How does PSET compare to DEF SEG + POKE in terms of speed?

  24. Hi Bisqwit. I'd like to ask for your opinion concerning books that I can find online. As well as programming talks and other books and media. Do you know of any books/Talks that go into Binary and how to use it in my code? Also, I'd like other topics included Programming concepts, POP and OOP (if that can be used in QBasic that is.)

    I'd like to increase my understanding in these areas and get more practice using these concepts of using Binary and POP/OOP concepts.
    Thanks!

  25. hey dude i know this is a kinda old project but how exactly do u import fmengineqb into the project??

  26. nvm i figured it out haha, shame i saved and everything and the snake game ended upmissig half the project…ah well 2 hours down the drain

  27. LOL qbasic <3 I remember using this forever ago

  28. I find it awesome but it took me a minute to figure out the music during snake was mysidia from ff4

  29. Seems ,as if the old language can still be useful today…

  30. It would be better if it wasn't accelerated.

  31. I need some help: my snake doesn’t want to go right for some reason. Every time i press right i go left and when i press left nothing happens!! Maybe I’m using the controls wrong? Im using all 4 arrow keys. Any help?

  32. Im getting a syntax error on line 22
    anyone know why?

  33. Really nice video! This was in my "watch later" list for years but only watched it today 😆 this takes me back to ~25 years ago when I started learning QBasic to try to create my own games. Good times!

  34. When I was 11, I got introduced to programming in qbasic by reading my uncle's old programming book, then I really wanted to make games with it so I searched on YouTube and I remember pausing this video at each second and painstakingly coding this character by character without understanding any of it, I am 16(almost 17) now and i got a weird happy and warm feeling while randomly finding this again

  35. Hi Bisqwit. I have converter the source code into QBasic 1.1 and will convert to exe if you want. I can also share you the bas and the exe file if you want.

Leave a Reply

Your email address will not be published.