P/M Graphics StudioBY T0M LAR0SA
P/M Graphics Studio is a slick, powerful software tool for programming games and animated sequences. This BASIC program makes it easy for you to create, change and animate Player/Missile graphics characters on Atari 8-bit computers with at least 48K memory and a disk drive.
When you first began learning how to program your 8-bit Atari, you probably wondered how the computer could make those little shapes move across the screen and how the shapes were created in the first place. P/M Graphics Studio not only enables you to effortlessly create and move Player/Missile characters, it will also help new programmers better understand the Atari's innovative Player/Missile graphics animation capabilities.
Type in Listing 1, MAKEAUTO.BAS, check it with TYPO II and SAVE a copy before you RUN it. MAKEAUTO creates an AUTORUN.SYS file for the P/M Graphics Studio.
Now type in Listing 2, PMED.BAS. If you have trouble typing in the special characters in lines 30001-30002, don't type them in. Listing 3 will create them for you. Check it with TYPO II, and SAVE a copy to disk. When RUN, Listing 3 creates these hard-to-type lines, and stores them in a disk file called D:LINES.LST.
To merge the two programs, LOAD "D:PMED.BAS" then ENTER "D:LINES.LST". Remember to SAVE the completed program before you RUN it.
Finally, you can type in Listing 4, PMED.ANM, check it with TYPO II and SAVE a copy before you RUN it. PMED.ANM is the program that lets you animate your players. However, you can RUN the Player/Missile Graphics Studio without this program if you are not currently interested in making your character graphics move onscreen.
NOTE: After you type in the listings, don't change anything in these programs. They are very condensed and handle a maximum of memory. Make sure every variable remains the same. Keep all the files in the Player/Missile Graphics Studio on a separate disk, but don't put write-protect tabs on it. Be sure to write DOS to the disk as well.
After PMED BAS finishes LOADing, the main menu will appear with the following items:
A-Load in animator
S-Store players (Disk)
Press the letter of the command you want to use. Each option has several sub-menus and sub-commands.
Pressing [M] for Make Players clears the screen and draws a "tablet" - a series of dots with a border-on the left side of the screen. The tablet is where you make your players (shapes). Next to the tablet is a menu of items that will help you create and manipulate these players.
Plug your joystick into port 1. The flashing cursor tells you your position on the tablet. To draw, move the joystick while pressing its button. To move without drawing or erasing, don't press the joystick button. If you don't have a joystick, use the [ARROW] keys-to move without drawing (or erasing), don't hold down [CONTROL].
Press the [SPACEBAR] to toggle the eraser on and off. When it's on, the drawing cursor becomes an asterisk [*]. To plot a single point-either erasing or drawing-press the button or the [INVERSE] key without moving the cursor.
As you draw, your player in double-resolution P/M graphics is created just to the right of the tablet.
Once you finish a player, press [P] to Put it in memory. You'll then be prompted to confirm it by pressing [Y]es. Otherwise press any other key to keep drawing or to choose another command.
After you press [Y], a prompt will ask if you want to Clean the tablet. Press [Y] only if you want to start from scratch. The [C]lean command can be accessed while drawing.
To compare a previously saved player to the player you're now working on, press [V]iew. At the following prompt, type in the number of the player to be viewed. If you change your mind, press [RETURN] to continue.
The player numbers are at the bottom of the screen. Notice that after the Put command, the player number will increase by 1. Underneath that is Players Remaining- how many more you can Put into memory.
EDITING IN MEMORY
After you type in the number of the player you want to [V]iew, the screen will clear briefly and the player you were working on will reappear. A second tablet will appear to the right of the main tablet. Its P/M form will appear in a different color to the left and a miniaturized version of the menu will appear in the right corner of the screen. The [U]n-view command puts the menu back up while removing the player you're Viewing.
Pressing [E]dit lets you redo a player. At the prompt, type in the number of the player you want to Edit, then press [RETURN].
You now have two choices. With  you can Place the new player normally-stored in the last player space. For example, if you have five players in memory and you want to re-Edit player 3, press [E]  [RETURN]-then  for Place player normally. This stores the player in position 6. In fact, next to Player # on the menu you'll see 1 = 6-meaning that you're editing player 1, which will be stored in position 6. The  option is Replace Original.
Let's say you want your main character to move forward and backward. Ordinarily, you'd have to View the other player and then draw the character facing the other way. Instead, press [B], which brings up two prompts:
1. UP TO DOWN
2. LEFT TO RIGHT
Pressing  flips the player upside-down, and pressing  flips it horizontally. The computer will then reconfigure your player.
Pressing [I]nverse turns all the white in your player to black, and vice versa. If you're sure you want to do this, press [Y] es. Otherwise, press another key. Be prepared to wait a while for the program to finish.
Press [ESCAPE] to get back to the main menu. Don't worry if you were working on a player and didn't yet want to Put it into memory-you can go back to the tablet and your player will come back up.
Press [S] to Save players to disk. You'll see these menu options:
C-Computer save only
D-Data statement save
Pressing [C] saves all your players as a text file-useful for saving disk space. When asked for a filename, don't specify a drive number or an extender or use quotation marks. Just enter a name up to eight characters long.
The [D] command creates two files. The one with your specified filename will have P/M and DATA statement routines for placing your players in memory. Another file contains the version of your players for loading later.
The [P] command creates three files. First is a file that accesses the disk drive and quickly puts a pre-configured string into memory. It requires less memory, but it takes more disk space. The second file contains the string DATA, as well as your filename and ".STR" extender. The last file contains the computer version of your players.
Pressing [L] from the main menu brings up the following Load menu:
A-Append two files in mem.
D-Directory . PMG files
L-Load a file
The [L] command lets you Load back a file. If you already have players in memory, press [Y] to clear memory Otherwise, press any other key. Then follow the same rules as in the [S]ave command.
The [D]irectory command displays an index of just the .PMG (Player/Missile graphics) files on the disk. Press any key to return to the [L]oad menu.
The [A]ppend command lets you load two files into memory at once, though the total of players from both files must not exceed 40. Enter the filenames when asked. NOTE: while loading or saving, you can press [RETURN] at the FILENAME prompt to abort. Press [ESCAPE] to return to the main menu.
Press [A] on the main menu to access the Animator program. When the screen clears, you'll be asked to put the Player/Missile Graphics Studio disk in drive 1 and press [RETURN]. Player/Missile Graphics Studio will create a temporary file, TEMP.ANM, which holds the players you have in memory at the moment. So don't put a write-protect tab on the Player/Missile Graphics Studio disk, and make sure the disk has at least 30 free sectors.
The Animator will load the players you had in the temporary file. This menu then appears:
If you press [S], you'll be asked how many players you want to animate. You can animate as many 40, even if you only have 10 players in memory-or even two.
Think of the number of players to animate as frames to fill. Then you'll be asked which player to animate in that position. Don't type in a number that won't work. For example, if you have 14 players in memory, don't type 15 at the prompt.
You can also type "all," which puts all the players in memory into a corresponding position and sends you to the Animation screen. You can animate odd-numbered or even-numbered players just by typing "odd" or "even."
From the Animation screen, press [ESCAPE] to go to the Animation Editor. There are no players onscreen yet. To show the players you specified, move the joysick right to scroll forward through the players or left to go backward (or press the appropriate [ARROW] keys).
HORIZONTAL & VERTICAL
Press [H] for Horizontal animation, then decide how many players to animate horizontally, up to 20. For each, follow the same rules as in still animation.
You have two other quick options available in horizontal animation. You can type "O to E" (odd-to-even) or vice versa. If you typed O to E, odd-numbered players are placed in the first 20 positions-the ones facing right. The rest are placed in the positions facing left. The same movements apply as in still animation.
The same rules apply to vertical animation, except that you're now going up and down instead of left and right.
On either the DATA statement form or the pre-configured strings on line 30200, at the end of the line you'll see a REM RETURN. Remove the REM. Then you may want to place the line 29999 STOP just before the P/M routine. Your program must have at least 7,100 bytes free, so don't make it too big.
Now your players are in P$. the pointer for each player is in P(n). The command to access each player is a USR statement:
U = USR(MOVE,0,PMB,P(N),X,N,20)
The variables MOVE and PMB are required in the first and third positions. Don't change them!
The 0 in the second position is the first player. As many as four can
be on the screen at once, numbering from 0-3. In P(N), P is the pointer
of the player and N is the number of the player to display. X is the horizontal
position onscreen and Y is the vertical position. The 20 is the size of
Tom LaRosa lives in Ocean Springs, Mississippi. This is his first publication in Antic.
Listing 1: MAKEAUTO.BAS, on disk: PMED.SYS Download
(rename to AUTORUN.SYS)
Listing 2: PMED.BAS Download
Listing 3: LINES.BAS (not needed)
Listing 4: PMED.ANM Download