HiRes Graphics


To start with we have a demo of how to draw CIRCLEs and how to PAINT them. This program uses PMODE 3 which has a resolution of 256 columns and 192 rows. In this mode (selected by PMODE in line 20) you can use four different colours including the background colour. This mode is often used in arcade games.
10 X=RND(-TIMER):Z=0
20 PMODE 3,1:SCREEN 1,Z:PCLS
30 TIMER=0
40 X=RND(256):Y=RND(192):R=RND(20):C=RND(4)
50 CIRCLE(X,Y),R,C
60 PAINT(X,Y),C,C
70 IF TIMER/50 < 300 THEN 40
80 IF Z=0 THEN Z=1 ELSE Z=0
90 GOTO 20
A few other commands are worth noting. SCREEN switches between screens such as the text screen and the graphics screen. PCLS clears the current high resolution screen.