' ==== START HERE ===
newscreen
basicsettings
level1
SUB basicsettings
'========================================================SUB BASIC SETTINGS
win.MIDY = win.HEIGHT / 2
win.TOP = 0
win.BOTTOM = win.HEIGHT
win.LEFT = 0
player.PIC
= _LOADIMAGE("SCRAPSHIP\gfx\playerTEST.png") 'Add path to PNG file here. This is one is 60x60 player.HEIGHT = 60
player.MIDX
= player.
WIDTH / 2 player.MIDY = player.HEIGHT / 2
player.X = win.MIDX - player.MIDX
player.Y = win.MIDY - player.MIDY
player.SPEED = 2
SUB level1
'=============================================================SUB LEVEL 1
newscreen
moveplayer
fireshot
SUB fireshot
'======================================================== SUB SET SHOT
numshots = 0
shot
(numshots
).PIC
= _LOADIMAGE("SCRAPSHIP\gfx\shot.png") 'Add path to PNG file here. This one is 10x20 shot(numshots).SPEED = 5
shot(numshots).HEIGHT = 20
shot
(numshots
).
WIDTH = 10 shot
(numshots
).MIDX
= shot
(numshots
).
WIDTH / 2 shot(numshots).MIDY = shot(numshots).HEIGHT / 2
shot(numshots).Y = shot(numshots).Y - 5
shot(numshots).ACTIVE = FALSE
_PUTIMAGE (shot
(numshots
).X
, shot
(numshots
).Y
), shot
(numshots
).PIC
numshots = numshots + 1
numshots = 0
shot(numshots).ACTIVE = TRUE
shot(numshots).X = player.X + player.MIDX - shot(numshots).MIDX
shot(numshots).Y = player.Y
keydelay = 10
numshots = numshots + 1
IF keydelay
THEN keydelay
= keydelay
- 1
SUB moveplayer
'===========================================================SUB MOVE PLAYER
player.X = player.X - player.SPEED
player.X = player.X + player.SPEED
player.Y = player.Y - player.SPEED
player.Y = player.Y + player.SPEED
SUB newscreen
'==============================================================SUB NEW SCREEN win.HEIGHT = 1080
win.COLORS = 32