Friday, May 05, 2006

Basic part III

I've been talking over the idea of doing a simple BASIC with Russell, and although he thinks I should compile to a virtual machine from the outset. I've never written a compiler before, but I think it'll take enough time to actually write the basic in the first place, so I dont want to start writing a compiler as well! The good thing about this kind of stuff is that you can easily add a cimpiler at a later date, so I think I'll stick with my original plan.

Which is....

  • Simple Basic langauge based on spectrum and BBC basic.

  • Multi-plane CharacterMap and Bitmap screens

  • Simple sprites of variable size

  • Simple sounds via WAV sounds (or similar)


  • With these basics, you should be able to construct most 2D games. I really don't want to get into 3D, as the idea is to let kids learn, and you don't learn much by jumping into the deep-end from day one.

    The best thing would probably be to pre-process the BASIC text file into tokens and then "run" them - kinda like the way old Sinclair Spectrum worked. This also lets me define global variables, procedures, and the main code.

    Russ and I decided to get Andrew to write a small game to help train him up. I suspect that he'll manage fine, but the trick will be for him to carry the lessons over into his other projects. When I tried the other day to give him pointers, he didn't see why it was needed, and thought his code was fine the way it was. Part of the trick in games coding is writing something, and rewriting it over and over until its small enough, and fast enough, but these days with all the CPU power available to the average user, its easy to lose sight of that. Windows is a good example, in the days of Windows 3.1, it was actually around the same speed as what we have today, in fact in many ways it was way quicker. Whats changed? People have become used to all the power, and have wasted. Windows is full of really bad code, the fact that it can take a whole minute to enter a directory, or bring up the add/remove programs dialog shows this.

    No comments: