[HN Gopher] The Good Ol' Days of QBasic Nibbles
       ___________________________________________________________________
        
       The Good Ol' Days of QBasic Nibbles
        
       Author : elvis70
       Score  : 77 points
       Date   : 2022-05-14 04:59 UTC (3 days ago)
        
 (HTM) web link (www.thecodedmessage.com)
 (TXT) w3m dump (www.thecodedmessage.com)
        
       | rsecora wrote:
       | Hacker news is becoming a nostalgia site. That direction is
       | neither good, nor bad. Just a comment.
        
         | 2000UltraDeluxe wrote:
         | Yeah. I suspect it's because people still like to tinker, while
         | most current developments are intended for massive scales and
         | not hobbyists.
         | 
         | On the other hand, the amount of political/news related content
         | has also gone down lately. It might also be that people want to
         | think about something else than the horrifying things going on
         | in the real world.
        
         | [deleted]
        
         | thrower123 wrote:
         | I welcome anything related to programming and especially the
         | history of programming that pops up on here.
         | 
         | There's an incredible amount of ignorance of what has been done
         | before and why things are the way they are, that I encounter
         | continually
        
         | mmcgaha wrote:
         | I have noticed that a lot of the 80s and 90s computer nostalgia
         | guys on youtube are a lot younger looking than I would expect.
         | I feel like it is just folks geeking out on history somewhat
         | like I could geek out on music culture from five years before I
         | was born. Either that or the Retro Recipes guy has some amazing
         | genetics
         | https://www.youtube.com/channel/UC6gARF3ICgaLfs3o2znuqXA
        
           | mattl wrote:
           | He's also an actor so they probably skew a little better
           | looking.
        
         | xnorswap wrote:
         | One possible conclusion of that observation is that the
         | upcoming generation of programmers and software developers
         | aren't hanging out here but somewhere else.
         | 
         | I'd love to see a plot of median active account age over time.
        
           | nrclark wrote:
           | Where do you figure that is? I'm always looking to broaden my
           | horizons.
        
             | 0xFF69B4 wrote:
             | I'm guessing somewhere along the lines of
             | /r/learnjavascript or /r/learnpython. The browser is the
             | lowest barrier REPL/Interpreter installed on any modern
             | computer and it's possible to make somethig analogous to
             | GORILLAS.BAS with MDN, an HTML5 canvas and a few lines of
             | JS.
        
       | Timwi wrote:
       | I translated QBasic Nibbles to C# and it runs in a modern console
       | window. https://github.com/Timwi/CsNibbles
        
       | bane wrote:
       | And you can play it (and Gorillas) today!
       | 
       | https://archive.org/details/NibblesQbasic
       | 
       | https://archive.org/details/GorillasQbasic
        
       | iamthepieman wrote:
       | I learned to program on my dad's commodore 64 when I was 7 by
       | modifying the source code of nibbles and the game where a gorilla
       | threw bananas. A few years later I was making "AI" chat programs
       | that just used giant 'if' blocks to anticipate every possible
       | word or phrase I could think of and spit out a response. I credit
       | that early naive programming experience for teaching me self-
       | actualization. I could change the world. A tiny insignificant
       | piece of it, but 7-10 year old me felt like a magician.
        
         | bitwize wrote:
         | Nibbles and Gorillas weren't on the C64 back then. They were on
         | PCs, which Commodore did make a few of.
        
           | iamthepieman wrote:
           | I swear I remember doing this on a c64 but maybe it was on my
           | dad's Tandy PC after I inherited the old C64.
        
       | choult wrote:
       | Q(uick)Basic was my first programming language, and as others
       | mentioned NIBBLES and GORILLAS.BAS were bundled with it. It also
       | had the ability to compile down to an executable, which was
       | fantastic.
       | 
       | One bundled script I don't see mentioned yet was SORTDEMO.BAS -
       | this is still my ideal for demonstrating different sorts
       | visually:
       | 
       | https://www.youtube.com/watch?v=leNaS9eJWqo
        
         | BeetleB wrote:
         | > It also had the ability to compile down to an executable
         | 
         | The one bundled with DOS didn't. You had to buy the full QB
         | package for that.
        
       | distantsounds wrote:
       | Nibbles was fun, but Gorillas was the real gem of QBasic.
        
       | JoeDaDude wrote:
       | Good Ol' Days indeed. I remember sabotaging Gorilas.bas so my
       | opponent always had a random gravitational constant to deal with.
        
       | WalterGR wrote:
       | The first game using this concept of gameplay that I can remember
       | is Worm of Bemer, circa 1984. Typed in by hand, of course, from
       | COMPUTE! magazine.
        
       | DawsonBruce wrote:
       | Wow, thanks for this. Qbasic was also my first language which was
       | introduced to me by a kid in my cousin's neighborhood growing up
       | (along with IRC). I remember being absolutely fascinated by the
       | language (and programming in general), but didn't totally
       | understand what i was doing. I remember trying to make a Zelda
       | clone and then becoming baffled at the notion of z-order when I
       | couldn't figure out why my grass (aka green rectangle) wouldn't
       | render underneath my character.
       | 
       | Thanks for the article, glad to know I wasn't alone in this early
       | influence.
        
       | yrandom wrote:
       | An entire generation of programmers, including myself, started
       | their programming career with QBasic because it was included on
       | every computer running MS-DOS and was easy to get started.
       | 
       | I have tried to re-create this simplicity with my own site
       | (https://akedo.app) and one of the first games I re-created was
       | actually a Nibbles clone called Python
       | (https://akedo.app/play?g=8eolqpn_fk-kr1TLi_WmKw).
       | 
       | I've yet to create a Gorillas clone but that's next on the list!
        
       | foxyv wrote:
       | I used to love making new levels for Nibbles when I was a kid.
       | Not to mention changing up the color palettes and such.
       | Gorillas.bas wasn't as much fun to mod though. Not much to change
       | really. QBasic was just such an easy way to learn programming. I
       | think my Dad started me on it when I was 7 when I wanted to make
       | my own version of DOOM or something.
       | 
       | I remember programming my computer to do my math homework for me.
       | It would take me hours to code up a solution for a piece of math
       | that would ordinarily take 10 minutes. If you told the kid
       | version of me about OCR and artificial intelligence I think she
       | would have been trying to get that working on homework too.
        
       | mrozbarry wrote:
       | In the very late 90s and most of the 2000s, I hung out on
       | qbasicnews and eventually moved to the freeBasic community. I
       | even learned "basica" (basic advanced) from an old IBM 5150
       | computer originally. A lot of the reason I do programming
       | professionally is because of some of the mentoring I saw in those
       | communities, filled with lots of smart and friendly people. A
       | good friend of mine and myself learned QBasic together, and
       | played a lot of QBasic Mayhem (
       | https://www.youtube.com/watch?v=oHIAMF-EKWY ), it was so cool. So
       | many good memories around qbasic.
        
       | pjmlp wrote:
       | Being already on high school by the time MS-DOS 5.0 came out, I
       | wasn't that much into QBasic, specially since I had used Turbo
       | Basic a couple of years earlier.
       | 
       | https://en.wikipedia.org/wiki/PowerBASIC#Turbo_Basic
       | 
       | https://winworldpc.com/product/turbo-basic/1x
       | 
       | Although I guess it was alright for inspiring a generation of
       | developers, and generating revenue for QuickBasic proper from
       | some of them.
       | 
       | And naturally giving us nibbles and gorillas.
        
       | westurner wrote:
       | FWIU, QB64 will run nibbles.bas.
       | 
       | Nibbles (video game)
       | https://en.wikipedia.org/wiki/Nibbles_(video_game)
       | 
       | Here's a PyGame version of snake/nibbles:
       | https://github.com/caffeinemonster/python-pygame-nibbles/blo...
       | 
       | For in-browser games in Python with JupyterLite and the pyodide
       | WASM kernel, there are now the pyb2d bindings for box2d:
       | https://twitter.com/ThorstenBeier/status/1523573928702087169
        
       | frou_dh wrote:
       | I don't think it ever dawned on child me what the QBasic IDE
       | actually was.
       | 
       | I just thought of it as the strange place you had to go to launch
       | Nibbles or Gorillas, and IIRC never wrote any code.
        
       | dusted wrote:
       | The QBasic editor was my first encounter with an "IDE" and it was
       | so awesome that it had the entire documentation built right into
       | the program! I could barely read English at the time, but because
       | (almost) every keyword had usage-examples, I was able to plug
       | them into my programs to see what they did.
        
       | nurettin wrote:
       | The game was entirely text mode and had a smart hack to double
       | vertical space by using the top half block and bottom half block
       | ascii characters as well as the block.
       | 
       | This hack got me to look at things differently and explore more
       | possibilities each time I encountered a new problem as a child.
        
         | WalterGR wrote:
         | _Approximately_ top and bottom halves. They didn't actually
         | line up properly, which was endlessly frustrating to me.
        
         | pcthrowaway wrote:
         | Do you know where we can read more about this? Couldn't find
         | anything on google
        
           | TonyTrapp wrote:
           | It's not really a hack as such, which is probably why you
           | wouldn't find anything specific. It's just creative usage of
           | block drawing characters 0xDB, 0xDC and 0xDF as found in code
           | page 437 and others:
           | https://en.wikipedia.org/wiki/Code_page_437
           | 
           | The play field has double the height of number of available
           | characters vertically, but with characters 0xDC and 0xDF you
           | can effectively double this resolution because 0xDC just
           | fills the lower half of the block while 0xDF filles the upper
           | half.
        
             | pcthrowaway wrote:
             | I wonder why they even needed to do this. If I remember
             | right, there was another draw mode in Qbasic where you
             | could basically just flip individual pixels, rather than
             | just use ascii characters.
        
               | TonyTrapp wrote:
               | They could have used a graphics mode, yes. But using
               | regular 80x25 text mode made the game more accessible in
               | terms of required hardware (both graphics hardware and
               | processing power, especially with a "slow" interpreted
               | language like QBasic), which could arguably have been an
               | important factor for writing this kind of demo program.
               | 80x25 text mode was available on all graphics cards
               | including old CGA cards. There was no comparable graphics
               | mode on CGA with the same resolution and number of
               | colors. Their other demo game - GORILLAS.BAS - used EGA
               | graphics instead.
        
               | ygra wrote:
               | The graphics modes also varied wildly regarding text
               | readability (with sometimes different fonts or different
               | font sizes at least). This approach let them have just
               | normal text as it otherwise also appeared.
        
               | tetraca wrote:
               | There were quite a few draw modes (SCREEN 7 had a high
               | resolution, SCREEN 13 had the most colors available), but
               | I would reckon that the text mode was a lot faster and
               | easier than trying to do things with the built in
               | graphical functions.
               | 
               | If you wanted to make anything mildly complicated you
               | were better off using a community built external
               | graphical libraries (there were two major ones, but their
               | names escape me).
        
               | TonyTrapp wrote:
               | I can think of a few (DirectQB, BlastLib, UGL, ...) but
               | they all appeared much later than the original QBasic
               | demo programs (late 90s / early 00s). At the time these
               | games were written, if you really wanted faster or better
               | graphics, you probably didn't use QBasic to begin with.
               | And most importantly, if my mind doesn't play tricks on
               | me, I think those libraries only worked with QuickBasic
               | (the commercial compiler), not QBasic (the less feature-
               | right interpreter shipping with MS-DOS). The only
               | assembly speedups you could have in QBasic were through
               | CALL ABSOLUTE.
        
           | bluedino wrote:
           | https://www.vogons.org/viewtopic.php?t=85598
           | 
           | Interestingly enough it was used in even older times to make
           | 40x25 text look like 80x50 gfx
           | 
           | I remember a PacMan clone that used the text mode graphics
           | like that.
        
             | mzs wrote:
             | check-out pacman.tgz
             | 
             | http://www.sylvain-huet.com/?lang=en#pacman
        
       | password4321 wrote:
       | Also discussed recently: BBC Basic for SDL 2.0
       | 
       | https://news.ycombinator.com/item?id=31362321
       | 
       | Which includes a Gorillas example, not sure about Nibbles.
        
       | nishparadox wrote:
       | This made me nostalgic. Back in the school days, I used to write
       | all sorts of QBASIC programs: creating quizzes, basic animation,
       | solving math equations, etc...
        
       | entropy_ wrote:
       | I had a very similar experience with Nibbles. It was my first
       | time reading a program and modifying it. The initial motivation
       | was that we'd bought a new computer and it was suddenly
       | unplayably fast. Found the busy loop that slows things down and
       | added a 0 to the limit. From there my brother and I started
       | modifying other things, adding levels, etc...
        
       | softwarebeware wrote:
       | Wow! I can't believe someone else had the same formative
       | experience that I did. I remember this was how it all started in
       | software for me! There was a local newspaper interview I did in
       | high school (one of those "spotlight a student" type things) and
       | I said that I wanted to work for Microsoft in it. It was all
       | because of QBasic and Nibbles! Thanks for the write-up, that
       | definitely brought back memories.
        
       | fancyPantsZero wrote:
       | I also cut my teeth as a preteen with qbasic, modifying
       | Gorillas.bas :)
       | 
       | I had gotten ahold of a qbasic extender that somebody published
       | along with a "learn games in qbasic" book. It was a TSR that
       | would expose some extended functionality to the qbasic runtime
       | environment, allowing a 320x200 8bit color mode that was really
       | fun to play around in. Anybody else remember this TSR?
        
       | jmmv wrote:
       | Nice article, and happy to see it on the front page!
       | 
       | QBasic was very impressive for its time. It feels as if we lost
       | that kind of integrated editor sometime in the 90s and are now
       | only coming up to a similar level of integration... at a much
       | higher cost. QBasic's interface, integrated help, debugger, etc.
       | were a joy to work with (similar for Turbo C++, etc.) And the
       | same applies to Visual Basic later on, although that's kinda out
       | of scope for what we are discussing here.
       | 
       | Anyhow. I also wanted to mention EndBASIC
       | (https://www.endbasic.dev/), a little project I've been working
       | on and that tries to recreate a similar BASIC and MS-DOS hybrid
       | environment. (Spoiler alert: it runs in the browser as well as a
       | desktop app so it's trivial to test it out!) The end goal is to
       | be able to write games like Gorillas and Nibbles -- and so far I
       | got a pong clone running, which means it's getting pretty close
       | to that goal! I'm currently working on adding some needed
       | features, like... user-defined functions, a better type system,
       | and the ability to run publicly shared programs with just a URL.
       | So stay tuned for more :)
        
         | mattl wrote:
         | There was VB for DOS which had a similar interface.
        
       | bluedino wrote:
       | > But also, there was no particular reason why the stuff I was
       | doing couldn't be done by any other elementary schooler, if there
       | were interest in the schools in teaching it.
       | 
       | As another 11-year old who experimented hacking the source code
       | to this, along with GORILLAS.BAS, and having limited success,
       | this would have been amazing if the schools taught it. Instead,
       | early 90's "computer class" involved only typing tutors and
       | Oregon Trail.
       | 
       | It's a complicated enough program to be fun, structured well,
       | fast iterations since it's interpreted... Just to have a teacher
       | explain a lot of it and then set the kids loose on making their
       | own changes would have been great. An advanced class could re-
       | write it in C or Pascal or create their own new game.
       | 
       | It'd still be just as useful today.
        
         | MisterTea wrote:
         | > Instead, early 90's "computer class" involved only typing
         | tutors and Oregon Trail.
         | 
         | Don't forget the LOGO turtle on the Apple II which seemed to be
         | in every damn classroom well into the 90's. It wasn't until
         | 1994 that I sat in front of a PC in high school and even then
         | it was friggin Mavis Beacon Typing Tutor (I snuck Doom onto the
         | LAN to rectify that).
         | 
         | Giving a student a simple game with the ability to hack its
         | source is a nice idea. Very basic game, 2d graphics, simple
         | procedural api or language that lets them easily poke at a few
         | lines of code. Start them in a dumb simple IDE, write a hello
         | world, draw a box, make a decision, make a loop, then introduce
         | them to the game and let them open it in the IDE and go nuts. A
         | very vary light weight version of something like
         | https://en.wikipedia.org/wiki/Squeak
        
           | bluedino wrote:
           | I always wanted to teach a kid programming by using pacman.
           | Start with a dot on the screen. Move it around. Add a maze.
           | Then use sprites. Add dots. Add scoring. Add ghosts. etc etc
        
       | jimmydeans wrote:
       | Oh man. I remember when MS DOS 5 came out. I actually went to the
       | store and bought it. To this day I still have the original box
       | and disks somewhere sitting with my windows 3 disks and 30 disk
       | Borland C box.
        
       | scarecrowbob wrote:
       | When I was a kid in the 80s and early 90s, I used to do
       | programming contests in school. I even got the equivalent of a
       | couple of "Letters" for a letter jacket, but never got the jacket
       | cause it wasn't my thing.
       | 
       | In HS, we worked on a bunch of different languages, including
       | Pascal, Fortran77, and C.
       | 
       | But we always went back to QuickBasic for the competitions. There
       | was so much less overhead with working with that system that it
       | made it way faster for coding the exercises.
       | 
       | Eventually in my second year of college I dropped my CS degree
       | because the prospect of never being able to stop learning new
       | marginalia was less appealing than studying philosophy, which
       | seemed less trivial at the time.
       | 
       | However all that programming practice stuck around, and now I've
       | made my living doing the same stuff I was doing in HS: messing
       | around trying to get some dumb game to stop crashing on a
       | computer and cobbling together tiny snippets of code to win cheap
       | prizes.
       | 
       | So here's to you QB: the reason why I was able to get a job after
       | eventually deciding not to become a professor of literature.
        
       ___________________________________________________________________
       (page generated 2022-05-17 23:02 UTC)