BASICly…

Haven’t written a post for a while. The reason is that I have recently (re)discovered the simple joys, and frustrations, of BASIC programming.

For anyone under the age of 25 the Beginner’s All-purpose Symbolic Instruction Code is a simlified computing language which was first developed for home computers in the 70’s & 80’s. This is where I first encountered it, one dull summer in the early 90’s.

Back in the day, like a lot of people at the time, we had a piece of cutting edge technology known as the Sinclair ZX Spectrum (actually the ZX Spectrum +2 if you need to be picky). Now, again for the benefit of anyone too young to know, the Spectrum used a tape loading system which would mean waiting 20-30 minutes with only the screaming sound of data transfer for company, in order to play a game that you can now play on your mobile phone. With most of the games turning out to be (pre) Nintendo Hard , with no real way of saving your progress and often filled with glitches that would make Gandhi rage quit (and then it’s another 20-30 minutes of screaming  data transfer.)

Of course, not all the games were terrible – there were some good text adventure games, industry standards such as Dizzy (notably Fantasy World Dizzy),  joystick-busting sports games and hit-or-miss movie tie-ins (Batman was quite good). You can see a full list here and (thanks to modern technology) you can even play some (minus the screaming).

Anyway, back to the BASICs, many of these games would include humourous asides and daft messages hidden by the programmers. Inspired by these, I became fascinated with the idea of constructing my own (simple) games for my own amusement. So I tought myself the basics of BASIC over that summer and started typing.

It was not long after that I discovered the frustrating side of home programming. The version I had on my trusty Speccy had an annoying quirk that wouldn’t let you enter a line that the computer did not recognise. This was annoying if (as was often the case) you were thinking two or three lines ahead, yet, every time you entered the first line you were halted by a heavy error tone and the dreaded flashing red cursor of pain. It simply would not allow you to move past this line until the error was corrected (usually because you had put a “,” or “;” in the wrong place).

[At least I had the “+2” model – older versions didn’t allow you to type keywords or commands directly, forcing you to remember the specific keyboard shortcut for the command you wanted e.g. “sym shift” + “P” for PRINT with more obscure commands requiring the use of the “cap shift” key aswell as shift and the letter. Don’t go thinking that the shortcut keys made any sence either – “LOAD” (one of the most widely used commands for non-programmers) was located under the “J” key  (because “L” was reserved for the oft-used LET command)]

Passing the red cursor test was no guarantee of success, however, as it only meant that the line could be understood and executed by the computer. Any “unexpected” outcomes usually ment a human error which would have to be manually identified and corrected. This was time-consuming to say the least, as you scoured lines of programming to find that one instance where you typed “100” when you ment to put “10”.

Not that anything that I came up with could be called a game in anything but the broadest definition of the word. I spent most of my time making the screen produce crazy patterns using the LINE command [in conjunction with a FOR-NEXT loop] or producing stupid little “things” to annoy my brothers (because I could do it and they couldn’t). Mostly it was things that looked like this:

10 PRINT “Hello”
20 INKEY$, “Enter your name: “,name$
30 PRINT name$, ”  is gay! Ha Ha.”
40 REM I was about 10 at the time.

Eventually however, the age of home computing came to an end making way for the more advanced, instantaneously loading, cartridge-based consoles [The likes of Sonic The Hedgehog would’ve made even the most powerful ZX “10 HAVE KITTENS: GOTO 10” ]. So my beloved Spectrum became a remnant gathering dust in the corner as joystick waggling gave way to button mashing.

And so the story of BASIC should have ended… until, two generations later, it made an unexpected resurgence. It was when I first bought my PlayStation 2 (which remains my console to this day) and found the free demo disk which accompanied it. On this disk were the usual demo levels and previews of “current” games but hidden amongst them was one “extra” cheekily called Yabasic (Short for Yet Another BASIC).

Most, I’m sure, would have looked at it, said “huh” and then discarded the disk completely in favor of a proper game. I, on the other hand, recognised it immediately and, if only for the sake of nostalgia, couldn’t resist having a play around. I found it much like what I was used to (using the same standard commands) with a few notable improvements:

  1. It allowed user-defined “labels” which negated the need to number each line (previously, manually renumbering your program could take hours and was almost guaranteed to break your game if you didn’t pay immaculate attention to where the GOTO/GOSUB commands were pointing).
  2. It allowed you to copy and paste sections of your program which saved on re-typing and ensured consistancy.
  3. It allowed use of the full spectrum of colours (using the same 255 RGB system that you are looking at right now)
  4. It had a self-contained reference manual which made learning/refreshing how to use it ridiculously simple.

So, picture the scene, I’m sitting at a machine of mind-bendingly advanced graphical capability (at least when compared to the “Legoland” graphics of the original Playstation – when compared to the humble Spectrum that infinity loop becomes “10 NOTHING: GOTO 10” [an infinity of nothing – that has to be some kind of paradox] ) and I am using it to make the screen produce crazy patterns using the LINE command and producing stupid little “things” to annoy my brothers [I did/do also play the games – I’m not a complete imbecile – maybe just 79% imbecile, the remaining 21% is moronic].

I’m not going to lie and say it wasn’t a fun thing to play with but there was one major flaw – a catastrophic one. With the PS2 lacking a keyboard (or more accurately, my lack of willingness to buy a keyboard for the sake of one application – again, I’m only 21% moron here) you were left to punch in the program by navigating an on-screen call-up keyboard like you were entering your name on a high-score screen at the arcade.  This ment that you typed at a ludicrously slow pace and, even with copious use of the cut/copy/paste functions, inputting even the simplest program became an arduous
process. This grueling effort, coupled with the redundancy of the attempt, ment that the novelty soon wore off and the Yabasic disk met the same fate as the ZX (not before filling a memory card full of unfinished games and fragments of program which, incidentally, I can’t bring myself to wipe)

And now… the story starts again. Because, like I said 1,196 words ago “I have recently (re)discovered the simple joys, and frustrations, of BASIC programming.” That’s right, I found a version of Yabasic for use on the PC which is seemingly the perfect marriage of the classic ZX form of BASIC and the version ported onto the PS2. You could say it is just the PS2 version with the use of a keyboard (and minus a reference manual) but there are some differences, the most visual being that the graphics window opens into a separate window from the text, but there are a few changes in the language aswell. (mainly in the way which you input data and variables in to a line [e.g. the old way of making something red was to type “SETRGB 1,255,0,0” now it is the simpler “Colour 255,0,0” (where you would have put “SETRGB 0,255,0,0” you now use the command “Back Colour 255,0,0” )])

And the best thing is that your programs are written and saved as a NotePad document (using the file type .yab). This means your programs can be easily exchanged amongst your friends in the form of e-mail attachments or on memory sticks ect.  So long as your friend has their own version of Yabasic.

Which brings us to the really best thing about Yabasic – It’s free!  That means that, so long as you include a link to where the download is, anyone you send your program to will be able to view it.

So that’s what I’ve been doing and why there haven’t been any proper posts for a while (and may not be for a while yet). Sorry about that, but if I come up with anything good then I’ll try to find a way of sharing it with you all (but posting up Four million lines of BASIC might be a bit annoying!)

If you would like to try Yabasic for yourself – you can find the download here.
But if you are going to do that then you had better bookmark the manual.

All that is left is to thank Marc-Oliver Ihm and his small team for being very, very clever.

One Response to “BASICly…”

  1. […] I mentioned in that article, and also alluded to in another, I am not much of a gamer and I never even bothered to replace my PS2 with a newer generation […]

What do you have to say?