See also: part 1, part 2, part 3, part 4 or part 5 (with more coming).
Welcome to my second VIC-20 Tuesday!
Previously, I began to dissect my old VIC-20 game Sky-Ape-Er. It was made up of two BASIC programs:
- INSTRUCTIONS – Display instructions, set up custom character set, then load and run the main game.
- SKY-APE-ER – The main game.
VIC-20 custom fonts
The VIC-20 did not have a true graphics screen. Instead, it used font characters that could be dynamically changed. Each character on the 22×20 screen was 8×8. You could create custom 8×8 characters to represent anything you wanted.
I believe I used a program called Eight by Eight Create by Robert Spahitz from the January 1983 issue of Creative Computing (Vol 9, Number 1). See page 270 (or 272 of this PDF scan):
Or this text version of just the article.
This also helps me confirm that I got my VIC-20 in 1982 since I initially did not have a Commodore Datasette tape deck for it and had no way to save programs until later. By the time this issue came out, I had the tape deck.
But I digress…
VIC-20 custom fonts on the CoCo
I have screen shots of what the custom characters looked like in the VIC-20 game, but thought it would be fun to take those DATA statements and display them on my CoCo. Using lines 100 to 125 from the INSTRUCTIONS program, I created this Color BASIC program:
0 REM skychars.bas 5 POKE 65495,0 10 CLS:XO=4:YO=2 15 DIM BM(7):FOR A=0 TO 7:BM(7-A)=(2^A):NEXT 20 FOR R=0 TO 7 25 READ V:IF V=-1 THEN 99 30 FOR C=0 TO 7 35 IF V AND BM(C) THEN SET(XO+C,YO+R,8) ELSE RESET(XO+C,YO+R) 40 NEXT 45 NEXT 50 XO=XO+10:IF XO>60 THEN XO=4:YO=YO+10 55 GOTO 20 99 GOTO 99 100 DATA223,223,223,0,253,253,253,0,0,0,0,0,1,3,3,7,0,60,126,219,129,165,165,129 105 DATA0,0,0,0,128,192,192,224,31,63,127,255,252,254,127,63,0,126,126,0,255,0,231,231 110 DATA248,252,254,255,63,127,254,252,15,7,8,30,31,31,31,31,231,219,60,255,126,126 115 DATA189,195,240,224,16,120,248,248,248,248,31,31,31,15,15,63,127,0,231,129,0,0,129 120 DATA129,129,0,248,248,248,240,240,252,254,0,12,12,24,47,8,15,82,36,48,48,24,244,16 125 DATA240,74,36,28,8,28,42,8,20,20,54,12,76,40,47,40,159,82,36 130 DATA -1
It now displays what those font characters look like:
These custom characters would replace “@ABCDEFGHIJKLMNOP”. The “@” symbol was the brick used to make the game playfield.
Letters A-L were used to make the ape, like this:
ABC DEF GHJ JLK
Letters M-O were the player’s character, facing right, left and forward.
Letter P were the small apes that were running towards the player. They never turned back, so no additional characters we needed for them.
My program was written to just put those characters on the screen, which would look like this:
But with the custom font in use, it looks like this:
In the next installment, I’ll walk through the actual SKY-APE-ER game code and see how it works.
Until next time…