
Black Annex: A QBasic Game for the 21st Century (2013) - miobrien
http://www.gamasutra.com/view/news/190504/Black_Annex_A_QBasic_game_for_the_21st_century.php
======
guidedlight
I just found this video of it. Incredibly impressive if that is QBasic.
[https://www.youtube.com/watch?v=ZqlveWIhCFI#](https://www.youtube.com/watch?v=ZqlveWIhCFI#)

~~~
dom0
Back in the day there were SVGA libraries (like aklib) that allowed high-
resolution (like 1280x1024 modes) graphics; but even on contemporary GHz
desktop processors it wasn't _fast_. Also sound systems using background
daemons that relayed stuff to DirectSound (or FMOD, not entirely sure after
all these years).

This seems to be written in QB64 using SDL with OpenGL surfaces.

~~~
guidedlight
I think you are right.

QBasic was only capable of 320x200 with 256 colors.

~~~
joneholland
You could link against native libraries. There were a handful of graphics
libraries written in assembly that we used to do fast blitting and resolutions
higher than 320x200.

Back in those days, drawing a pixel was just writing to the vga memory buffer,
so it was pretty easy.

------
ocdtrekkie
"The game, at the moment, requires about 2.6GHz on a single core to run good.
It's just about unacceptable for a game that looks like it was made in the
90s."

Wow.

I am really curious all the things he had to write himself to make this work.
I presume he's basically written his own isometric game engine and map editor
from scratch in QB, which is... impressive.

I kinda wish he'd ship the code with the game... I want to see it.

~~~
googamooga
Here is the code:

[http://www.qb64.net/forum/index.php?topic=12348.0](http://www.qb64.net/forum/index.php?topic=12348.0)

Though it won’t compile with ordinary QB compiler.

~~~
jacobparker

      $ curl -s https://gist.githubusercontent.com/anonymous/8fdec5275b2c3e81e1e1/raw/blannex | wc -l
      23708
    

Impressive. I wonder if it's edited as a single file.

~~~
copx
In QBASIC/QuickBASIC the IDE is not file-based. By default it only shows the
content of the current sub routine, as opposed to the content of a file.

If you want to look at / edit a different subroutine you open the sub routine
selection dialog and select the one you want which then becomes the currently
displayed one.

In the same way, if you want to add a new subroutine to the program you open
the subroutine creation dialog, give it a name and then the IDE automatically
makes the newly created subroutine the currently displayed one. I.e. you are
only ever looking at one subroutine at a time.

Screenshot of the subroutine selection dialog:
[http://synapticnulship.com/blog/wp-
content/uploads/2011/01/q...](http://synapticnulship.com/blog/wp-
content/uploads/2011/01/qb-subs-shk-c.png)

Sounds limiting to programmers used to modern IDEs where you usually look at
multiple functions at once, but I remember it fondly. There is something to be
said for completely focusing on one sub routine at a time and for the IDE
presenting your program that way, while everything is actually stored in one
big file.

~~~
jacobparker
Wow, I don't remember that part at all (I was really young when I used it.)
Thanks.

------
klangaroo
hahah I'm the guy making this game. Funny to see it show up on Hacker News
again (last time was in 2013).

Here's the latest gameplay video:
[https://www.youtube.com/watch?v=gkYcmipETak](https://www.youtube.com/watch?v=gkYcmipETak)

And you can wishlist it on Steam at the moment:
[http://store.steampowered.com/app/248590/Black_Annex/](http://store.steampowered.com/app/248590/Black_Annex/)

~~~
klangaroo
I mostly post about my work on Twitter if you actually wanna keep up with my
stuff :)
[https://twitter.com/manfightdragon](https://twitter.com/manfightdragon)

------
pan69
How is this game distributed? If I remember correctly, QBasic was bundled with
MS-DOS (from v6 onwards I believe) and wasn't able to produce EXE's.
QuickBasic was a separate commercial version that was the able to produce
.EXE's.

~~~
notpeter
The original QuickBasic/QBasic could definitely generate standalone compiled
EXEs using the Basic Compiler (BC.EXE). IIRC it wasn't included until QBasic
4.5 and was expanded further in QB7 (aka Basic Professional Development
System).

~~~
copx
No, QBASIC could not.

QBASIC was a limited, interpreter-only version of QuickBASIC which you got for
free with MS-DOS.

QuickBASIC was a separate commercial product from Microsoft which did include
an AOT native code compiler.

~~~
pan69
I thought so as well, so I decided to Google it:

    
    
        QBasic was intended as a replacement for GW-BASIC. It was based on the earlier QuickBASIC 4.5 compiler but without QuickBASIC's compiler and linker elements.
    

So, from this, QBasic was not able to generate .EXE's.

[https://en.wikipedia.org/wiki/QBasic](https://en.wikipedia.org/wiki/QBasic)

------
cabaalis
If you used QBasic to learn to program as a kid (which I did) then you might
be interested in AppGameKit[1]. I would recommend it, however I must mention
that I've become used to OOP and it is difficult to go back to a language that
doesn't have it. So I haven't dont anything serious with AGK yet. Though there
are many who have.

[1] [https://www.appgamekit.com/](https://www.appgamekit.com/)

------
constantlm
QBasic was the first language I dabbled in as a kid. This is absolutely
insane!

~~~
jmcgough
Same - I remember being in elementary school, playing nibbles or gorillas and
then poking around in the source, trying to figure out what it was doing.

~~~
wybiral
Nibbles or gorillas brings back memories...

------
zem
i taught myself c by prototyping programs in qbasic and then converting them
to c. nice language, and for their time, the integrated help files were some
of the best i've seen.

~~~
wybiral
Bingo. My computer as a kid wasn't even connected to the internet so those
help files are the only way I would have learned. That, and breaking the few
programs that were included with it.

~~~
jlebrech
seems like a great way to teach programming to kids, put on a raspberry pi
with a few games and programs already make for it.

maybe a modern way to do somethign like this would be pico-8
[https://www.lexaloffle.com/pico-8.php](https://www.lexaloffle.com/pico-8.php)

------
lynxbat
I discovered recently one of my new neighbors just retired from MSFT and was
one of the original members of the QBasic team. Considering how much time I
spent as a kid learning on it, I was kind of star struck.

------
Vanit
iirc it even has Steam integration that he had to implement from scratch. :)

------
scrumper
The screenshot is telling: "Framerate: 4"

Pretty mighty achievement though: no engine, no frameworks, no graphics SDK, a
quirky language...

~~~
khedoros1
\- Most 2D games I've played use their own engine.

\- Why would a framework be necessary?

\- QB64 provides a graphics API, a wrapper around SDL and OpenGL.

\- QBasic isn't _that_ quirky, and QB64 looks like it pretty massively
expanded the language. QBasic itself allowed for struct types, a limited
dynamic memory allocation, and the standard flow control structures.

The author apparently modified QB64's use of SDL/OpenGL to handle some scaling
differently.

It's impressive as a solo game project and interesting for the nostalgic
connections. I respect anyone who can get through a project like this on their
own, but it just doesn't seem _that_ unusual.

~~~
scrumper
I don't play as much as I used to, but these days most 2D things I come across
are based on Unity.

Was not aware of the extensions made in QB64 over QBasic (though I knew the
author had extended QB64) - thanks for pointing that out.

~~~
khedoros1
It seems like Unity really blew up around 2013. The first references that I
can find to this game are from April 2013, so he'd likely been working on the
engine for a long while before that.

And most of what I've played reach back before then too ;-) My point was that
Unity's probably been used for "just" a few hundred games, mostly in the past
4 years.

~~~
scrumper
And also I don't think he'd have chosen Unity either; he talks a lot in the
post (or the forum, I forget which) about being very comfortable with QBasic
and choosing it for his familiarity with the language.

------
zem
also relevant is james hague's "slumming with basic programmers", one of my
favourite programming essays ever.

[http://prog21.dadgum.com/21.html](http://prog21.dadgum.com/21.html)

