Blurb
Graphic design made easy!
ARTISAN is a design tool that makes the creation of single and multiple shapes easy and will provide an insight to animation techniques. You can redefine up to 128 characters at a time either singly, or as a group of up to 16 characters with facilities to manipulate, store to tape, print the created shapes and display the VDU 23 codes.
Tape 1 contains the main ARTISAN program and several animated demonstrations.
Tape 2 contains several ARTISAN data sets including: Greek upper case, Japanese katakana, inverse ASCII, invader character, chess men, icons, mathematical symbols, and all character sets used in the demonstrations.
Introduction
The BBC Microcomputer provides the facility, via the VDU 23 command, that enables you to redefine the shape of displayed characters. The major use of this facility is in the creation of shapes for games such as Space Invaders, Chess and Adventure games.
Redefined characters can also be used in language teaching, for example Greek, Japanese and Russian, or used to display 'icons' (picture words) instead of menus in word processing, spreadsheet programs, etc. Their application is endless.
Whatever use you make of redefined characters, the stages you must go through to create them are long-winded, whereby you must first design the shape as one or more characters, each of 8 rows of 8 dots (pixels), then calculate the eight parametes for the VDU 23 statement. This calculation is described in the User Guide for your machine.
Artisan 1 is a BASIC program that makes the creation of single and multiple character shapes easy. Up to 128 characters can be redefined at a time, either individually or as groups of up to sixteen characters with facilities to manipulate, display the VDU 23 codes, store to tape and print the created shapes. For shapes up to 4 by 4 characters square, you can design the shape on the screen and do not need to design the shape on paper beforehand.
This manual described the facilities provided by Artisan 1 and gives ideas on how to use the redefined characters.
Overview
Shapes may be created on the design grid using the Set, Delete, Empty, Fill, Invert, Rotate, Mirror and Get commands. As the shape is being built up on the design grid, the Mode 4 display reflects what the shape will look like true-size.
Accept the completed shape into the redefined shape block at the bottom of the screen.
Once the character set has been completed and Accepted, Transfer it from the redefined character block to cassette or printer.
Note: Save your designs frequently - Murphy's Law operates here : If anything can go wrong, it will, usually at the end of a long session just before you decide the save the final version!
Tape Contents
Artisan 1 is supplied as two cassettes: tape 1 containing programs; tape 2 containing a set of shape files.
Each tape is recorded at 1200 bps and holds an identical set of files on each side. If you experience any loading programs with either tape, simply turn the cassette over, rewind the tape and repeat the load process.
The tape contents are as follows:
Tape 1 : ARTISAN 1 Programs
The first program on your tape contains a table of contents. If you have a tape counter on your recorder you may find it beneficial to make a note of the counter reading as each program loads, for future reference.
The programs on this tape are:
Content - list of the contents of the program tape.
LOADER - loads in the main Artisan 1 program. This program must always be run in order to load ARTISAN.
ARTISAN 1 - the shape design program.
MUSIC - a demonstration program that plays Beethoven's Ode To Joy whilst displaying the music at the same time.
HUMMER - a demonstration of "tweening" - a humming bird is animated.
HARRIER - a demonstration using a Harrier jump-jet showing several animation techniques.
Tape 2 : ARTISAN 1 SHAPE SET Files
Apart from the Contents List at the beginning, the files on this tape are data files for use with Artisan 1. They are not programs and cannot be loaded and run.
The files can be accessed via the Artisan 1 Transfer command.
The files on this tape include:
SHUTTLED - several different views of the space shuttle.
GREEKD - Greek upper case characters.
KATAKANAD - Japanese character set.
CHESSMEND - set of chess men.
ICONSD - set of icons, or 'picture words'.
INVADERSD - space invader shapes.
HARRIER1D, HARRIER2D, HARRIER3D - shapes for the Harrier demo.
MUSICD - shapes for the Music demo.
FLOWERD, HUMMERD - shapes for the Hummer demo.
MATHSD - various mathematical symbols.
CYRILLICD - Russian character set.
Loading The Software
- On systems fitted wth either the DFS or ECONET interface, you must switch to the tape filing system (1200 baud) by typing:
*TAPE (RETURN)
PAGE=&E00 (RETURN)
On tape only systems, simply press BREAK. -
To load the main program type:
CHAIN"LOADER" (RETURN)
Rewind the tape to the desired point and press PLAY on your tape recorder.The program should now commence to load and will run automatically.
Once Artisan 1 has loaded the screen will clear, then after a few seconds during which Artisan 1 is being set up, the shape design screen will be displayed.
Stop the tape now
Note: Program ARTISAN1 should not be loaded direct, but must be loaded via LOADER.
-
To load any of the demonstration programs, type:
CHAIN"" (RETURN)
Rewind the tape to the desired point and press PLAY on your tape recorder.The program should now commence to load and will run automatically. Now just follow the computer's prompts.
If during loading, the screen displays messages such as:
Block?
Data?
Header?then stop the cassette player, rewind the tape to a point just before point of failure, adjust the volume setting on the cassette player, and press PLAY again.
If you are still unsuccessful, turn the cassette over and repeat the loading process.
The Artisan 1 Display
The display consists of five areas of information as follows:
Design grid: This occupies the largest portion of the screen at the top left and consists of 16 cells arranged as four rows of four, each cell containing 64 pixels arranged as eight rows of eight. Each cell represents one BBC/Electron character.
Initially all pixels are set off and the flashing cursor is placed at the top left hand corner of the design grid.
Mode 4 display: This occupies the top right hand portion of the display and repeats the contents of the design grid but true size. All changes made to the design grid are repeated as they occur on this display.
Command menu: This occupies the centre right position of the display and lists the commands supported by Artisan 1, it is intended purely as a guide.
Command area: This occupies the three lines immediately below the design grid and is where Artisan 1 prompts for commands and displays messages.
Redefined shape block: This occupies the bottom area of the screen and displays the shapes that have been created and assigned to ASCII values so far.
This display area consists of four rows of 32 characters used to display the current shapes of ASCII values 128-159, 160-191, 192-223 and 224-255 respectively.
A 'ruler' is provided on the bottom two lines to enable you to determine the ASCII code for a particular location - you simply add the number at the left end of the row (128, 160, 192, 224) to the ruler number (0-31) underneath the location concerned.
Tutorial
Feeling slightly nervous? A little apprehensive? No need to be. Artisan 1 is going to be the best friend you and your computer together ever had, so don't be afraid to try the commands.
Once they are familiar and you gain confidence you will find unlimited applications, and wonder why you ever hesitated - so go to it!
First move your cursor around with the arrow keys. See how easily it moves to any position (pixel) in the design grid.
Now try designing something - a man, a house, an animal - whatever you like, and use S (Set) and D (Delete) until you have the desired effect. Easy, isn't it?
Next use the F (fill) and E (Erase) commands.
F is handly to quickly fill a large area, but the program politely checks that the command is correct, otherwise it could overwrite other pixels.
Similarly, E erases a whole cell, and there is another check of command to ensure you don't lose something by mistake.
If after using F or E you lost something you would have liked to keep - sorry about that! We'd better take a quick look at Copy and Accept, so that it doesn't happen again, hadn't we?
C (Copy) does just that. It repeats the contents from one cell to another - or others - and overwrites as it does so if necessary. A great time-saver for reproducing shapes.
A (Accept) is used to move shapes to the holding area at the bottom of the screen once you have completed them on the design grid. One or more cells can be stored in this way; even larger pictures than the whole grid-display can thus be held - as a large shape, e.g. space-ship, submarine, etc., is gradually built up.
Now try the Invert, Rotate and Mirror commands. Pure fun! Draw something simple - a triangle for instance. Press Invert and see the filled pixels empty and the empty pixels fill - rather like a photo and negative, isn't it? Use the R (rotate) command and watch the cell re-assemble in a 90 degree rotation - always clockwise.
M (Mirror) is yet another useful effect.
G (Get) retrieves shapes you have already created and accepted; it may also be used to get at the shapes permanently stored within the computer - its built-in character set.
The T (Transfer) command is your conveyor system, and transfers shapes to and from cassette and/or printer. Remember, if you have worked hard building up a shape you wish to keep, unless you transfer it to tape it will be lost when you Q (Quit) at the end of your session.
Z (Zap) will clear the whole design grid and the 'true-size' display; so whilst it should be used with caution until you are familiar with it, Z is a quick 'clean-out' for the occasions when you have changed your mind, and want to try out other ideas before committing them to store. Sure beats the old, laborious method of deleting one pixel at a time.
Q (Quit) is "sign-off" time. Check that you have stored any shapes any shapes you wish to keep via T (Transfer). Now you should be feeling amazed at your achievements with Artisan 1, and, probably, with a happy and satisfied grin on your face! Marvellous, wasn't it?
Example Session
This section will take you through an example session of using Artisan 1. The object of the session will be to take a large shape from one of the supplied character sets and produce a version that is rotated by a right angle.
Load up ARTISAN 1
- Press BREAK
- Type *TAPE and press RETURN
- Type CHAIN"LOADER" and press RETURN
- Load the Artisan 1 program cassette into your cassette recorder and set it to PLAY
- The Artisan 1 loader should load in and this in turn should load Artisan 1
Note the cursor at the top left corner of the design grid. Use the arrow keys to move the cursor to the bottom right corner of the design grid. (It is possible to do this with just 2 key depressions - did you manage it, or you go the long way?)
Replace the Artisan 1 program tape by the data tape and ensure it is fully rewound.
Now carefully follow the steps below and watch what happens at each stage. Do not press RETURN unless told to. The arrow keys are shown as:
L - Left, R - Right, U - Up, D - Down
Step | Type | Result |
1 | T | Load, Save or eXit |
2 | L | LOAD Filename |
3 | SHUTTLED<RETURN> | First code |
4 | 128<RETURN> | Searching for... Set cassette to PLAY Loading from... |
5 | G | ASCII code |
6 | 131<RETURN> | nothing happens! |
7 | <L>G163<RETURN> | nothing happens! |
8 | <L>G195<RETURN> | |
9 | <L>G227<RETURN> | bottom row of cells completed |
10 | <U> | |
11 | <L>G130<RETURN> | |
12 | <L>G162<RETURN> | |
13 | <L>G194<RETURN> | |
14 | <L>G226<RETURN> | next row of cells completed |
15 | <U> | |
16 | <L>G129<RETURN> | |
17 | <L>G161<RETURN> | |
18 | <L>G193<RETURN> | |
19 | <L>G225<RETURN> | next row of cells completed |
20 | <U> | |
21 | <L>G128<RETURN> | nothing happens! |
22 | <L>G160<RETURN> | nothing happens! |
23 | <L>G192<RETURN> | |
24 | <L>G224<RETURN> | top row of cells completed |
You have now transferred the first Space Shuttle shape to the grid - looks a bit of a mess, doesn't it? This is because the arrangement of characters is different in the original shape at the bottom of the screen to that of the design grid - you will see why in a moment.
The cursor should currently be in the top left corner of the design grid.
Step | Type | |
25 | <U><L>R<L>R<L>R<L>R | |
26 | <U><L>R<L>R<L>R<L>R | |
27 | <U><L>R<L>R<L>R<L>R | |
28 | <U><L>R<L>R<L>R<L>R |
If you have completed all the above steps correctly, you should now have a Space Shuttle on the design grid that is flying left to right, as compared to the one at the bottom of the screen which is going up.
Step | Type | Result |
29 | T | Load, Save or eXit |
30 | S | SAVE Filename |
31 | FirstOne(RETURN) | First code |
32 | 128(RETURN) | Last code |
33 | 255(RETURN) | VDU or Data |
34 | V | Start line |
35 | 1000(RETURN) | Star code |
36 | 128(RETURN) | RECORD then RETURN |
Place a blank tape in the recorder and set it to RECORD
Step | Type | Result |
37 | (RETURN) | The shapes are saved to tape |
38 | Q | Are you sure? |
39 | Y | Return to BASIC |
40 | Rewind cassette | |
41 | *EXEC FirstOne | Searching |
42 | LIST |
The VDU 23 commands for the Space Shuttle shapes should be listed.
Commands
This section describes each of the Artisan 1 commands in detail, and we suggest you experiment with each one before creating any shapes in earnest.
Each of the commands as listed here is entered as a single key, do not press the RETURN key. Some commands act immediately with no further input from you (Cursor keys, S, D, I, R, M), some require confirmation to proceed (F, E, Q, Z), and some require additional information to be supplied (G, A, T).
In all but one case you can abandon a command by pressing the ESCAPE key, the exception if the Transfer command when you attempt to output to a printer which does not exist. In this event the system will 'hang' and will not respond to any keys except BREAK.
Since BREAK returns you to the BASIC system you must type the following to re-enter Artisan 1:
PAGE=&1100 (RETURN) OLD (RETURN) RUN (RETURN)
If the computer responds:
Bad program
after you entered OLD, then Artisan 1 cannot be re-entered and you will have to re-load it from tape to continue. In any event, it must be noted that all characters that were not previously stored to tape are now lost.
For all commands, except S, D, T, Z, and Q, you specify the cell to be acted upon by the command by placing the flashing cursor anywhere within the cell. After a command is completed the cursor is placed in the top left hand corner of that cell.
The commands that are supported by Artisan 1 are as follows:
Cursor Keys : the four cursor keys (arrows) move the flashing cursor around the design grid. If you attempt to move the cursor off one edge it will reappear in the corresponding position at the opposite edge.
S : Set pixel; this command turns ON the pixel at the cursor position in the design grid cell.
D : Delete pixel; this command turns OFF the pixel at the cursor position in the design grid cell.
F : Fill cell; this command turns ON all pixels in the design grid cell occupied by the cursor.
On replying 'Y' to the confirmation request, the design grid cell is filled and the cursor is placed at the top left hand corner of the cell.
E : Erase cell; this command turns OFF all pixels in the design grid cell occupied by the cursor. On replying 'Y' to the confirmation request the design grid cell is erased and the cursor is placed in the top left hand corner of the cell.
I : Invert cell; this command inverts all pixels in the design grid cell occupied by the cursor. All 'ON' pixels are turned 'OFF' and all 'OFF' pixels are turned 'ON'. The cursor is then placed in the top left hand corner of the cell.
R : Rotate cell; this command rotates clockwise, by 90 degrees, the contents of the design grid cell occupied by the cursor. The cursor is then placed at the top left hand corner of the cell.
M : Mirror cell; this command replaces the contents of the design grid cell occupied by the cursor, by its 'reflection', as if a mirror were held up to the cell's right hand side.
The cursor is then placed in the top left hand corner of the cell.
G : Get shape; this command copies the shape associated with the specified ASCII code into the design grid cell occupied by the cursor.
You must enter a code value in the range 32 to 255; values outside this range are rejected.
The codes 32 to 127 will access the letters, numbers, punctuation marks, etc, in the computer's ROM. The codes 128 to 255, however, will access the shapes in the redefined shape block that you have previously created and accepted.
When a valid code has been entered, the specified shape is copied to the design grid cell, overwriting the original contents, and the cursor is returned to the top left hand corner of the cell.
A : Accept shape; this command calculates the VDU 23 parameters for the shape in the design grid cell occupied behind the cursor, which may be anywhere within the cell, and redefines the character of the specified ASCII code to this shape.
You must supply a code value in the range 128 to 255, numbers outside this range are rejected, Artisan 1 then calculates and displays the 8 VDU 23 parameters. On pressing any key the character associated with the specified ASCII value is redefined to this shape and is displayed in the redefined shape block. The cursor is then placed in the top left hand corner of the cell.
C : Copy shape; this command copies the shape in the design grid cell occupied by the cursor, to one or more other design grid cells, overwriting the original contents of those cells. In all cases, the cursor may be anywhere within the appropriate cell.
Position the cursor in the 'source' cell (the cell to be copied) and press C. Now move the cursor to the 'target' design grid cell (the cell to be copied into) and press C again. You can repeatedly copy the source cell by moving the cursor to another target cell and pressing C.
When you wish to stop copying, press X.
T : Transfer shapes; this is a powerful command that enables you to load shapes from a cassette tape, save shapes to cassette tape and print shapes on a parallel or serial printer.
When you select the T command, you are asked whether you wish to Load, Save or eXit. Select the X option when you have finished transferring shapes. The L option will load shapes from tape whilst the S option will output shapes to tape or printer.
Shapes are held on cassette tape in groups called 'FILES' and each file has a name just as programs saved on tape are held as named files. ARTISAN 1< creates two types of files:
DATA files - which Artisan 1 can read back in using the L option, and can be used to maintain libraries of shapes.
VDU files - which contain VDU 23 statements that can be merged with your own BASIC programs using the BBC/Electron 'EXEC' command. Artisan 1 can create VDU files but cannot read them.
All the sample shape files supplied with Artisan 1 are DATA files.
Loading Shapes
Firstly, you are requested to specify the name of the file containing the group of shapes you wish to load, e.g. CHESSMEND.
The filename must be between 1 and 10 characters long, followed by the RETURN key, if you attempt to enter more than ten characters, Artisan 1 will accept the first ten characters and go on to the next question.
Next you are asked to specify an ASCII code value in the range 128 to 255, to which the first shape to be loaded is assigned - called the "first code".
Note: Although you can save shapes from the BBC/Electron ROM as well as the redefined shape block, you can only LOAD them back into the re-defined shape block. Accordingly, do not create shape files of more than 128 shapes.
Press the PLAY button on the tape recorder, then press RETURN. Artisan 1 will then start to read the tape and the message:
Searching for file (filename)
will be displayed.
Once the file has been found, Artisan 1 will display the message:
Loading file (filename)
If the file is a data file, each shape will be read and displayed in the re-defined shape block starting at the specified ASCII code. As each character is read, its ASCII code is displayed under the command line.
If the file specified is not a data file, Artisan 1 will stop the tape and display the message:
Invalid file, press any key to continue
Press a key and Artisan 1 will display the Transfer options (L, S, X) once again.
If the file specified is too long for the space left in the re-defined shape block, the message:
File too long
will be displayed.
Saving Shapes
Firstly you are asked to specify the name of the file that will contain the group of shapes you wish to save, e.g. MYSHAPES.
The filename must be between 1 and 10 characters long followed by the RETURN key (if you attempt to enter more than ten characters, Artisan 1 will accept the first ten characters and go onto the next question).
Next you are asked to enter two ASCII codes in the range 32 to 255, each followed by the RETURN key, which specify the shapes you wish to save. All shapes in the specified range will be saved to tape.
If you wish to load these shapes back into Artisan 1 do not save more than 128 shapes in one file.
Having established the shapes you wish to save you must then specify what type of file is to be created, DATA or VDU.
If you select D, specifying a DATA file, you will be asked to start the cassette recorder recording then press the RETURN key, Artisan 1 will then start to save the shapes to tape.
If you select V, specifying a VDU file, you will be asked to enter two more numbers, each followed by RETURN, as follows:
Start line - each shape will be saved as a BASIC statement, this number specifies the first statement number.
Start code - although you have redefined the shapes for ASCII codes 128 to 255, you can redefine any character between 32 and 255 with the VDU 23 statement, providing you have 'exploded' the character set if necessary using *FX20.
After entering the start code, start the cassette recorder recording then press RETURN, Artisan 1 will then start to save the shapes to tape.
For example, if you wish to save a group of sixteen shapes that you had previously created and assigned to ASCII-coded 128 to 143, you would enter the following parameters:
filename | : | eg MYSHAPES (RETURN) |
first code | : | 128 (RETURN) |
last code | : | 143 (RETURN) |
For a VDU file you would then specify:
start line | : | 1000 |
start code | : | 65 |
These parameters would result in a file of sixteen statements numbered from 1000 to 1015 redefining characters 65 to 80 (A to P), with a filename of MYSHAPES.
Whichever type of file you have specified, Artisan 1 will display the ASCII code of the shape it is currently saving.
Once the shapes have been saved, Artisan 1 will display the Transfer options (L, S, X) again.
Printing Shapes
To print shapes on a serial or parallel printer, you first select the Transfer option and specify the following filename appropriate to the printer that you are using:
the following select a parallel printer;
PRINTER
PRINTER0
The following select a serial printer and speed:
PRINTER1 | : | 75 baud |
PRINTER2 | : | 150 baud |
PRINTER3 | : | 300 baud |
PRINTER4 | : | 1200 baud |
PRINTER5 | : | 2400 baud |
PRINTER6 | : | 4800 baud |
PRINTER7 | : | 9600 baud |
PRINTER8 | : | 19200 baud (rate not guaranteed) |
You then specify the first and last codes as for the normal save option, then Artisan 1 will ask you to enable the printer and press RETURN to start printing.
Each shape is printed as eight rows of eight characters, a "." representing an "off" pixel and a "*" representing an "on" pixel. In addition, the associated VDU 23 parameters are printed underneath.
Once printing is completed, Artisan 1 redisplays the Transfer options (L, S, X).
Z : Zap Grid - This command causes Artisan 1 to re-initialise the design grid and Mode 4 display. The redefined character block is left intact.
Q : Quit - When you have finished using Artisan 1, select this command to return to the BBC/Electron BASIC system. It is possible to start the program again by typing RUN - the design grid, Mode 4 display and redefined character block will all be cleared.
Using ARTISAN 1
This section is intended to provide you with guidance on how to use Artisan 1 effectively. Artisan 1 was designed to be flexible so that whilst the individual commands provide powerful design facilities, their combination enables you to realise the full potential of Artisan 1. These techniques are described below with reference to the sample shape sets provided with Artisan 1.
The normal technique is to move the cursor about the design grid setting and deleting pixels as you go. For single character shapes you confine the cursor movement to single cells, whilst for multiple character shapes you could use the entire grid. Once you have completed a shape, Accept it to obtain its VDU 23 parameters and assign it to an ASCII code in the redefined shape block for later Transfer to a tape file.
You do not have to create shapes from scratch each time. You can load shapes from tape into the redefined character block and then Get them into the design grid; or you can Get a character from the computer's ROM into the design grid.
Some of the sample shape sets are described below along with the techniques used to create them.
SHUTTLED
This set, showing three scenes from the NASA shuttle mission, illustrates the use of ARTISAN to create 'static' displays. Such shape sets can be used for program logos, background objects in game displays, etc.
GREEKD
CYRILLICD
These sets of upper case letters consist of some English characters and some with no English equivalents. The former were copied from ROM to the redefined shape block using Get, the rest were created from scratch.
KATAKANAD
RUNESD
HEBREWD
These sets, representing the Japanese, Dwarf (!) and Hebrew characters have no English equivalents and had to be created from scratch. A number of characters in each set are similar, enabling the Get and Copy commands to save time.
INVASCIID
Unlike other computers, the BBC/Electron do not include the inverted ASCII characters as part of their standard character set, relying on the use of the COLOUR statement to achieve the same ends. This set was created to avoid this and involved simply Getting each character from ROM, Inverting it and then Accepting it into the appropriate location in the redefined shape block.
The next set of shape files illustrate the creation of multiple character shapes. The general technique here is to create the shape using as much of the design grid as required, then Accept the individual characters into the redefined shape block maintaining the shape's structure. This set is then Saved as a 'design' set which is easy to amend. For use with your own programs however, you need to reorganise these shapes into a consecutive sequence of characters.
CHESSMEND
This set was created from scratch, although since the shapes were symmetrical (except the knights) only half of each shape was created using Set and Delete, the other half was generated by Copying the finished parts to the adjacent cells on the right and using the Mirror command.
FROGBITSD
INVADERSD
These sets, created from scratch, contain shapes from two popular micro games. The INVADERD set shows one method of smoothing animation by creating more than one image of the same shape so that it can be moved on the screen in steps of half a character width rather than a full character width.
HARRIER1D
HARRIER2D
HARRIER3D
These sets, used in the Harrier demonstration program, illustrate how Artisan 1 can be used to create very large shapes.
HARRIER1D, the 'design' set was created from scratch starting at the nose and working back to the tail. The first 4 columns of shapes were created and Accepted, maintaining the overall shape of the aircraft in the redefined shape of the aircraft in the redefined shape block. The rightmost column was Copied to the leftmost and the next three columns were created and then Accepted and so on until the aircraft was complete.
At this point the created shapes were saved to tape in case of accidents (plug being pulled out of the mains supply etc.), then the design was tidied up, resaved, then reorganised into a sequential set of characters and saved again (HARRIER2D).
This set illustrates perfectly the alternative use of the redefined shape block as an extension to the Mode 4 display.
The third set (HARRIER3D) was also created from scratch using the Mirror command to save time. Notice also that although there are two wing legs and two wing tanks in the displayed shape, only one of each was created.
HUMMERD
Finally, this set, used in the HUMMER demonstration, illustrates how Artisan 1 makes relatively complex animation easy. As you will see in the demonstration, the humming bird appears to flap its wings as it moves forward, this was achieved by repeatedly displaying the four different shapes of the bird as it moved and hovered.
The principle technique used here was "tweening". This was carried out as follows:
- The first image was created from scratch in the top half of the design grid, with the wings in the top position.
- This set of six characters was then copied into the bottom half of the design grid and altered so the wings were in their bottom position. This shape being the last in the sequence of four.
- The top shape was then Accepted in its entirety.
- Only those characters of the bottom shape that differed from the first were Accepted.
Now all that was needed was to create two shapes with the wings in intermediate, or in-between, positions to achieve a smoother animation. (In the cartoon industry the people who produce the intermediate shapes from the master shapes are called the "'tweeners", hence the term tweening).
General Hints And Tips
- Be careful of the Mode effects: for Modes 2 and 5 you can use vertical lines of single pixels, however for the other Modes you must use vertical lines of two pixels width to achieve the same effect.
- Because of these Mode effects, the image you see in the design grid can be deceptive so use the Mode 4 display (and the redefined shape block) to see how the shape will finally appear.
- For very large shapes, use the redefined shape block as an extension to the Mode 4 display
- For large shapes it pays to plan ahead, so as to minimise the number of different characters to be designed.
- For multiple character shapes, keep two versions of the DATA files, a 'design' file which contains the set as it is displayed for ease of amendment, and a 'production' file which contains the shape as a straight sequence of characters arranged to make the programming easier (cf the HARRIER sets).
Demonstration Programs
Three demonstration programs are provided with Artisan 1 which use a variety of techniques to display and animate shapes that are made up of redefined characters.
You are encouraged to list these programs to see how they work, the interesting features of each being described below.
MUSIC
First, three separate VDU files were created from the MUSICD set and *EXEC'd into the program, then made into procedures. Notice that although there are 42 different redefined characters, the character set has not been 'exploded', since the characters are only redefined when they are required.
If a character set explosion were required, then the *FX20,n statement would have to be executed where n specifies which block of 32 characters that is to be redefined, as follows:
n=0 ASCII codes 128 to 159
This is the default setting (character set imploded), the character assigned to the ASCII code 128 being displayed when a code of 128, 160, 192 or 224 is specified.
This block of characters uses the locations &C00 - &CFF in store to hold the new shapes.
The remaining values of n cause the character set to be exploded, the new shapes being in the specified areas of store.
n | ASCII codes | locations |
1 | 160 - 191 | &0E00 - &0EFF |
2 | 192 - 223 | &0F00 - &0FFF |
3 | 224 - 225 | &1000 - &10FF |
4 | 32 - 63 | &1100 - &11FF |
5 | 64 - 95 | &1200 - &12FF |
6 | 96 - 127 | &1300 - &13FF |
If you explode the character set, remember to relocate the start location for your BASIC program by setting PAGE to the address following the last location for the associated redefined block of 32 characters (e.g. if n=4, set PAGE=&1200).
You will notice in the MUSIC program that a variety of techniques have been used to display redefined characters, as follows:
- first of all all Clef symbols are displayed using PRINT TAB then the graphics cursor is switched on and the Bars are printed using a procedure (gratab) which converts normal TAB values into a MOVE statement. This ensures that parts of the Clefs are not erased when the Bars are displayed.
- next the notes are defined overwriting the Clef definitions, and assigned to strings. Each note is made up of spaces, redefined characters and cursor movement control characters (CHR$8 and 10).
- finally the tune is played, the note symbol being displayed at the correct place using another procedure (locate).
HUMMER
The tweening technique used in this program has already been described in the previous section on using Artisan 1. The main point to notice is that each bird shape has been assigned to an array, and then each array is displayed in the appropriate sequence to achieve the animation effect.
HARRIER
This final demonstration program illustrates the range of animation techniques available to you, without using assembler nor addressing the screen memory directly.
Additional Techniques
Instead of using VDU files, you can use the DATA files to save space in large programs. These files have the following format:
string | : | DATA | |
integer | : | number of shapes in file | |
data | : | each character is held as eight numbers, corresponding to the eight VDU 23 parameters |
The following program shows how you can read an Artisan 1 data file in your own program:
10 REM DATA file loader
20 DIM C 8 : REM BYTE Array
30 DF% = OPENIN ("HUMMERD")
40 INPUT#DF%,A$
50 IF A$<>"DATA" THEN PRINT "Not a DATA file" : END
60 INPUT#DF%,SHAPECOUNT
70 PRINT "LOADING FROM HUMMERD"
80 REM Redefine CHR$ 128 to 141 as bird shapes
90 FOR X%=128 TO 128+SHAPECOUNT-1
100 INPUT#DF%,C1,C2,C3,C4,C5,C6,C7,C8
110 VDU 23,X%,C1,C2,C3,C4,C5,C6,C7,C8
120 NEXT X%
130 END
Multicoloured shapes can be displayed by using the graphic cursor (VDU5) and printing one character for each colour, its pixels set only where you want that particular colour. Remember that when using the graphics cursor it will point to the top left pixel of the character.
Finally, here are some suggestions for you to experiment with.
Smoother Animation
Instead of moving a shape one character at a time, create four images of the shape, each identical but shifted two pixels in one direction. The display the moving shape using a similar technique to that used in HUMMER to make the wings move. The INVADERSD shape set illustrates the technique.
This will achieve the same effect as the screen addressing carried out by most arcade games but will not require any assembler programming, although the animation will be slower.
Try this out with a single character shape, then try extending the HUMMER program to display a more realistic animation.
Music Composer
Try extending the MUSIC program so that you can edit a series of bars, entering notes and rests by positioning the symbols.
Thank you for purchasing this product! We hope that you have many hours of enjoyment using it.