Classic Computer Magazine Archive COMPUTE! ISSUE 65 / OCTOBER 1985 / PAGE 10

Readers Feedback

The Editors and Readers of COMPUTE!

Multicolor Player/Missiles
I have written many simple games on my Atari 800XL using player/missile graphics and would like to start using different colors. How do I make multicolor P/M graphics?
Bob Rudis

Unfortunately, players can be only one color. However, you can simulate a multicolor player by overlapping two or more players. Define the players' shapes so that solid areas of underlying (lower priority) players show through holes (blank areas) in overlapping (higher priority) players. One player can be used for each color you need to define. Of course, to maintain the effect, you'll need to move the overlapped players in unison.
    You can obtain additional colors by setting bit 5 of the player priority register (location 623 decimal). If you add 32 to the number in the priority register, then any area where two players overlap becomes a third color. The following program displays a red player and a blue player. The region where they overlap becomes green. You can find more information on multicolor players in COMPUTE!'s First Book of Atari Graphics.

DD 10 POKE 106,INT(PEEK(106)
      /8)*8-8:GRAPHICS 0:S=P
      EEK(106):REM PROTECT M
      EMORY ON A 2 K BOUNDAR
      Y
CC 20 POKE 559,62:POKE 704,5
      5:POKE 703,135:POKE 53
      256,1:POKE 53257,1:POK
      E 53277,3:SETCOLOR 2,0
      ,0
CB 30 POKE 623,33:POKE 54279
      ,S:PMBASE=256*S+1024:F
      OR A=PMBASE TO PMBASE+
      511:POKE A,0:NEXT A
LM 40 FOR A=0 TO 7:POKE PMBA
      SE+100+A,255:POKE PMBA
      SE+356+A,255:NEXT A
EB 50 FOR A=20 TO 245:POKE 5
      3248,A:POKE 53249,A+10
      :NEXT A:GOTO 50