00000000: 00 80 5E 55 3A 43 42 4D 0D 20 20 20 20 20 20 20 |..^U:CBM. |
00000010: 20 20 20 20 D3 20 D4 20 C1 20 D2 20 20 20 20 D4 | . . . . .|
00000020: 20 D2 20 C9 20 D0 0D 0D 20 20 20 20 20 20 20 20 | . . ... |
00000030: 20 20 20 20 20 42 59 20 CB 45 4E 20 C8 55 45 42 | BY .EN .UEB|
00000040: 4E 45 52 0D 0D 20 20 46 52 4F 4D 20 C3 4F 4D 4D |NER.. FROM .OMM|
00000050: 4F 44 4F 52 45 20 CD 41 47 41 5A 49 4E 45 20 2D |ODORE .AGAZINE -|
00000060: 20 CD 41 59 20 31 39 38 39 0D 0D 20 20 20 20 C8 | .AY 1989.. .|
00000070: 45 52 45 20 49 53 20 41 20 44 45 4D 4F 20 46 4F |ERE IS A DEMO FO|
00000080: 52 20 41 20 4D 41 43 48 49 4E 45 0D 4C 41 4E 47 |R A MACHINE.LANG|
00000090: 55 41 47 45 20 52 4F 55 54 49 4E 45 20 54 48 41 |UAGE ROUTINE THA|
000000A0: 54 20 57 49 4C 4C 20 47 45 4E 45 52 41 54 45 20 |T WILL GENERATE |
000000B0: 41 0D 53 54 41 52 20 46 49 45 4C 44 20 46 4F 52 |A.STAR FIELD FOR|
000000C0: 20 59 4F 55 2E 20 20 C9 54 27 53 20 49 4E 54 45 | YOU. .T'S INTE|
000000D0: 52 52 55 50 54 0D 44 52 49 56 45 4E 20 53 4F 20 |RRUPT.DRIVEN SO |
000000E0: 59 4F 55 20 44 4F 4E 27 54 20 48 41 56 45 20 54 |YOU DON'T HAVE T|
000000F0: 4F 20 4B 45 45 50 0D 43 41 4C 4C 49 4E 47 20 49 |O KEEP.CALLING I|
00000100: 54 20 41 4E 44 20 43 41 4C 4C 49 4E 47 20 49 54 |T AND CALLING IT|
00000110: 2E 0D 0D 20 20 20 20 C1 20 53 54 41 52 20 46 49 |... . STAR FI|
00000120: 45 4C 44 20 49 53 20 41 20 50 41 54 54 45 52 4E |ELD IS A PATTERN|
00000130: 20 4F 46 20 44 4F 54 53 0D 52 45 53 45 4D 42 4C | OF DOTS.RESEMBL|
00000140: 49 4E 47 20 53 54 41 52 53 2E 20 D4 48 45 20 50 |ING STARS. .HE P|
00000150: 41 54 54 45 52 4E 20 4D 4F 56 45 53 0D 49 4E 20 |ATTERN MOVES.IN |
00000160: 53 55 43 48 20 41 20 57 41 59 20 54 48 41 54 20 |SUCH A WAY THAT |
00000170: 49 54 20 53 49 4D 55 4C 41 54 45 53 0D 4D 4F 56 |IT SIMULATES.MOV|
00000180: 45 4D 45 4E 54 20 54 48 52 4F 55 47 48 20 53 50 |EMENT THROUGH SP|
00000190: 41 43 45 2E 20 20 D0 52 4F 47 52 41 4D 4D 49 4E |ACE. .ROGRAMMIN|
000001A0: 47 0D 41 20 46 49 45 4C 44 20 53 55 43 48 20 41 |G.A FIELD SUCH A|
000001B0: 53 20 54 48 49 53 20 52 45 51 55 49 52 45 53 20 |S THIS REQUIRES |
000001C0: 41 4E 0D 55 4E 44 45 52 53 54 41 4E 44 49 4E 47 |AN.UNDERSTANDING|
000001D0: 20 4F 46 20 50 45 52 53 50 45 43 54 49 56 45 2E | OF PERSPECTIVE.|
000001E0: 0D 0D 20 20 20 20 CE 45 41 52 45 52 20 42 4F 44 |.. .EARER BOD|
000001F0: 49 45 53 20 48 41 56 45 20 54 4F 20 50 41 53 53 |IES HAVE TO PASS|
00000200: 20 42 59 20 41 54 0D 41 20 46 41 53 54 45 52 20 | BY AT.A FASTER |
00000210: 52 41 54 45 20 54 48 41 4E 20 4D 4F 52 45 20 44 |RATE THAN MORE D|
00000220: 49 53 54 41 4E 54 20 4F 4E 45 53 2E 0D D4 48 45 |ISTANT ONES...HE|
00000230: 20 41 4C 47 4F 52 49 54 48 4D 20 54 48 41 54 20 | ALGORITHM THAT |
00000240: 44 4F 45 53 20 54 48 49 53 20 43 41 4E 20 42 45 |DOES THIS CAN BE|
00000250: 0D 54 4F 47 47 4C 45 44 20 4F 4E 20 41 4E 44 20 |.TOGGLED ON AND |
00000260: 4F 46 46 20 42 59 20 54 48 45 20 43 4F 4D 4D 41 |OFF BY THE COMMA|
00000270: 4E 44 20 D3 D9 D3 0D 34 38 36 34 2E 0D 0D 20 20 |ND ....4864... |
00000280: 20 20 D4 48 45 20 4F 4E 4C 59 20 48 49 54 43 48 | .HE ONLY HITCH|
00000290: 20 49 53 20 54 48 41 54 20 54 48 45 0D 50 52 4F | IS THAT THE.PRO|
000002A0: 47 52 41 4D 20 4F 4E 4C 59 20 57 4F 52 4B 53 20 |GRAM ONLY WORKS |
000002B0: 4F 4E 20 41 20 42 49 54 20 4D 41 50 50 45 44 0D |ON A BIT MAPPED.|
000002C0: 53 43 52 45 45 4E 2E 20 20 C9 54 27 4C 4C 20 54 |SCREEN. .T'LL T|
000002D0: 41 4B 45 20 53 4F 4D 45 0D 45 58 50 45 52 49 4D |AKE SOME.EXPERIM|
000002E0: 45 4E 54 49 4E 47 20 57 49 54 48 20 54 48 45 20 |ENTING WITH THE |
000002F0: 44 45 4D 4F 20 50 52 4F 47 52 41 4D 2C 0D D3 D4 |DEMO PROGRAM,...|
00000300: C1 D2 D4 D2 C9 D0 2C 20 54 4F 20 55 4E 44 45 52 |......, TO UNDER|
00000310: 53 54 41 4E 44 20 48 4F 57 20 54 4F 20 55 53 45 |STAND HOW TO USE|
00000320: 20 54 48 45 0D 52 4F 55 54 49 4E 45 20 49 4E 20 | THE.ROUTINE IN |
00000330: 59 4F 55 52 20 4F 57 4E 20 50 52 4F 47 52 41 4D |YOUR OWN PROGRAM|
00000340: 53 2E 0D D0 41 52 41 4D 45 54 45 52 53 20 43 41 |S...ARAMETERS CA|
00000350: 4E 20 42 45 20 53 45 54 20 53 55 43 48 20 41 53 |N BE SET SUCH AS|
00000360: 20 53 54 41 52 0D 53 50 45 45 44 2C 20 54 48 45 | STAR.SPEED, THE|
00000370: 20 58 20 41 4E 44 20 59 20 4C 49 4D 49 54 53 20 | X AND Y LIMITS |
00000380: 4F 46 20 54 48 45 20 53 54 41 52 0D 46 49 45 4C |OF THE STAR.FIEL|
00000390: 44 2C 20 41 4E 44 20 46 49 45 4C 44 20 43 45 4E |D, AND FIELD CEN|
000003A0: 54 45 52 2E 0D 0D 0D 0D 0D 0D 20 20 20 20 C4 4F |TER....... .O|
000003B0: 4E 27 54 20 45 58 50 45 43 54 20 54 48 45 20 50 |N'T EXPECT THE P|
000003C0: 52 4F 47 52 41 4D 20 54 4F 0D 52 45 41 4C 4C 59 |ROGRAM TO.REALLY|
000003D0: 20 C4 CF 20 41 4E 59 54 48 49 4E 47 3B 20 49 54 | .. ANYTHING; IT|
000003E0: 27 53 20 4A 55 53 54 20 41 20 44 45 4D 4F 0D 4F |'S JUST A DEMO.O|
000003F0: 46 20 54 48 49 4E 47 53 20 59 4F 55 20 4D 41 59 |F THINGS YOU MAY|
00000400: 20 57 41 4E 54 20 54 4F 20 44 4F 20 57 49 54 48 | WANT TO DO WITH|
00000410: 0D CB 45 4E 27 53 20 53 54 41 52 46 49 45 4C 44 |..EN'S STARFIELD|
00000420: 20 52 4F 55 54 49 4E 45 20 41 4E 44 0D 41 4C 47 | ROUTINE AND.ALG|
00000430: 4F 52 49 54 48 4D 2E 20 20 D4 48 45 20 43 4F 44 |ORITHM. .HE COD|
00000440: 45 20 49 53 20 43 4F 4D 4D 45 4E 54 45 44 20 53 |E IS COMMENTED S|
00000450: 4F 0D 49 54 27 53 20 45 41 53 59 20 54 4F 20 53 |O.IT'S EASY TO S|
00000460: 45 45 20 57 48 49 43 48 20 50 41 52 41 4D 45 54 |EE WHICH PARAMET|
00000470: 45 52 53 20 43 41 4E 0D 42 45 20 54 57 45 41 4B |ERS CAN.BE TWEAK|
00000480: 45 44 20 46 4F 52 20 43 45 52 54 41 49 4E 20 45 |ED FOR CERTAIN E|
00000490: 46 46 45 43 54 53 2E 0D 0D 20 20 20 20 CC 45 54 |FFECTS... .ET|
000004A0: 27 53 20 46 41 43 45 20 49 54 3B 20 49 46 20 59 |'S FACE IT; IF Y|
000004B0: 4F 55 20 57 41 4E 54 20 54 4F 0D 53 48 4F 57 20 |OU WANT TO.SHOW |
000004C0: 4D 4F 56 45 4D 45 4E 54 20 54 48 52 4F 55 47 48 |MOVEMENT THROUGH|
000004D0: 20 53 50 41 43 45 2C 20 59 4F 55 0D 43 41 4E 27 | SPACE, YOU.CAN'|
000004E0: 54 20 47 45 54 20 41 20 42 45 54 54 45 52 20 4C |T GET A BETTER L|
000004F0: 4F 4F 4B 20 41 4E 44 20 46 45 45 4C 20 54 48 41 |OOK AND FEEL THA|
00000500: 4E 0D D3 D4 C1 D2 D4 D2 C9 D0 2E 20 20 C9 46 20 |N.......... .F |
00000510: 59 4F 55 20 48 41 56 45 20 41 20 53 50 41 43 45 |YOU HAVE A SPACE|
00000520: 20 47 41 4D 45 0D 54 48 41 54 20 43 41 4E 20 55 | GAME.THAT CAN U|
00000530: 53 45 20 54 48 49 53 20 52 4F 55 54 49 4E 45 2C |SE THIS ROUTINE,|
00000540: 20 42 59 20 41 4C 4C 0D 4D 45 41 4E 53 2C 20 55 | BY ALL.MEANS, U|
00000550: 53 45 20 49 54 20 49 4E 20 47 4F 4F 44 20 48 45 |SE IT IN GOOD HE|
00000560: 41 4C 54 48 2E 0D 0D 0D 0D 0D 0D C4 C9 D3 CB 20 |ALTH........... |
00000570: C6 C9 CC C5 D3 20 D4 C8 C9 D3 20 D0 D2 CF C7 D2 |..... .... .....|
00000580: C1 CD 20 D5 D3 C5 D3 0D 0D D3 D4 C1 D2 D4 D2 C9 |.. .............|
00000590: D0 20 20 20 20 20 20 20 20 20 20 20 D3 D4 C1 D2 |. ....|
000005A0: D4 D2 C9 D0 2E CF 0D D4 2E D3 D4 C1 D2 D4 D2 C9 |................|
000005B0: D0 0D 0D 20 20 20 20 20 20 20 20 2A 2A 2A 2A 20 |... **** |
000005C0: C5 4E 44 20 CF 46 20 D4 45 58 54 20 2A 2A 2A 2A |.ND .F .EXT ****|
000005D0: 0D |. |
..^U:CBM. S T A R T R I P..
BY KEN HUEBNER.. FROM COMM
ODORE MAGAZINE - MAY 1989.. HERE IS A
DEMO FOR A MACHINE.LANGUAGE ROUTINE THA
T WILL GENERATE A.STAR FIELD FOR YOU. I
T'S INTERRUPT.DRIVEN SO YOU DON'T HAVE T
O KEEP.CALLING IT AND CALLING IT... A
STAR FIELD IS A PATTERN OF DOTS.RESEMBL
ING STARS. THE PATTERN MOVES.IN SUCH A W
AY THAT IT SIMULATES.MOVEMENT THROUGH SP
ACE. PROGRAMMING.A FIELD SUCH AS THIS R
EQUIRES AN.UNDERSTANDING OF PERSPECTIVE.
.. NEARER BODIES HAVE TO PASS BY AT.A
FASTER RATE THAN MORE DISTANT ONES..THE
ALGORITHM THAT DOES THIS CAN BE.TOGGLED
ON AND OFF BY THE COMMAND SYS.4864...
THE ONLY HITCH IS THAT THE.PROGRAM ONL
Y WORKS ON A BIT MAPPED.SCREEN. IT'LL T
AKE SOME.EXPERIMENTING WITH THE DEMO PRO
GRAM,.STARTRIP, TO UNDERSTAND HOW TO USE
THE.ROUTINE IN YOUR OWN PROGRAMS..PARAM
ETERS CAN BE SET SUCH AS STAR.SPEED, THE
X AND Y LIMITS OF THE STAR.FIELD, AND F
IELD CENTER....... DON'T EXPECT THE P
ROGRAM TO.REALLY DO ANYTHING; IT'S JUST
A DEMO.OF THINGS YOU MAY WANT TO DO WITH
.KEN'S STARFIELD ROUTINE AND.ALGORITHM.
THE CODE IS COMMENTED SO.IT'S EASY TO S
EE WHICH PARAMETERS CAN.BE TWEAKED FOR C
ERTAIN EFFECTS... LET'S FACE IT; IF Y
OU WANT TO.SHOW MOVEMENT THROUGH SPACE,
YOU.CAN'T GET A BETTER LOOK AND FEEL THA
N.STARTRIP. IF YOU HAVE A SPACE GAME.TH
AT CAN USE THIS ROUTINE, BY ALL.MEANS, U
SE IT IN GOOD HEALTH.......DISK FILES TH
IS PROGRAM USES..STARTRIP STAR
TRIP.O.T.STARTRIP.. **** END OF T
EXT ****.
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL