Click Here To Go To The Your Computer Archive



Written By Simon Woolf


Cover Art
Click Here To Enlarge Loading Screen

Loading Screen
Click Here To Enlarge Opening Screen

Opening Screen
Click Here To Enlarge Screenshot

Game Screenshot

Pikchachanja

Simon Woolf with an excellent animation program for the BBC

If you have ever wanted to try your hand at making cartoons, Pikchachanja can give you a taste of it. In effect, it is an instant animation kit. You simply draw two "key" frames, each with the same number of lines. The program works out the frames in between and stores them in memory. Then by rapidly displaying each in turn it creates a smooth 18-frame animation sequence, which cycles backwards and forwards until you press a key.

The program was inspired by Timothy Closs's Pikchachanja for the Spectrum which was published in Your Computer last April. In the same issue Nalin Sharma converted the program to run on the Commodore 64. Translating it to the BBC, however, was more difficult.

For each frame both the earlier versions simply stored the relevant section of the screen in memory and then read it back during animation. But on the BBC there is not enough RAM to store 18 frames in this way. So this program has to compact the screen information.

The technique used is to store the bytes that represent pixels and to keep a count of zero bytes which represent spaces. Naturally, displaying a compact screen takes longer than reading in a continuous block of memory. But it is still fast enough to display 18 frames in less than a second.

Even after compacting the screen, memory limitations remain a problem. Only 768 bytes are available to store each frame. This means that it is not possible to fill much more than a fifth of the screen with pixels. Consequently, the program has to check that your picture does not exceed the limit.

When you draw your key frames it sounds a warning beep as you approach the limit. You must then make sure that your remaining lines are as short as possible. If you run out of memory the program asks you to enter the frame again.

Entering frames is one of the four options available from the opening menu. The others are for saving and loading picture data, and animating a completed picture sequence.

When you enter a frame there are two drawing modes. In one, you have to plot the points at each end of a line; in the other, plotting a point - by pressing Return - joins it up to the last point on the previous line. You can switch between the two modes at any time. The drawing controls are as follows:

Z - Cursor Left, X - Cursor Right, : - Cursor Up, / - Cursor Down
I - Toggle cursor jump between four and 32 points, D - Toggle between the two drawing modes
F - Finish frame, Return - Finish line

Note that in Mode 4 a jump of four co-ordinate points is equal to one pixel.

After you have completed the opening frame the screen will clear, and you can enter the final frame. Remember here that you must draw exactly the same number of lines as in the first frame. You can, of course, superimpose one line on another - for example, to transform a square into a triangle.

The program sets a limit of 30 to the number of lines per frame. By changing the value of NUMLN in line 10 you can increase this to a maximum of 42, but you are likely to run out of memory sooner. You can also run the program in Mode 5 and by inserting your own routines create colour animation.

To enter the program, first type in and save listing 1. Now set PAGE to &1400 by typing:

PAGE=&1400:NEW

Key in listing 2 and save it on another tape. RUN it and follow its instructions to save the machine code it creates, after listing 1. Finally, save listing 3 after the machine code file. The program can be saved to disc as it stands.

Disc copies of the program together with 10 data files - demonstrating, among other things, pulsating circles and oscillating waves - are available for 5 from Simon Woolf, 8 Sterndale Road, London W14 0HS. State whether you want 40 or 80 track discs.