Tracking
AS _BYTE 'tells whether its a tracker and which direction its moving
Movement
AS _BYTE 'How fast player moves ShotSpeed
AS _BYTE 'how fast player shots move GameOver
AS _BYTE 'has player lost all lives CurrentBG
AS _BYTE 'current background color
'Load sprites--------------------------------
DATA 311,16,16,16,56,124,238,254,68,16,84,56,108,56,124,254,170,76,124,118,174,252,127,90,48,118,255,122,47,15,60,126,44,104,252,124,62,122,222,252,56,124,126,126,55,63,250,239,102,32,120,236,254,120,95,47,58,124,127,253,218,110,126,58,16,12,60,126,118,127,255,250,60,124,126,111,255,254,126,108,32,24,24,60,36,36,60,24,24,0,6,30,36,36,120,96,0,0,0,60,231,231,60,0,0,0,96,120,36,36,30,6,0,0,0,36,24,24,36,0,0,0,66,60,36,36,60,66,0,0,60,102,90,90,102,60,0,60,0,153,165,165,153,0,60,66,153,36,66,66,36,153,66,153,66,0,129,129,0,66,153,0,0,0,16,16,124,16,16,0,0,0,16,56,124,56,16,0,0,0,56,124,124,124,56,0,0,0,16,56,124,56,16,16,16,16,16,16,16,16,56,56,124,108,238,254,254,68,68,128,128,64,64,64,32,112,112,60,108,110,126,120,32,32,32,128,128,64,64,48,48,62,62,23,23,28,28,24,24,8,8,0,0,128,192,108,127,63,22,22,28,28,28,8,8,8,0,0,0,0,2,7,15,30,250,250,30,15,7,2,0,0,0,0,0,24,60,60,24,0,0,60,126,255,213,255,60,0,0,24,90,255,171,126,153,0,0,153,90,255,171,126,90,0,0,0,0,84,42,84,42,0 '********************************************
'Load Main & Title screens
MainScreen:
DATA 205,0,487,15,1,0,194,15,1,0,12,15,1,0,115,15,1,0,106,15,1,0,275,15,1,0,71,15,1,0,174,15,1,0,480,15,1,0,39,15,1,0,455,15,1,0,123,15,2,0,786,15,1,0,32,15,1,0,18,15,1,0,7,15,1,0,367,15,2,0,30,15,2,0,14,15,2,0,775,15,1,0,31,15,1,0,1170,15,1,0,195,15,1,0,36,15,1,0,354,15,2,0,591,15,1,0,162,15,1,0,7,15,1,0,20,15,1,0,39,15,1,0,394,15,1,0,31,15,1,0,294,15,1,0,317,15,1,0,151,15,1,0,110,15,1,0,347,15,1,0,83,15,2,0,257,15,1,0,365,15,1,0,42,15,1,0,192,15,1,0,103,15,1,0,31,15,1,0,135,15,1,0,138,15,2,0,305,15,1,0,1063,5,4,0,160,5,4,0,149,5,3,0,8,5,3,0,143,5,3,0,14,5,3,0,129,5,2,0,7,5,2,0,20,5,3,0,14,5,1,0,39,5,2,0,67,5,3,0,2,5,3,0,29,5,3,0,8,5,3,0,37,5,3,0,2,5,3,0,34,5,4,0,23,5,3,0,8,5,3,0,29,5,3,0,2,5,3,0,4,5,2,0,31,5,3,0,8,5,3,0,29,5,2,0,4,5,2,0,10,5,4,0,6,5,1,0,14,5,1,0,31,5,2,0,9,5,2,0,10,5,4,0,12,5,3,0,14,5,3,0,12,5,4,0,8,5,2,0,8,5,2,0,5,5,3,0,4,5,3,0,63,5,2,0,5,5,3,0,4,5,3,0,6,5,3,0,20,5,3,0,6,5,3,0,4,5,3,0,3,5,2,0,12,5,5,0,10,5,3,0,62,5,5,0,10,5,6,0,26,5,6,0,10,5,3,0,960,5,320,0,1600 TitleScreen:
DATA 129,4,1617,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,32,15,4,4,12,7,4,4,12,6,4,4,12,5,4,4,24,3,4,4,12,2,4,4,12,1,4,4,12,0,4,4,13136
G.Count = Count%
'Color CONSTs
CONST Black
= 0, Blue
= 1, Red
= 2, Tanc
= 3, Olive
= 4, DkGreen
= 5 CONST BGGreen
= 6, Yellow
= 7, Grey
= 8, SkyBlue
= 9, Orange
= 10 CONST Pink
= 11, Purple
= 12, FadeGreen
= 13, Maroon
= 14, White
= 15 'Sprite CONSTs
CONST NullShip
= 0, Ship
= 1, SmallA
= 2, SmallB
= 3, SmallC
= 4, SmallD
= 5 CONST LargeA
= 6, LargeB
= 7, LargeC
= 8, LargeD
= 9, Bomb
= 10, Tracker
= 11 CONST SpaceShip
= 12, SmallE
= 13, SmallF
= 14, SmallG
= 15, SmallH
= 16 CONST Blast
= 17, SpaceShipShot
= 18 'Zoom CONSTs
CONST None
= 0, H4
= 128, H2
= 64, H12
= 32, H14
= 16, V4
= 8, V2
= 4 CONST V12
= 2, V14
= 1, HF
= 512, VF
= 256 '4-x4, 2-x2, 12-x1/2, 14-x1/4, HF-Flip Horizontal, VF-Flip Vertical
'Layer CONSTs
CONST SPRITE
= 1, TITLE
= 3, BGPLATE
= 2, TEMP
= 6, COLLIDE
= 7, BGCOLOR
= 8 'Game Scores CONSTs
Layer
(4) = _NEWIMAGE(640, 480, 32) 'Sprite draw layerLayer
(5) = _NEWIMAGE(640, 480, 32) 'Composite layerLayer
(TEMP
) = _NEWIMAGE(64, 64, 32) 'temp sprite layer for transparencyLayer
(COLLIDE
) = _NEWIMAGE(640, 480, 32) 'collision shadow layerLayer
(BGCOLOR
) = _NEWIMAGE(640, 480, 32) 'background color
FFX
(1) = _LOADFONT("PixelIntv.ttf", 40, "monospace")
Colors
(0) = _RGB32(0, 0, 0) ' BlackColors
(1) = _RGB32(0, 45, 255) ' BlueColors
(2) = _RGB32(255, 61, 16) ' RedColors
(3) = _RGB32(201, 207, 171) ' TanColors
(4) = _RGB32(84, 110, 0) ' Olive GreenColors
(5) = _RGB32(56, 107, 63) ' DkGreenColors
(6) = _RGB32(0, 167, 86) ' BGGreenColors
(7) = _RGB32(250, 234, 80) ' YellowColors
(8) = _RGB32(189, 172, 200) ' Purpleish GreyColors
(9) = _RGB32(36, 184, 255) ' Sky BlueColors
(10) = _RGB32(255, 180, 31) ' OrangeColors
(11) = _RGB32(255, 78, 87) ' PinkishColors
(12) = _RGB32(164, 150, 255) 'PurplishColors
(13) = _RGB32(117, 204, 128) 'Faded GreenColors
(14) = _RGB32(181, 26, 88) ' MaroonColors
(15) = _RGB32(255, 255, 255) 'White
'color test
'FOR i% = 0 TO 15
' LINE (0 + (i% * 31), 0)-STEP(32, 256), Colors(i%), BF
'NEXT i%
'END
'----------
'draw sprites
DrawSpriteSheet Layer(1)
DrawScreen BGPLATE
DrawScreen TITLE
'IF _FILEEXISTS("debugshot.txt") THEN KILL "debugshot.txt"
'OPEN "debugshot.txt" FOR OUTPUT AS #2
'main
TitleScreen
'start data
G.Movement = 4
G.ShotSpeed = 8
G.Lives = 4
G.level = 1
P.Xpos = 300
P.Ypos = 321
G.Score = 0
ChangeBGColor Black
G.OidCount = 5
FOR i%%
= 0 TO G.OidCount
- 1 Makeoid i%%
TIMER(t&
) ON 'timer animates bombs, trackers, SpaceShip and explosions
Exitflag%% = TRUE
Controls 'keypress routine
FOR i%%
= 0 TO G.OidCount
- 1 Moveoid i%% 'move the asteroids(aka Oids)
ClearLayer COLLIDE
BackGroundColor
'Back Ground Plate
'draw Oids
FOR i%%
= 0 TO G.OidCount
- 1 PlaceSprite O(i%%).Xpos, O(i%%).Ypos, O(i%%).Kind, O(i%%).Zoom, O(i%%).Colr, O(i%%).Rotation
PlaceSpriteShadow O(i%%).Xpos, O(i%%).Ypos, O(i%%).Kind, O(i%%).Zoom, O(i%%).CollideColr, O(i%%).Rotation
'draw explosion if any
FOR i%%
= 0 TO G.BlastCount
- 1 PlaceSprite E(i%%).Xpos, E(i%%).Ypos, Blast, None, Red, E(i%%).Frame
PlaceSpriteShadow E(i%%).Xpos, E(i%%).Ypos, Blast, None, 126, E(i%%).Frame
'draw player
PlaceSprite P.Xpos, P.Ypos, Ship, None, White, 0
PlaceSpriteShadow P.Xpos, P.Ypos, Ship, None, 127, 0
'draw players shot
FOR i%%
= 0 TO P.ShotCount
- 1 MovePlayerShot i%%
DrawPlayerShot i%%
DisplayStats
_PUTIMAGE (0, 0), Layer
(4), Layer
(5) 'combine sprites and BG Plate _PUTIMAGE (0, 0), Layer
(5), Layer
(0) 'Move to display ClearLayer 4
Exitflag%% = TRUE
FOR I%%
= 0 TO G.BlastCount
- 1 E(I%%).Frame = E(I%%).Frame + 1
FOR j%%
= I%%
TO G.BlastCount
E(j%%).Frame = 1
E(j%%).Xpos = 1
E(j%%).Ypos = 1
G.BlastCount = G.BlastCount - 1
FOR I%%
= 0 TO G.OidCount
- 1 O(I%%).Rotation = O(I%%).Rotation + 1
IF O
(I%%
).Rotation
= 5 THEN O
(I%%
).Rotation
= 1 IF G.BlastCount
THEN AnimBlast
'go ahead and animate explosions if any.
STATIC SlowFlag%%
, CoastFlag%%
, ShotLock%%
, BombLock%%
' IF _KEYDOWN(18432) THEN P.SpeedY = P.SpeedY + .25: CoastFlag%% = FALSE
' IF _KEYDOWN(20480) THEN P.SpeedY = P.SpeedY - .25: CoastFlag%% = FALSE
IF P.Xpos
<= 8 THEN P.Xpos
= 8 IF P.Xpos
>= 600 THEN P.Xpos
= 600
'shoot blaster
MakeShot P.ShotCount
P.ShotCount = P.ShotCount + 1
ShotLock%% = TRUE 'must release key to shoot again
ShotLock%% = FALSE
'drop bomb
BombLock%% = TRUE 'must release key to shoot again
BombLock%% = FALSE
'displays Score, Level, Extra Lives
FOR i%%
= 0 TO G.Lives
- 1 PlaceSprite 316 + (i%% * 33), 360, Ship, None, BGGreen, 0
PlaceSprite 316, 360, Ship, None, BGGreen, 0
SUB DrawPlayerShot
(id~%%
) LINE (s
(id~%%
).Xpos
, s
(id~%%
).Ypos
)-STEP(8, 32), Colors
(White
), BF
x% = -1: y% = 0
PSET (x%
, y%
), Colors
(colr%%
) x% = x% + 1
IF x%
= 160 THEN x%
= 0: y%
= y%
+ 1
SUB DrawSpriteSheet
(id&
) IF Sprites
(j%
) AND (2 ^ i%%
) THEN LINE ((i%%
* 4) + xx%
, y%
+ yy%
)-STEP(3, 3), 31, BF
ELSE nul
= 1 'PRINT "1"; ELSE PRINT "0"; y% = y% + 4
IF y%
= 32 THEN y%
= 0: xx%
= xx%
+ 33 IF xx%
= 330 THEN xx%
= 0: yy%
= yy%
+ 33
ChangeBGColor Red
PieceX(i%%) = P.Xpos
PieceY(i%%) = P.Ypos
PlaceSprite PieceX(i%%), PieceY(i%%), SmallC, V12, White, 0
PieceX(i%%) = PieceX(i%%) - 3
PieceX(i%%) = PieceX(i%%) + 3
PieceX(i%%) = PieceX(i%%) - 2
PieceY(i%%) = PieceY(i%%) - 2
PieceX(i%%) = PieceX(i%%) + 2
PieceY(i%%) = PieceY(i%%) - 2
PieceY(i%%) = PieceY(i%%) - 4
_PUTIMAGE (0, 0), Layer
(4), Layer
(5) 'combine sprites and BG Plate _PUTIMAGE (0, 0), Layer
(5), Layer
(0) 'Move to display ClearLayer 4
ChangeBGColor G.CurrentBG
SUB GroundCollide
(id~%%
) 'when things hit the ground layer
'lose points or DIE!
G.Score = G.Score - (SmallOid * G.level \ 2)
G.Score = G.Score - (LargeOid * G.level \ 2)
IF O
(id~%%
).Zoom
= H2
+ V2
THEN G.Score
= G.Score
- (LargeBomb
* G.level \
2) IF O
(id~%%
).Zoom
= None
THEN G.Score
= G.Score
- (SmallBomb
* G.level \
2) ' KillPlayer
'changes direction to target player
'may need special routine for them.
G.Lives = G.Lives - 1
ExplodePlayer
P.ShotCount = 0
P.Xpos = 300
G.Score = G.Score - (100 * G.level)
IF G.Lives
= 0 THEN G.GameOver
= TRUE
SUB MakeBlast
(id~%%
, Oid~%%
) 'center explostions for large Oids and large bombs
IF O
(Oid~%%
).Kind
>= LargeA
AND O
(Oid~%%
).Kind
<= LargeD
THEN E(id~%%).Xpos = O(Oid~%%).Xpos + 8
E(id~%%).Ypos = O(Oid~%%).Ypos - 8
E(id~%%).Xpos = O(Oid~%%).Xpos + 8
E(id~%%).Ypos = O(Oid~%%).Ypos - 8
E(id~%%).Xpos = O(Oid~%%).Xpos
E(id~%%).Ypos = O(Oid~%%).Ypos
E(id~%%).Frame = 1
O
(id~%%
).Xpos
= INT(RND * 600) + 20 O
(id~%%
).Ypos
= INT(RND * 64) - 96
O(id~%%).Angle = O(id~%%).Angle
O(id~%%).Rotation = 1
O
(id~%%
).Kind
= INT(RND * 9) + 2 O
(id~%%
).Speed
= RND * (2 * G.level
) + .1 O
(id~%%
).Colr
= INT(RND * 5) + 6 CollisionColor%% = CollisionColor%% + 1
O(id~%%).CollideColr = CollisionColor%%
IF CollisionColor%%
>= 64 THEN CollisionColor%%
= 1 'set size of object
O(id~%%).Zoom = V12
O(id~%%).Zoom = V12 + H2
CASE 10 'make bombs big or small O(id~%%).Colr = White
O(id~%%).Zoom = None
O(id~%%).Colr = White
'randomly flip object around
IF O
(id~%%
).Kind
>= 2 AND O
(id~%%
).Kind
<= 9 THEN
s(id~%%).Xpos = P.Xpos + 12
s(id~%%).Ypos = 320
SUB MovePlayerShot
(id~%%
) s(id~%%).Ypos = s(id~%%).Ypos - G.ShotSpeed
IF s
(id~%%
).Ypos
> 0 THEN Hit%%
= ShotCollision%%
(id~%%
) ELSE Hit%%
= -1 s(id~%%).Ypos = -32 'move shot for removal
ScoreShot Hit%% 'incress score
MakeBlast G.BlastCount, Hit%%
G.BlastCount = G.BlastCount + 1 'add a new blast
Makeoid Hit%% 'replace the oid with a new one
P.ShotCount = P.ShotCount - 1
FOR i%%
= id~%%
TO P.ShotCount
s(i%% - 1).Xpos = -10: s(i%% - 1).Ypos = 0
O
(id~%%
).Xpos
= O
(id~%%
).Xpos
+ O
(id~%%
).Speed
* COS(O
(id~%%
).Angle
) O(id~%%).Ypos = O(id~%%).Ypos + O(id~%%).Speed '*sin(o(id~%%).angle)
IF O
(id~%%
).Ypos
> 335 THEN GroundCollide id~%%: Makeoid id~%%
hit%% = OidCollide(id~%%)
ScoreShot id~%%
MakeBlast G.BlastCount, id~%%
G.BlastCount = G.BlastCount + 1 'add a new blast
Makeoid id~%%
KillPlayer
Makeoid id~%%
IF O
(id~%%
).Xpos
> 640 OR O
(id~%%
).Xpos
< -16 THEN Makeoid id~%%
SUB PlaceSprite
(x%
, y%
, ID%%
, Zoom~%
, C%%
, Frame%%
) SpriteColor Colors(C%%)
EX% = 30: EY% = 30 'base size
IF (ID%%
< LargeA
) OR (ID%%
> LargeD
) THEN 'Flipping Options
IF Zoom~%
AND 512 THEN EX%
= -EX%
'flip Horizontal IF Zoom~%
AND 256 THEN EY%
= -EY%
'Flip Vertical
'Scaling options
IF Zoom~%
AND 128 THEN EX%
= EX%
* 4 + 0 ' Horizontal x4 IF Zoom~%
AND 64 THEN EX%
= EX%
* 2 + 0 ' Horizontal x2 IF Zoom~%
AND 32 THEN EX%
= EX%
* .5 + 0 ' Horizontal 1/2 IF Zoom~%
AND 16 THEN EX%
= EX%
* .25 + 0 'Horizontal 1/4 IF Zoom~%
AND 8 THEN EY%
= EY%
* 4 + 0 ' Vertical x4 IF Zoom~%
AND 4 THEN EY%
= EY%
* 2 + 0 ' Vertical x2 IF Zoom~%
AND 2 THEN EY%
= EY%
* .5 + 0 ' Vertical 1/2 IF Zoom~%
AND 1 THEN EY%
= EY%
* .25 + 0 ' Vertical 1/4
CASE NullShip
'the ship used for Meteor! CASE Ship
'the ship Used for AstroSmash PlaceSprite x%, y%, SmallD, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallE, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallD, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallE, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallC, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallF, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallC, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallF, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallB, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallG, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallB, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallG, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallA, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallH, Zoom~%, C%%, Frame%%
PlaceSprite x%, y% - 16, SmallA, Zoom~%, C%%, Frame%%
PlaceSprite x%, y%, SmallH, Zoom~%, C%%, Frame%%
_PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (0 + ((Frame%%
- 1) * 33), 33)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (0 + ((Frame%%
- 1) * 33), 66)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), ((165 + (Frame%%
- 1) * 33), 99)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (132 + (Frame%%
- 1) * 33, 33)-STEP(31, 31) SpriteColor Colors(White)
ClearLayer TEMP
SUB PlaceSpriteShadow
(x%
, y%
, ID%%
, Zoom~%
, C%%
, Frame%%
) SpriteColor
_RGB32(C%%
, C%%
, C%%
) EX% = 30: EY% = 30 'base size
IF (ID%%
< LargeA
) OR (ID%%
> LargeD
) THEN 'Flipping Options
IF Zoom~%
AND 512 THEN EX%
= -EX%
'flip Horizontal IF Zoom~%
AND 256 THEN EY%
= -EY%
'Flip Vertical
'Scaling options
IF Zoom~%
AND 128 THEN EX%
= EX%
* 4 + 0 ' Horizontal x4 IF Zoom~%
AND 64 THEN EX%
= EX%
* 2 + 0 ' Horizontal x2 IF Zoom~%
AND 32 THEN EX%
= EX%
* .5 + 0 ' Horizontal 1/2 IF Zoom~%
AND 16 THEN EX%
= EX%
* .25 + 0 'Horizontal 1/4 IF Zoom~%
AND 8 THEN EY%
= EY%
* 4 + 0 ' Vertical x4 IF Zoom~%
AND 4 THEN EY%
= EY%
* 2 + 0 ' Vertical x2 IF Zoom~%
AND 2 THEN EY%
= EY%
* .5 + 0 ' Vertical 1/2 IF Zoom~%
AND 1 THEN EY%
= EY%
* .25 + 0 ' Vertical 1/4
CASE NullShip
'the ship used for Meteor! CASE Ship
'the ship Used for AstroSmash PlaceSpriteShadow x%, y%, SmallD, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallE, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallD, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallE, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallC, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallF, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallC, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallF, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallB, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallG, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallB, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallG, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallA, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallH, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y% - 16, SmallA, Zoom~%, C%%, Frame%%
PlaceSpriteShadow x%, y%, SmallH, Zoom~%, C%%, Frame%%
_PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (0 + ((Frame%%
- 1) * 33), 33)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (0 + ((Frame%%
- 1) * 33), 66)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), ((165 + (Frame%%
- 1) * 33), 99)-STEP(31, 31) _PUTIMAGE (0, 0)-STEP(EX%
, EY%
), Layer
(SPRITE
), Layer
(TEMP
), (132 + (Frame%%
- 1) * 33, 33)-STEP(31, 31) _PUTIMAGE (x%
, y%
), Layer
(TEMP
), Layer
(COLLIDE
) SpriteColor Colors(White)
ClearLayer TEMP
G.Score = G.Score + (SmallOid * G.level)
G.Score = G.Score + (LargeOid * G.level)
IF O
(id~%%
).Zoom
= H2
+ V2
THEN G.Score
= G.Score
+ (LargeBomb
* G.level
) IF O
(id~%%
).Zoom
= None
THEN G.Score
= G.Score
+ (SmallBomb
* G.level
) G.Score = G.Score + (Seeker * G.level)
G.Score = G.Score + (Aliens * G.level)
G.Score = G.Score + (AlienShot * G.level)
IF G.Score
> Highest
THEN Highest
= G.Score
IF INT(Highest
/ 1000) > last
THEN last
= INT(Highest
/ 1000): G.Lives
= G.Lives
+ 1
result%% = TRUE
test~&
= POINT(s
(id~%%
).Xpos
+ 4, s
(id~%%
).Ypos
+ i%%
) 'check collision layer for color IF test~&
<> Colors
(Black
) THEN i%%
= 33 IF test~&
<> Colors
(Black
) THEN 'non black hit something FOR i%%
= 0 TO G.OidCount
- 1 'find which oid was hit IF test~&
= _RGB32(O
(i%%
).CollideColr
, O
(i%%
).CollideColr
, O
(i%%
).CollideColr
) THEN result%%
= i%%
ShotCollision%% = result%%
LINE (0, 400)-(639, 479), Colors
(Olive
), BF
LINE (0, 0)-(639, 399), Colors
(id%%
), BF
result%% = FALSE
FOR y%
= O
(id~%%
).Ypos
TO O
(id~%%
).Ypos
+ 32 STEP 4 FOR x%
= O
(id~%%
).Xpos
TO O
(id~%%
).Xpos
+ 32 STEP 4 ' IF test~& <> Colors(Black) THEN x% = O(id~%%).Xpos + 33: y% = O(id~%%).Ypos + 33: result%% = TRUE
IF test~&
= _RGB32(126, 126, 126) THEN x%
= O
(id~%%
).Xpos
+ 33: y%
= O
(id~%%
).Ypos
+ 33: result%%
= TRUE
IF test~&
= _RGB32(127, 127, 127) THEN x%
= O
(id~%%
).Xpos
+ 33: y%
= O
(id~%%
).Ypos
+ 33: result%%
= TRUE
- 1 '-2 OidCollide%% = result%%
IF G.Score
>= oldscore
+ 1000 OR G.Score
< oldscore
THEN 'only bother if IF oldcolor
= 0 THEN oldcolor
= Colors
(id%%
) 'happens on first run ChangeBGColor Black
G.level = 1
G.CurrentBG = Black
ChangeBGColor Blue
G.level = 2
G.CurrentBG = Blue
ChangeBGColor Maroon
G.level = 3
G.CurrentBG = Maroon
ChangeBGColor SkyBlue
G.level = 4
G.CurrentBG = SkyBlue
ChangeBGColor Grey
G.level = 5
G.CurrentBG = Grey
ChangeBGColor Black
G.level = 6
G.CurrentBG = Black
oldscore
= INT(G.Score
/ 1000) * 1000 'remove values from 1 to 999 ' _DEST Layer(BGCOLOR)
' LOCATE 26, 1: PRINT oldscore; G.BlastCount
' _DEST Layer(0)