Here are a few bits and pieces which I hope you will find useful or
BRIEF IS BEAUTIFUL - If you learned your Basic from the book
that came with your Atari and all the listings you have typed in from
magazines have been printed by the error-free method of LOADing the
program into the computer and LISTing it straight out to the printer,
then you are probably still using PRINT, LIST, INPUT, etc., in your
own programming. Most of the Basic Keywords have abbreviations which
can save you time and effort when writing your own programs or typing
in listings. Type in the following demo exactly as shown, don't change
a single space or character, and then RUN it.
20S0.1,0,0,0:RET. 30? :? "BYE!
See what has happened? Your three lines have changed into five
lines of program with only half the typing. Some points may not be
immediately obvious. GR.23 is the same as GRAPHICS 7+16 and ? is the
abbreviation for PRINT. In line 30 the Editor fills in the final
Line 10 shows a 50% saving in space, useful sometimes if you are
trying to squeeze a lot of code into one FOR ... NEXT loop or trying
to PLOT and DRAWTO several points on one line. There is a snag with
abbreviations. If the LISTed line exceeds three physical lines on the
screen, you can't edit the line and if you want to change it, you will
have to type it all again. Try changing line 10 when you have LISTed
Abbreviations can be overdone but they are well worth learning. All
the abbreviations are shown in Appendix A of your manual.
FOUR IN A ROW - Four in A Row from Issue 2 is an excellent
program, but when you wish to replay your opponent, you have to enter
both names in all over again. The following changes will make this
Renumber line 30 as 306 and line 50 as 307, then delete lines 30,
50 and 80. Change line 1540 to IF NAME$="Y" THEN 7000 and
add the following:
CT=0:? "WHO PLAYS FIRST?":? " 1) ";NAME
1$;"?":? " 2) ";NAME2$;"?":?
" 3) NEW PLAYERS?","ENTER 1/2/3";
TRAP 7000:INPUT GO:ON GO GOTO 300 ,300,7020 7020 RUN
If you want the computer to play a stronger game then also change
line 4400 to
This biases its moves towards the more tactically valuable central
TINY TIP - If you are writing a game for two players and
wish to transfer the turn from one player to another, you could use
10 IF PLAYER=1 THEN PLAYER=2:GOTO
30 REM PLAYER NOW CHANGED
To save time and memory try using the following instead
20 REM PLAYER
This will work on all games which have two players.
Has anyone else got any little Hints and Tips?