Personal Computer News


Art Four Art's Sake - Spectrum Graphics

 
Author: John Lettice
Published in Personal Computer News #075

John Lettice discovers how software houses are catering for Spectrum users with artistic inclinations.

Art Four Art's Sake - Spectrum Graphics

John Lettice discovers how software houses are catering for Spectrum users with artistic inclinations

There was a time when I'd look at the title screen of the latest Spectrum game and naively wonder how it was done.

Certainly, if you sat down and concentratd hard you could see how it could be done, even taking the Spectrum's graphics limitations into account. But what baffled me was why someone, even for lots of money, would go to the brain-bending bother of working it all out.

But now the secret's out. In as much as the shelves of computer stores ever bulge, they're currently bulging with Spectrum graphics packages. So much so that you need never again curse your re-INKed characters, or tell yourself "I must do something about improving that fill routine".

Graphics packages usually cover two main areas: they'll produce full screen graphics without a lot of the hassle this would otherwise involve, and they'll also generally provide some form of user defined graphics (UDG) facility. The latter is certainly useful as an adjunct to the software's artistic side, although if it's a full sprite system you want you'll almost certainly have to look elsewhere.

You shouldn't put too much emphasis on having a UDG facility within the program unless it has fairly advanced features. The Spectrum, after all, comes with a UDG design program on the Horizons tape, and it's always struck me as peculiar that people will sit down and write their own (often worse) program rather than use this.

In the case of Melbourne Draw, the extra is the fact that it allows you to save any one of the character positions on the screen you've designed as a UDG. While a routine of this sort is fairly easy to write, simply involving reading the character position and POKEing its details into the correct character, it's useful to have it integrated with a program that will draw that screen. And it's not that easy to knock off something of the calibre of Melbourne Draw.

Melbourne Draw

From the packaging of Melbourne Draw it looks like The Hobbit has gone to Melbourne House's head. "In fact with Melbourne Draw the graphics potential of your Spectrum becomes unlimited," it trumpets modestly.

It's probably advisable not to take this claim too literally, because although the package is good, if you reckon it'll do something like batik or silk vinyl finish you'll be sorely disappointed.

Once it's loaded the program presents you with the standard Spectrum screen of 32 x 22 character positions. The bottom two lines give you information about the current status of the program, giving you the mode you're in, whether you're editing the screen or the attributes, and the current coordinates of the cursor you use to draw on the screen.

The numbering for the latter corresponds with the Spectrum's own PLOT and DRAW coordinate system, with the addition of minus Y coordinates to allow you to draw in the bottom two lines of the screen. These aren't normally available from Basic, but it's possible to POKE attributes into that area of screen memory, and to use them as part of the main screen. Melbourne's way of dealing with the ensuing coordinate problem is certainly a fudge, but bearing in mind that you'll be a lot happier using the coordinates you know, it's an acceptable fudge. You will of course have to shift the report lines in order to use the area for graphics, but this is fairly plain sailing.

Drawing itself simply involves using an ersatz eight-direction cursor cluster centred around the S key on the Spectrum. This moves a small flashing dot around the screen.

The keys have a fairly gentle auto-repeat timing of around one second, so you won't find yourself zapping around too fast unless you want to. The cursor moves without leaving a mark while it's in skip mode, while set mode switches pixels on, and reset switches them off. Invert reverses any image the cursor moves over.

Now close your eyes for a moment (finish readping this paragraph first) and imagine a graphics system that allows you to manipulate individual pixels on the Spectrum's screen. If you stare hard at the screen, apart from getting a splitting headache, you'll realise the difficulty involved in actually seeing what you're doing.

Never fear, you can magnify the screen by four or by 16, and while you're doing this the magnification indicator in the report window shows you which area of the screen you're on at any given time. You can therefore work on your drawing in detail quite eaily, although I'd suggest you rough it up on the full screen first, before tackling the detail.

The next obvious problem you'll face with the Spectrum is that of setting colour. You can PLOT and DRAW on individual pixels, but you can only set one INK and one PAPER colour for each individual 8 x 8 character position.

Eye-closing time again - think of a beautifully detailed drawing, the sort of thing that Albrecht Dürer would be proud to show his mother. Now think of our hapless engraver rashly deciding to use a PAINT command he's just run up on his Spectrum. "Aaargh!" he cries. He throws away his Spectrum and decides to open a wurst stall.

Melbourne deals with this by including a FILL routine, then using a single character position sized cursor that allows you to set INK and PAPER one position at a time. Once you do this you'll probably still have to make amendments, but it should be obvious what they are.

And there's an even easier way to deal with the problem. You can overlay a grid onto the screen, and with this in place you can't really go wrong.

The grid also comes into its own when you're dealing with UDGs. There are only the standard 21 available, but the program has the advantage of typing UDGs into PLOT and DRAW.

When you're just using the Spectrum's standard graphics facilities it's actually difficult to relate the two. User defined graphics are easy to move around the screen, but it's not that easy to link more than two or three of them together without a lot of planning first. Similarly, although it's fairly easy to use PLOT and DRAW for larger illustrations, it's more difficult to move them around the screen, and if you're using UDGs as building blocks for pictures you don't really have enough to be able to muck one or two of them up.

