set romsize 8kSC set smartbranching off set optimization size set kernel_options pfcolors no_blank_lines background const pfrowheight = 4 const bkcolor=0 const pfres=24 init const pfscore = 1 gosub boat dim boatspeed = a dim gamebits = b dim timer = c dim wakedelay = d dim wakeframe = e dim waketimer = f dim skierx = player0x.g dim skiery = player0y.h dim skierxaccel = i.j dim skieryaccel = k.l dim skierdirfloat = m.n dim skierdir = m dim waterfloory = o dim height = p dim tempdir = temp4 dim tempxaccel = temp5.temp6 dim skiermovedir = q dim level = r rem s is sound dim skitime = u dim staticobjectx = v dim staticobjecty = w level = 255 AUDC0 = 15 : AUDF0 = 31 : AUDC0 = 8 : AUDF0 = 31 COLUBK = 128 : COLUPF = 142 gosub gamechange gameoverloop pfscore1=255 player0x=77 : player0y=90 gosub water1 : gosub clrset1 : gosub straight AUDV0 = 0 : AUDV1 = 0 gosub showenemy timer = timer + 1 drawscreen if switchreset then goto newgame if timer > 15 && switchselect then goto gamechange goto gameoverloop showenemy if level = 0 then gosub level0 if level = 1 then gosub level1 if level = 2 then gosub level2 if level = 3 then gosub level3 return gamechange timer = 0: level = level + 1 : if level = 4 then level = 0 goto gameoverloop gameover AUDV0 = 0 : AUDV1 = 0 drawscreen if switchreset then goto newgame if switchselect then goto gamechange goto gameover newgame pfscore1=255 wakedelay = 5 wakeframe = 0 skitime = 0 gamebits{0} = 0 skierdirfloat = 4.0 player0x=77 : player0y=99 : missile1y = 64 missile1y=130 : staticobjecty=100 gameloop if switchreset then goto newgame if switchselect then goto gamechange if timer{0} then NUSIZ1=$00 : gosub boat : goto skipenemy player1x = staticobjectx : player1y = staticobjecty gosub showenemy skipenemy if timer{0} then staticobjecty = staticobjecty + 1 if staticobjecty > 140 then gosub resetstaticobject if timer=0 then skitime=skitime+1 if skitime>3 then skitime=0 : pfscore1=pfscore1/2 if pfscore1=0 then goto sharkgame if collision(player0, missile1) then score = score + 100 : gosub resettarget if collision(player0, player1) then gosub crashcheck if timer{0} then missile1y = missile1y + 1 if missile1y > 180 then gosub resettarget if switchreset then goto newgame if switchselect then goto gamechange gosub straight rem calculate water floor height and skier height if player0x < 63 || player0x > 85 then waterfloory = 90 else waterfloory = 87 height = waterfloory - player0y rem gravity if height > 0 && height < 128 then gamebits{0} = 1 : skieryaccel = skieryaccel + 0.05 else gamebits{0} = 0 if !gamebits{0} then skiermovedir = skierdir rem bouyancy if height > 127 then skieryaccel = 255.8 if !gamebits{0} && collision(playfield, player0) then gosub jump gosub changeskiersprite gosub changeskierxaccel if joy0right then if skierdirfloat < 7 then skierdirfloat = skierdirfloat + 0.05 if joy0left then if skierdirfloat > 1 then skierdirfloat = skierdirfloat - 0.05 if player0x < 10 then player0x = 10 if player0x > 145 then player0x = 145 skierx = skierx + skierxaccel : skiery = skiery + skieryaccel rem handle wake look timer = timer + 1 : if timer > 254 then timer = 0 : wakedelay = wakedelay - 1 if wakedelay < 3 then wakedelay = 3 waketimer = waketimer + 1 : if waketimer > wakedelay then waketimer = 0 : wakeframe = wakeframe + 1 if wakeframe > 2 then wakeframe = 0 y = y + 1 : if y > 7 then y = 0 : z = z + 1 if z > 2 then z = 0 drawscreen if wakeframe=0 then gosub water1 if wakeframe=1 then gosub water2 if wakeframe=2 then gosub water3 if z = 0 then gosub clrset1 if z = 1 then gosub clrset2 if z = 2 then gosub clrset3 goto gameloop crashcheck temp3 = player0y + 5 temp4 = player0y if staticobjecty > temp3 || staticobjecty < temp4 then return if height < 3 then pfscore1=pfscore1 / 2 return resetstaticobject temp5 = rand : temp6 = rand staticobjectx = temp5 / 2 : staticobjecty = 51 return resettarget temp5 = rand : temp6 = rand missile1x = temp5 / 2 : missile1y = 51 return changeskiersprite tempdir = skierdir if tempdir < 5 then REFP0 = 8 else tempdir = 8 - tempdir : REFP0 = 0 if tempdir = 0 then gosub 90 if tempdir = 1 then gosub 67 if tempdir = 2 then gosub 45 if tempdir = 3 then gosub 22 if tempdir = 4 then gosub straight return changeskierxaccel tempdir = skiermovedir : tempxaccel = 0.0 if tempdir >= 5 then tempdir = 8 - tempdir if tempdir = 0 then tempxaccel = 0.4 if tempdir = 1 then tempxaccel = 1.2 if tempdir = 2 then tempxaccel = 0.65 if tempdir = 3 then tempxaccel = 0.15 if skiermovedir < 5 then skierxaccel = 0.0 - tempxaccel else skierxaccel = tempxaccel return jump if skierxaccel > 128 && player0x > 70 then skieryaccel = skierxaccel if skierxaccel < 128 && player0x < 70 then skieryaccel = 0.0 - skierxaccel return level0 gosub tree return level1 gosub tree NUSIZ1=$01 return level2 gosub buoy if staticobjectx{0} then NUSIZ1=$02 else NUSIZ1=$04 return level3 gosub death if staticobjectx{0} then NUSIZ1=$03 else NUSIZ1=$06 return water1 playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ...............XX............... .............XX..XX............. .............XX..XX............. .............XX..XX............. .............XX..XX............. .............XX..XX............. ............XX....XX............ ............XX....XX............ ............XX....XX............ ............XX....XX............ ...........XX......XX........... end return water2 playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ..............XXXX.............. .............X....X............. .............X....X............. .............X....X............. .............X....X............. .............X....X............. ............X......X............ ............X......X............ ............X......X............ ............X......X............ ...........X........X........... end return water3 playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ...............XX............... ..............X..X.............. ..............X..X.............. ..............X..X.............. ..............X..X.............. ..............X..X.............. .............X....X............. .............X....X............. .............X....X............. .............X....X............. ............X......X............ end return straight player0: %00010100 %00010100 %00010100 %00010100 %00001000 %00011100 %00001000 %00011100 %00011100 end return 90 player0: %00000000 %01111110 %00111111 %00010100 %00001000 %00011100 %00001000 %00011100 %00011100 end return 67 player0: %01010000 %00111100 %00011111 %00010100 %00001000 %00011100 %00001000 %00011100 %00011100 end return 45 player0: %00101000 %00010100 %00011110 %00010101 %00001000 %00011100 %00001000 %00011100 %00011100 end return 22 player0: %00010100 %00010100 %00011110 %00011110 %00001000 %00011100 %00001000 %00011100 %00011100 end return boat player1x=77 : player1y=51 player1: %01111110 %10000001 %11111111 %01111110 end return tree player1: %00011000 %00110000 %11011001 %00010110 %00100000 end return buoy if timer{4} then goto buoy2 player1: %00111000 %00010000 %00000000 %00000000 %00000000 end return buoy2 player1: %00111000 %00111000 %00010000 end return death if timer{2} then goto death2 player1: %01111110 %11111111 %11111111 %00111100 end return death2 player1: %01111110 %11100111 %11100111 %00100100 end return clrset1 pfcolors: 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 end return clrset2 pfcolors: 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 end return clrset3 pfcolors: 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 132 134 136 end return sharkgame pfcolors: 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 end pfclear timer = 0 z = 0 b = 0 d = 0 player0x = 73 : player0y = 66 temp1 = rand player1x = temp1 : player1y = 120 sharkgameloop timer = timer + 1 : if timer = 0 then z = z + 1 if z > 3 then goto newgame if switchreset then goto newgame if switchselect then goto gamechange if player0x < 10 then player0x = 10 if player0x > 145 then player0x = 145 if player0y < 51 then player0y = 51 if player0y > 85 then player0y = 85 if player1x < 10 then player1x = 10 if player1x > 145 then player1x = 145 if player1y < 51 then player1y = 51 if player1y > 120 then player1y = 120 if joy0left then player0x = player0x - 1 : goto moving if joy0right then player0x = player0x + 1 : goto moving if joy0up then player0y = player0y - 1 : goto moving if joy0down then player0y = player0y + 1 : goto moving rem still if timer{5} then gosub swimmerstill1 else gosub swimmerstill2 goto ds moving if timer{3} then gosub swimmerleftstroke else gosub swimmerrightstroke ds drawscreen if collision(player0, player1) then goto gameover temp1 = 4 - level b = b + 1 : if b < temp1 then goto sharkgameloop d = d + 1 if d{0} && player1x < player0x then gosub sharkright : player1x = player1x + 1 if d{0} && player1x > player0x then gosub sharkleft : player1x = player1x - 1 if d{0} && player1y < player0y then player1y = player1y + 1 if d{0} && player1y > player0y then player1y = player1y - 1 if d{6} then player1x = player1x + 1 else player1x = player1x - 1 if d{5} then player1y = player1y + 1 else player1y = player1y - 1 b = 0 goto sharkgameloop swimmerstill1 player0: %00011100 %00001000 %00011100 %00011100 end return swimmerstill2 player0: %00001000 %00011100 %00011100 end return swimmerleftstroke player0: %00111100 %00101000 %00011100 %00011100 end return swimmerrightstroke player0: %00011110 %00001010 %00011100 %00011100 end return sharkleft player1: %00111000 %00011000 %00001000 end return sharkright player1: %00011100 %00011000 %00010000 end return