Fun and the Necessity of Programming

Loading, loading, loading....R Tape Loading Error...I think when I write my autobiography, the title of this post will match the title of the book! I owe a lot of what I know about how computers work to the home computers of the 1980s. I had a (several actually) Spectrum, and later on an Atari ST (FM…then an E….then a Mega…). Lack of internet and (being around 10 years old) lack of money, along with a long held interest in taking things apart, led to learning how to write programs – games, utilities, whatever. I couldn’t just pop on the net to download a program to do something, I couldn’t go down the shops and buy one, so I wrote one myself. I wrote platform games, I dabbled in 3D, I wrote image compression algorithms that worked like JPEG before JPEG was popular…later on I wrote routines to compress audio in a similar manner. A few years later the MP3 explosion happened – I should really have profited from those two things…

The biggest thing for me about the whole experience was how much fun it was. The challenge of solving a problem. The thrill of actually seeing my solution working…then being able to save it tape or disc…and watch it work on someone else’s computer!

My kids have a foundation in programming. One is only 8, but knows the basics of application design and how to get the computer to do STUFF. Straight out teaching doesn’t work to well – but when they have a problem to solve, that’s when the magic happens. And the concepts and principles can be quite easily translated to PHP or JavaScripting, so that also keeps them amused.

Instead of looking for a pre-made solution on the internet, it’s a good exercise to get them to think it through and see if they can come up with their own solution. Obviously, there’s no point in reinventing the wheel – I myself am quite partial to some JavaScript libraries – but if it gets the kids to think rather than accept the solutions and ‘truths’ they are told, so much the better.

Now, must be off. Apparently I need to play Minecraft. The joys of parenting! :)

Programming games…again…

I started programming in nineteen-eighty-something, with a ZX Spectrum that my dad bought. I recently asked him about this purchase, as I'm pretty sure I remember buying one from WH Smith's in Nottingham, but he can't remember exactly where it came from. Well, I suppose it is the best part of thirty years…

Anyhoo, after playing games on the Speccy for a while, I got bored (as usual). When I was young and got bored, I took things apart to see how they worked. Luckily, I decided to take the Spectrum apart mentally rather than physically, and started hacking around in BASIC to see what I could do.

A lot, apparently.

I wrote games, utilities, simulators….then eventually moved on to the Atari ST and did the same thing. I dabbled in programming the Amiga, but never got very far with that – I didn't own an Amiga, so time for programming was limited! By 1992 I had 3 Atari STs (STFM, STE and a Mega with a hard drive), umpteen Spectrums, and a PC. Probably a 486. Maybe a 386. It definitely had DOS though.

Then I went to college, learned PASCAL and COBOL, and promptly gave up programming. Hmmm.

I dabbled from time to time, and then got in to web programming with PHP ending up being my language of choice. OK, I am more than happy to admit it's a scripting language rather than a full blown programming language, but whatever!

I've now started teaching my kids to write programs. Thought we'd start simple with a bit of logic, so I downloaded Just BASIC and knocked up a few simple programs with them, using variable manipulation, screen output and IF statements. Nothing exciting yet.

And then it occurred to me – I could write a game with this stuff! Which means my new mission is to write a game in Just BASIC…and it's already begun. It will be a simple concept – a bit like an arcade version of Othello – and has probably been done before. But I just want to prove 'I STILL GOT IT!'

Achieved so far:
  • Programmable maps
  • Keyboard reading loop
  • Screen update subroutine
  • Maze collision detection
  • Flipping of tiles logic
And that took about an hour. Updates to follow!!