Because of this it really is very handy to be able to vritually page UDGs in and out of memory, copying them to different locations and so on. I have a dream that you could write a program that stored whole screens in the form of individual UDGs, then used some sort of scrabble technique to rearrange the screens into other screens. Ummm... I'll write it tomorrow...

There's also a facility for saving the UDGs as an area of memory, and thus cutting down the amount of space your programs take up, but as this is in the Spectrum's manual it's only reasonable that Melbourne should allow you to do this.

Overall, it's an excellent package, and I've very few, and very minor, complaints about it. It allows you to scale the picture down by 7/8ths, or up by 1/7th, but doesn't allow you to reverse this feature. It would have been even better if you could, but equally it's nice to have the feature in the first place.

The Screen Machine

Screen Machine is alledgedly 'the ultimate screen editor'. You can be forgiven for thinking you're in the wrong article at this point, because while we are talking about editing screens here, a graphics design package isn't exactly what the rest of the world generally means by the term. And it's not by Ultimate either!

It's less detailed than Melbourne Draw, and will therefore be easier to use. ISP has decided against using cursor-controlled line drawing at all, using instead 19 pre-packaged functions, along with 95 graphics characters (these are in addition to any UDGs you want to use) as building blocks.

But having learned this, have a look at page four of the manual: 'Please note: The graphics character set provided with Screen Machine is copyright ISP Marketing Ltd.'

If this means ISP wants a piece of the action from any commercial progam that uses these character I reckon the company is pushing its luck - like millions of others, I've programmed some of these graphics myself in the past, and I don't really see how ISP can copyright hearts, diamonds, cubes and spades symbols.

Besides this, the graphics set is really pretty feeble (like I say, I've programmed some of them myself!). Still, I'm looking forward to ISP suing Commodore or one of the other block graphics merchants for breach of copyright!

At least there's none of that messing around with cursor-controlled line drawing, is there? Not exactly - say you want to draw a line, you'll find it's automatically drawn from the last pixel plotted or the end of the last line or circle drawn. The syntax D+5, -5 is used to draw a straight line, and this particular example is analogous to the Spectrum command DRAW 5,-5. This latter, incidentally, takes one less key depression. Good, eh?

PLOT is similarly verbose, using a (x,y) as the equivalent of PLOT x,y.

Fortunately, a few improvements have been made to the Basic commands. PLOT and DRAW commands that would take the Spectrum off its screen will simply be ignored, and circles can be drawn off the screen. But for these marginal improvements the program wouldn't really be worth it. There is, however, a method of creating a margin display, and you can rotate characters (only one character position at a time) in groups of 90 degrees.

You can also enlarge. "A common desire amongst users is to display characters at eight times their normal size." It's therefore fortunate that "the Screen Machine Enlargement command will enlarge the contents of any character cell by eight times". Personally I always thought users were keen on enlarging characters by nine times, but clearly I stand corrected. Again though, it's just done on a single character basis.

Really, the whole package seems to me to be far too limited to make it worth using. The initial idea of making it easier than other graphics packages may have been a good one, but the commands used are by no means obvious.

Paintbox

The initial claim to fame as far as Paintbox is concerned is the fact that it gives you 84 UDGs using banks of data which are switched in and out of the UDG area as and when you need them. This gives you a much more powerful 'building block' facility than either Melbourne Draw or Screen Machine, and these banks can also be used within Basic programs.

The drawing facilities are less comprehensive than those in Melbourne Draw, but it's really a case of swings and roundabouts. If you're using more UDGs then you might find it easier than operating on a pixel by pixel basis. Paintbox also errs more on the side of pre-packaged routines like circles and arcs.

In porder to combine these facilities you use something called Screen Planner, which allows you to use the UDGs. By switching between this and the drawing mode you can build up quite complex pictures. There is also a facility for saving up to five screens to tape, then loading them back into memory. By paging these in and out you could produce a form of animation.

Dynamic Graphics

The salient difference between Dynamic Graphics and the other packages deal with here is that it allows you to produce sprites for combining with your own programs. The difference here is that you aren't just producing user defined graphics, but rather you're building animated sequences of characters that will shuffle across the screen in whatever way you want.

The end result is a machine code subroutine that you can save in memory and call up from Basic programs, so space intruders without tears could well be with us at last.

The second tape that comes in the Dynamic Graphics package is Drawmaster. This uses a cursor drawing method, again with eight possible directions. You can also draw arcs and circles, and fill and rescale your works of art. It will also define windows and revise the screen attributes. Drawmaster itself has its good points, but overall I feel that its main advantage is its sprite facility.

There are a number of other graphics packages out, and they do seem to be developing in the same sort of way as Dynamic Graphics. The newly-released White Lightning is probably the most notable, being first and foremost a games design package. It is Forth-based, and although geared to games, screen design becomes an adjunct to this. Certainly it takes some getting used to, but the rewards are high, and it looks very much like the next major success story.

John Lettice

This article was converted to a web page from the following pages of Personal Computer News #075.

Personal Computer News #075 scan of page 18

Page 18

Personal Computer News #075 scan of page 19

Page 19

Personal Computer News #075 scan of page 20

Page 20