ok so i changed the code I was using above and added some media; here is my first game. I call it "Shoot Out" !!! Let me know what you think and post your stats
my highest performance rating was 375
`set display mode 800,600,32
sync on : sync rate 32 : hide mouse
randomize rnd(25)
``set my x y variables to the mouse position and position the mouse in
``the middle of the screen
xpos#= mouseX() : ypos#= mouseY() : position mouse screen width()/2,screen height()/2
``my variables
lngth#=0
trythis=0
trythat=0
score=0
shiz=0
lngth1=0
strt=0
logo=0
amo1=9
headshot=0
lvlchng=1
regulator=0
``load the images and sounds
load image "sprites/main/uzi1.bmp",20
load image "sprites/main/smlg.bmp",19
load image "sprites/main/main_lgo.bmp",18
load image "sprites/level/brl_01.bmp",17
load image "sprites/level/wall_01.bmp",16
load image "sprites/level/back_bldg.bmp",15
load image "sprites/level/winbkg.bmp",14
load image "sprites/level/crate.bmp",13
load image "sprites/level/d_01.bmp",12
load image "sprites/level/c_01.bmp",11
load image "sprites/level/b_01.bmp",10
load image "sprites/level/a_01.bmp",9
load image "sprites/level/sky_day_blue.bmp",8
load image "sprites/level/bodyshot.bmp",7
load image "sprites/level/headshot.bmp",6
load image "sprites/level/badg1clr.bmp",5
load image "sprites/level/amo1_empty.bmp",4
load image "sprites/level/amo1.bmp",1
load image "sprites/level/hs.bmp",2
load image "sprites/level/retic.bmp",3
load sound "sound/gun_snd1.wav",1
load sound "sound/gun_clps.wav",2
```
```######### sprite count= 36
```
do
``clear the screen
cls
if lvlchng=1 then gosub _lev1
``make the basic GUI
`````amo-1
sprite 5,450,20,4
sprite 3,450,20,1
`````amo-2
sprite 6,435,20,4
sprite 7,435,20,1
`````amo-3
sprite 8,420,20,4
sprite 9,420,20,1
`````amo-4
sprite 10,405,20,4
sprite 11,405,20,1
`````amo-5
sprite 12,390,20,4
sprite 13,390,20,1
`````amo-6
sprite 14,375,20,4
sprite 15,375,20,1
`````amo-7
sprite 16,360,20,4
sprite 17,360,20,1
`````amo-8
sprite 18,345,20,4
sprite 19,345,20,1
`````amo-9
sprite 20,330,20,4
sprite 21,330,20,1
``````
``````GUI STUFF BELOW
ink rgb(139,158,191),0 : box 0,0,800,600
ink rgb(0,0,0),0 : box 8,8,792,592
ink rgb(139,158,191),0 : box 8,0,792,65
ink rgb(0,0,0),0 : box 8,8,792,61
ink rgb(31,100,227),0 : box 9,9,791,60
ink rgb(0,0,0),0 : box 12,14,195,54
ink rgb(139,158,191),0 : box 13,15,194,53
ink rgb(0,0,0),0 : box 14,16,193,52
ink rgb(0,0,0),0 : box 327,18,469,54
ink rgb(139,158,191),0 : box 328,19,468,53
ink rgb(0,0,0),0 : box 329,20,467,52
ink rgb(255,255,255),0
```starting screen loop- below
if logo=0
do
show mouse
ink rgb(139,158,191),0 : box 0,0,800,600
ink rgb(0,0,0),0 : box 8,8,792,592
sprite 34,20,70,18
sprite 35,10,526,19
sprite 36,135,270,20
sprite 37,535,270,20
if askmehow=0
mirror sprite 37
askmehow=1
endif
ink rgb(255,255,255),0
set text font "impact"
set text size 48
set text transparent
text 315,256,"Shoot Out"
set text font "arial black"
ink rgb(169,1,1),0 : box 290,336,510,359
ink rgb(96,16,16),0 : box 292,338,508,357
ink rgb(255,255,255),0
set text size 20
text 300,335,"Right Click Mouse to Start"
ink rgb(255,255,255),0
set text font "arial"
ink rgb(139,158,191),0 : box 311,402,484,482
ink rgb(0,0,0),0 : box 313,404,482,480
ink rgb(255,255,255),0
set text size 14
text 315,405,"Aim = ( mouse )"
text 315,420,"Fire = ( left mouse button )"
text 315,435,"Reload = ( space key )"
text 315,450,"Pause Game = ( 'p' key )"
text 315,465,"Exit Game = ( esc key )"
set text size 15
text 10,10,"fastsync games by: "
set text font "impact"
set text size 25
text 20,20,"http://batbusters.us"
set text size 15
set text font "Courier"
hide sprite 3
hide sprite 5
hide sprite 6
hide sprite 7
hide sprite 8
hide sprite 9
hide sprite 10
hide sprite 11
hide sprite 12
hide sprite 13
hide sprite 14
hide sprite 15
hide sprite 16
hide sprite 17
hide sprite 18
hide sprite 19
hide sprite 20
hide sprite 21
hide sprite 23
hide sprite 25
hide sprite 26
hide sprite 27
hide sprite 28
hide sprite 29
hide sprite 30
hide sprite 31
hide sprite 32
hide sprite 33
`ink rgb(31,100,227),0 : box 10,10,790,590
logo=1
if mouseclick()=2
show sprite 3
show sprite 5
show sprite 6
show sprite 7
show sprite 8
show sprite 9
show sprite 10
show sprite 11
show sprite 12
show sprite 13
hide sprite 14
show sprite 15
show sprite 16
show sprite 17
show sprite 18
show sprite 19
show sprite 20
show sprite 21
hide sprite 36
hide sprite 37
hide sprite 35
hide sprite 34
show sprite 23
show sprite 25
show sprite 26
show sprite 27
show sprite 28
show sprite 29
show sprite 30
show sprite 31
show sprite 32
show sprite 33
hide mouse
exit
endif
sync
loop
endif
```end of start screen-above
``time delay to randomize the target sprite
``and regulate the score counter
if trythis=0
gosub _sprites : trythis=1
endif
if trythis=1
pssy=pssy+1
if pssy=35
trythis=0
lngth=lngth+2
endif
endif
if pssy>=35 then pssy=0
``end of time delay
`` go to some subroutines
gosub _moveretic : gosub _scrwalls
``here is where the the program detects if
``you hit the target and adds a point if you did
if sprite collision(22,4) and mouseclick()=1 and trythat=0 and amo1>0
headshot=headshot+1
trythat=1
score=score+1
endif
if sprite collision(24,4) and mouseclick()=1 and trythat=0 and amo1>0
trythat=1
score=score+1
endif
if mouseclick()=0 and trythat=1 then trythat=0 and amo1>0
``play gun shot sound when mouse 1 is clicked
if mouseclick()=1 and shiz=0 and amo1>0
amo1=amo1-1
shots=shots+1
shiz=1
play sound 1
if amo1=8 then hide sprite 3
if amo1=7 then hide sprite 7
if amo1=6 then hide sprite 9
if amo1=5 then hide sprite 11
if amo1=4 then hide sprite 13
if amo1=3 then hide sprite 15
if amo1=2 then hide sprite 17
if amo1=1 then hide sprite 19
if amo1=0 then hide sprite 21
endif
``end of gun shot
if spacekey()=1 and fixer=0
fixer=1
play sound 2
show sprite 3
show sprite 7
show sprite 9
show sprite 11
show sprite 13
show sprite 15
show sprite 17
show sprite 19
show sprite 21
amo1=9
endif
if fixer=1 and spacekey()=0
fixer=0
endif
if shiz=1 and mouseclick()=0 then shiz=0
``print your score and frames per second; accuracy too
if lngth<=39 and shots>=1
ave=(score*100)/shots
print " "
print " "
print " Score: ",score : print " Accuracy= ",ave,"%"
endif
if lngth>=40
headpoints=(headshot*5)
bodypoints=((score-headshot)*2)
pcentpoints=0
if ave<=25 then pcentpoints=10
if ave>=26 then pcentpoints=25
if ave>=50 then pcentpoints=50
if ave>=75 then pcentpoints=75
if ave>=85 then pcentpoints=100
if ave>=90 then pcntpoints=150
do
cls
set cursor screen width()/2-60, screen height()/2
print "Shots on target= ",score
set cursor screen width()/2-60, screen height()/2+12
print " Head Shots= ",headshot
set cursor screen width()/2-60, screen height()/2+24
print " Body Shots= ",(score-headshot)
set cursor screen width()/2-60, screen height()/2+36
print " Accuracy= ",ave,"%"
set cursor screen width()/2-85, screen height()/2+150
print " Performance rating= ", (pcentpoints+headpoints+bodypoints+score)
set cursor screen width()/2-100, screen height()/2+210
print "press (enter key) to play again"
hide sprite 2
hide sprite 3
hide sprite 5
hide sprite 6
hide sprite 7
hide sprite 8
hide sprite 9
hide sprite 10
hide sprite 11
hide sprite 12
hide sprite 13
hide sprite 14
hide sprite 15
hide sprite 16
hide sprite 17
hide sprite 18
hide sprite 19
hide sprite 20
hide sprite 21
hide sprite 23
hide sprite 25
hide sprite 26
hide sprite 27
hide sprite 28
hide sprite 29
hide sprite 30
hide sprite 31
hide sprite 32
hide sprite 33
if returnkey()=1 then exit
sync
loop
do
cls
gosub _moveretic
ink rgb(0,0,0),0 : box 0,0,800,600
set cursor screen width()/2-60, screen height()/2
ink rgb(255,255,255),0 : print "Get ready to start"
strt=strt+1
if strt>=200
show sprite 2
lngth=0
score=0
strt=0
shots=0
amo1=9
ave=0
headshot=0
show sprite 3
show sprite 5
show sprite 6
show sprite 7
show sprite 8
show sprite 9
show sprite 10
show sprite 11
show sprite 12
show sprite 13
show sprite 14
show sprite 15
show sprite 16
show sprite 17
show sprite 18
show sprite 19
show sprite 20
show sprite 21
show sprite 23
show sprite 25
show sprite 26
show sprite 27
show sprite 28
show sprite 29
show sprite 30
show sprite 31
show sprite 32
show sprite 33
exit
endif
fastsync
loop
endif
```Pause code below
if keystate(25)=1
do
ink rgb(139,158,191),0 : box 0,0,800,600
ink rgb(0,0,0),0 : box 8,8,792,592
hide sprite 2
hide sprite 23
hide sprite 25
hide sprite 26
hide sprite 27
hide sprite 28
hide sprite 29
hide sprite 30
hide sprite 31
hide sprite 32
hide sprite 33
set cursor screen width()/2-40, screen height()/2
ink rgb(255,255,255),1 : print "Paused"
set cursor screen width()/2-140, screen height()/2+18
print "'right click' (mouse) to continue"
if mouseclick()=2
show sprite 2
show sprite 23
show sprite 25
show sprite 26
show sprite 27
show sprite 28
show sprite 29
show sprite 30
show sprite 31
show sprite 32
show sprite 33
exit
endif
fastsync
loop
endif
```pause code above
`##sprite priority below
set sprite priority 30,1
set sprite priority 2,2
set sprite priority 25,3
set sprite priority 26,4
set sprite priority 27,5
set sprite priority 28,6
set sprite priority 33,7
set sprite priority 29,8
set sprite priority 4,9
sync
loop
``this subroutine will position the reticule where you move the mouse
_moveretic:
if mousemoveX() then xpos# = mouseX() : if mousemoveY() then ypos# = mouseY()
sprite 4,xpos#,ypos#,3
return
``this subroutine keeps the mouse on the screen as long as
``the resolution is at 800X600
_scrwalls:
if ypos# >=590 then ypos# = 589 : if ypos# <=10 then ypos# = 9
if xpos# >=790 then xpos# = 789 : if xpos# <=10 then xpos# = 9
return
``this code places the target in a random location
``on the screen
_sprites:
sprcount=rnd(10)
if sprcount=0
s1Xpos#=42
s1Ypos#=454
endif
if sprcount=1
s1Xpos#=473
s1Ypos#=137
endif
if sprcount=2
s1Xpos#=362
s1Ypos#=290
endif
if sprcount=3
s1Xpos#=610
s1Ypos#=290
endif
if sprcount=4
s1Xpos#=685
s1Ypos#=464
endif
if sprcount=5
s1Xpos#=555
s1Ypos#=137
endif
if sprcount=6
s1Xpos#=365
s1Ypos#=464
endif
if sprcount=7
s1Xpos#=685
s1Ypos#=290
endif
if sprcount=8
s1Xpos#=685
s1Ypos#=137
endif
if sprcount=9
s1Xpos#=473
s1Ypos#=464
endif
if sprcount=10
s1Xpos#=473
s1Ypos#=290
endif
sprite 2,s1Xpos#,s1Ypos#,5
sprite 22,s1Xpos#+17,s1Ypos#+10,6
sprite 24,s1Xpos#+17,s1ypos#+45,7
return
_lev1:
sprite 23,8,64,8
sprite 25,278,83,9
sprite 26,278,209,10
sprite 27,278,335,11
sprite 28,278,461,12
sprite 29,325,352,13
sprite 30,290,85,14
sprite 31,10,80,15
sprite 32,10,461,16
sprite 33,16,464,17
return
media:
http://batbusters.us/seik/shoot-out.zip
Intel P4 3.6Ghz 1G PC3200 DDR