;``````````````````````````````````````````````````````````````` ; Special thanks below for the smaple codes on Batari Basic ; hints, tips, code snippets, and more from AtariAge members ;``````````````````````````````````````````````````````````````` ; such as batari, SeaGtGruff, RevEng, Robert M, Nukey Shay, ; Atarius Maximus, jrok, supercat, GroovyBee, and bogax. ; code snippets from Atarius Maximus's "GTA style game" ; code snippets from Quad Runner's "move_around_rooms" ; code snippets from Stargunner's "Space dungeon" ; code snippets from Mountain King "GizzlewapG16" ; code snippets from Gemintronic code is used here smoothcrl2.bas ; sprite codes from PAC-MAN-RED ; sprites codes from GoB! Fight for the Desert Patrick Jahn, Greg Kinsey, John Swisshelm ; code snippets from atari2600land's Batarti Man! ; code below complied together by Lewis2907 make "The Quest" ;``````````````````````````````````````````````````````````````` ; ; Instructions: ; ; Use the joystick to move the sprite around ; ;``````````````````````````````````````````````````````````````` ;``````````````````````````````````````````````````````````````` ; ; If this program will not compile for you, get the latest ; version of batari Basic: ; ; http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#gettingstarted ; ;*************************************************************** ;*************************************************************** ;*************************************************************** ; ; Kernel setup. ; set tv ntsc set romsize 32kSC set optimization speed set smartbranching on set optimization noinlinedata set optimization inlinerand ;**************************************************************** ; ; If you enable Superchip RAM, the above becomes available except the double-height playfield. ; If you wish to enable the double-height playfield, you need to define the number of rows to display using const. ; For double-height, use 24. For example: ; Note that you can set values from 3-32, but if the number doesn't evenly divide 96 (3, 4, 6, 8, 12, 16, 24, or 32), ; the resultant screen might be smaller than normal. The amount of Superchip RAM used is 4 times the height. ; The largest size, 32, will use all available Superchip RAM. See playfield for more information about the pfres setting. ; const pfres=32 ;**************************************************************** ; ; Player0 fixed point variables for more flexibility in ; gameplay mechanics. ; dim _P0_L_R = player0x.a dim _P0_U_D = player0y.b ;**************************************************************** ; ; Flips player0 sprite when necessary. ; dim _Bit6_Flip_P0 = c ;``````````````````````````````````````````````````````````````` ; ; y = miscellaneous variable. ; ; z = miscellaneous variable. ; ;``````````````````````````````````````````````````````````````` ;*************************************************************** ;*************************************************************** ; ; PROGRAM START/RESTART ; __Start_Restart ;*************************************************************** ; ; Clears all normal variables and the extra 9 (fastest way). ; a = 0 : b = 0 : c = 0 : d = 0 : e = 0 : f = 0 : g = 0 : h = 0 : i = 0 j = 0 : k = 0 : l = 0 : m = 0 : n = 0 : o = 0 : p = 0 : q = 0 : r = 0 s = 0 : t = 0 : u = 0 : v = 0 : w = 0 : x = 0 : y = 0 : z = 0 ;*************************************************************** ; ; Player set up and playfield colors ; player0x = 76 : player0y = 76 ;*************************************************************** ; ; Player sprite setup ; gosub __Sub bank8 ;*************************************************************** ;*************************************************************** ; ; MAIN LOOP (MAKES THE PROGRAM GO) ; Also used for unpause the game ; __Main_Loop ;**************************************************************** ; ; Player0 Color ; COLUP0 = $FE : COLUPF = $CE : COLUBK = $86 ;**************************************************************** ; ; Player0 Movements ; if joy0down then _P0_U_D = _P0_U_D + .5 if joy0up then _P0_U_D = _P0_U_D - .5 if joy0right then _Bit6_Flip_P0{6} = 0 : _P0_L_R = _P0_L_R + .5 if joy0left then _Bit6_Flip_P0{6} = 1 : _P0_L_R = _P0_L_R - .5 if joy0right then y = y+1 : z = 10 : gosub __Level_Data if joy0leftt then y = y-1 : z = 10 : gosub __LevelA_Data ;**************************************************************** ; ; Flips player0 sprite when necessary. ; if _Bit6_Flip_P0{6} then REFP0 = 8 ;*************************************************************** ; ; Displays the screen. ; drawscreen ;*************************************************************** ; ; Mission complete! Go back to the beginning of program ; This is not a " Game Reset" ; goto __Main_Loop __Level_Data pfpixel y z on return __LevelA_Data pfpixel y z off return bank 2 bank 3 bank 4 bank 5 bank 6 bank 7 bank 8 __Sub player0: %11111110 %01110001 %11111110 %00011000 %00001000 end return otherbank