top | item 5561686

The best QBasic game ever?

173 points| tonteldoos | 13 years ago |pcworld.com | reply

99 comments

order
[+] Scaevolus|13 years ago|reply
It's written in QB64, a slightly more modern variant of QBasic. http://www.qb64.net/
[+] dpcan|13 years ago|reply
Yes, thank you.

He is NOT using QBasic, it's QB64. He gets instant access to some pretty sweet functionality that was never in QBasic. Transparent PNG support, resolutions with more than 16 colors above 320x200, double buffering, TCP/IP, and the list goes on.

Regardless, this guy is getting some awesome press with the QBasic thing. If you want to make money with games, it's all about the marketing.

I'll give him a little more credit if he used that tiny dos-box blue editor that comes with QB64 to code the entire game tho :)

[+] laumars|13 years ago|reply
The original QBASIC binary doesn't even run on Windows any more. It requires DOSBox emulation to run.
[+] Aardwolf|13 years ago|reply
I also wrote little games in QBasic long ago. The biggest limitation was the memory limit. That would prevent making a game like this. So if this is QB64 (which I never heard of before) then I guess that explains it.
[+] doktrin|13 years ago|reply
This is very, very cool. Speaking as someone who also wrote QBASIC games as a child, this evokes sharp pangs of nostalgia.

I happen to have an old QBASIC book (pub 1993) next to me, and was skimming through it shortly before coming across this article.

Random file I/O :

    OPEN filename$ FOR RANDOM AS [#]filenumber LEN=recordlength
The book then goes on to provide helpful ways to guesstimate at the record length of a file on disk.

Drawing 2-D "staircases" diagonally in both directions across the screen :

    PSET (0,0) 
    FOR p = 1 TO 25
        LINE -STEP(25,0)
        LINE -STEP(0,15)
    NEXT p
    PSET (639, 0)
    FOR p = 1 TO 25
        LINE -STEP(-25,0)
        LINE -STEP(0,15)
    NEXT p
    END
Nostalgia, indeed :P
[+] illuminated|13 years ago|reply
Just realised, same indentation and no-end-character rules as python :) Although I've been writing qbasic back in the days and now writing python for fun, I've never realized this before...
[+] rm999|13 years ago|reply
I learned how to program by reading through the code for qbasic gorillas (the game in the video in the article) back when I was a wee lad. Therefore, gorillas is the best game ever to me.

That said, qbasic was maybe not a best first language - I became a much better programmer when I learned C++ years later. Still, I really really appreciate that as a young child I had access to a fun game with the source code revealed. It changed my life.

[+] joeshaw|13 years ago|reply
I am also very thankful for the source for Gorillas and many simpler BASIC games before it. I started out by adding color to many existing text BASIC games and then moved on to writing my own.

Years later a friend of mine and I added modem support to Gorillas so we could play each other from our houses. Of course Scorched Earth would have been better, but we didn't have the source to that, nor the programming ability to add it at the time.

[+] bluedino|13 years ago|reply
Reminds me of 'Slumming with BASIC programmers' - http://prog21.dadgum.com/21.html

I was always amazed at the guys on CompuServe/AOL (and later GeoCities) who were writing RPG's in QBasic. I guess I was mostly impressed by the graphics they made, but they kind of proved to me you could write more than hangman or Nibbles in BASIC.

[+] BHSPitMonkey|13 years ago|reply
Just wait until PC World finds out what some game developers are making these days using C++, a language from 1983!
[+] stiff|13 years ago|reply
He has a blog: http://www.manfightdragon.com

You can see a video from there with some actual code: http://www.youtube.com/watch?v=y2nBge7wq6c

It actually doesn't seem that bad of an environment, which is a reminder that we haven't gotten that far with programming since the QBasic days...

[+] froo|13 years ago|reply
My girlfriend just told me that "this looks like something my cousin did" ... it turns out the guy is her cousin. Small world.
[+] fizx|13 years ago|reply
I used to write level editors for a game called monospace when I was a kid. Still a pretty cool game. Here's a gameplay video:

http://www.youtube.com/watch?v=A_K6yB3OsGs

[+] davexunit|13 years ago|reply
I loved that game. It's a great game with a sad story behind it. I believe the author died of cancer shortly after finishing it.
[+] polemic|13 years ago|reply
Hah, reminds me of back in my grade 8th grade (equivalent - ~13 years old?) 'typing' class (circa 1995) - a friend made a 3d engine in QBasic that let you fly a wireframe spaceship around. It was pretty amazing, all things considered.
[+] aerolite|13 years ago|reply
A friend of mine also made a 3d engine with QBasic that was a racing game when we were in 9th or 10th grade. I remember as he was developing it he was referring to a trigonometry book for a class that he hadn't yet taken. It was totally ridiculous and awesome.
[+] daigoba66|13 years ago|reply
I wrote a game in QBasic when I was 10. At the time I didn't understand the concept of a sub routine _returning_ after being called. So the end of each sub just called another sub (perhaps even the calling sub to create loops). You won by beating the game before getting a stack overflow.
[+] blablabla123|13 years ago|reply
I also used QBasic as a child, I had some GWBasic book as references which rooouuughly matched the Syntax and provided functions. But I also remember not really understanding sub routines... Anyway, this was my experience with goto and good old fashioned spaghetti code ;)
[+] craigching|13 years ago|reply
Not QBasic, but this was my first PC programming "experience" [1]. I got tired of typing these in, so I would con my Dad's secretary to type these in because she could type (I didn't really understand at the time that a secretary typing wasn't the same as a programmer typing :P).

Some worked, some didn't and I think I wasn't really old enough at the time to understand why they wouldn't, but I have a lot of fond memories and pride at getting these to work.

[1] http://www.amazon.com/BASIC-Computer-Games-Microcomputer-Edi...

[+] tdicola|13 years ago|reply
Wow, as someone who played with making games using QBasic on a 486 as a pre-teen I am seriously impressed. I have to chuckle at requiring such a fast processor to run well though. Assuming the author doesn't rely on too many DOS game programming tricks (I remember having to peek and poke various memory locations to trigger esoteric video resolutions, etc.) it probably wouldn't be too hard to convert this to run on visual basic & a .net wrapper of SDL or some basic graphics library.
[+] laumars|13 years ago|reply
He's already using SDL. Plus, QBASIC64 isn't a DOS environment.

In fact, when you look at the specs for QBASIC64 then it's a little less impressive than first made out. It also makes me wander why he didn't just learn VB anyway (as the libraries in QBASIC64 would have required additional learning anyway). Even VB classic would have made more sense.

Anyhow, this at least reminds the language elitists that a language is only as powerful as the developer who's wielding it.

[+] songgao|13 years ago|reply
When I was a child, nibbles was my favorite: http://www.youtube.com/watch?v=fZF6tnrfAX0
[+] stuaxo|13 years ago|reply
Somewhere in the depths I've got a version of this I customised ... up to 4 players, powerups, cheats and about 20 levels..

[and probably loads of bugs]

[+] baddox|13 years ago|reply
How would it perform on a state of the art personal computer in 1991, when Gorillas was released?
[+] jere|13 years ago|reply
It wouldn't according to this:

>Black Annex requires at least a 2.6GHz processor due to the scope of the project and the unoptimized multi-dimensional arrays.

[+] benatkin|13 years ago|reply
I can't find anything definitive but I suspect it would be less confusing to say "created by Microsoft" than "created by IBM". It seems Microsoft developed it but IBM somehow wound up with the copyright. en.wikipedia.org/wiki/Gorillas_(video_game)
[+] laumars|13 years ago|reply
Back then Microsoft was working for IBM, so it's not that surprising that IBM ended up with the copyrights for QBASIC. What's more surprising is that IBM didn't end up buying the whole of DOS outright (but that's another topic entirely).

Also, I seem to recall reading (or seeing a video interview) where Bill Gates said QBASIC was his last ever coding job.

[+] boyter|13 years ago|reply
I always thought that DarkDreads Mysterious Song was the most impressive QBasic game, http://darkdreams.rpgdx.net/downloads.html

This looks like it might take the title though.

[+] davexunit|13 years ago|reply
I loved Mysterious Song. It's a solid game. Whatever happened to DarkDread? He just disappeared.
[+] Klinky|13 years ago|reply
Probably one of the better games that runs within the original QBASIC was Wetspot/Wetspot 2.

http://www.youtube.com/watch?v=nv9VDvvGRkQ

[+] autodafe|13 years ago|reply
Lots of memories there. Fun fact - the programmer of that game went on to contribute to the Allegro graphics library. Going from QB to DJGPP+Allegro seemed like a natural progression, and quite a few people in the QB community followed a similar path.
[+] precisioncoder|13 years ago|reply
This was the first programming language I was taught. I got super excited with it, by the second class I already had a working etch-a-sketch. By the third I was writing a roguelike based on Moria. At the point my teacher told me to do my own thing and went back to trying to get the other less enthusiastic students to learn. I had a blast that semester, loved that class.