here's the code
sync rate 30
sync on
set display mode 1024,768,0
hide mouse
RANDOMIZE timer()
cls
global partx
global party
global cheeses
global nocheeses
global cones
global nocones
global delay
global maxcows
global maxfarmers
jump = 0
optionflag=0
limity = 300
defaulty=509
partx= 50
party= 509
maxcheeses=80
nocheeses=0
maxcones=10
nocones=0
delay=1000
maxcows=10
maxfarmers=30
global totaltime
totaltime = timer()
global totaltime2
totaltime2 = timer()
global totaltime3
totaltime3 = timer()
remstart
CHEESE ARRAY AND TYPE DECLARATION
===========================================
remend
Type cheese
alive
x
y
speed
Endtype
dim cheese(maxcheeses) as cheese
for b=0 to maxcheeses
cheese(b).alive=0
cheese(b).x=300
cheese(b).y=300
cheese(b).speed=5
next b
remstart
CONE ARRAY AND TYPE DECLARATION
===========================================
remend
Type cone
alive
x
y
speed
Endtype
dim cone(maxcones) as cone
for l=0 to maxcones
cone(l).alive=0
cone(l).x=300
cone(l).y=300
cone(l).speed=5
next l
remstart
COW ARRAY AND TYPE DECLARATION
===========================================
remend
type cows
alive
x
y
endtype
dim cow(maxcows) as cows
for a=0 to maxcows
cow(a).alive=0
cow(a).x=300
cow(a).y=300
next a
remstart
COW ARRAY AND TYPE DECLARATION
===========================================
remend
type farmers
alive
x
y
endtype
dim farmer(maxfarmers) as farmers
for v=0 to maxfarmers
farmer(v).alive=0
farmer(v).x=300
farmer(v).y=300
next a
REM LOADING
load image "f1.png",1
load image "f2.png",2
load bitmap "cow2.bmp",4
get image 4,0,0,214,162
delete bitmap 4
load bitmap "parters.bmp",5
get image 5,0,0,140,210
delete bitmap 5
load bitmap "farmer.bmp",6
get image 6,0,0,140,210
delete bitmap 6
load bitmap "lifes.bmp",8
get image 8,0,0,15,19
delete bitmap 8
load bitmap "cheese.bmp",3
get image 3,0,0,41,27
delete bitmap 3
load image "menu.jpg", 11
load image "menu2.jpg", 12
load image "menu3.jpg", 13
load bitmap "cone.bmp", 14
get image 14,0,0,49,48
delete bitmap 14
load bitmap "book.bmp", 7
get image 7,0,0,100,100
delete bitmap 7
load image "norwich.jpg", 9
load music "The Libertines - Hooligans on E (studio version).mp3",1
load sound "sound.wav",1
loop music 1
REM BACKGROUND ARRAY
dim background(20)
background(1) = 1
background(2) = 1
background(3) = 2
background(4) = 1
background(5) = 2
background(6) = 1
background(7) = 2
background(8) = 1
background(9) = 1
background(10) = 2
background(11) = 1
background(12) = 2
background(13) = 2
background(14) = 2
background(15) = 1
background(16) = 2
background(17) = 2
background(18) = 2
background(19) = 1
background(20) = 1
do
paste image background(1+(x/609)),0-(x mod 609),-20
paste image background(2+(x/609)),609-(x mod 609),-20
paste image background(1+(x/609)),1218-(x mod 609),-20
sprite 1,partx,party,5
set cursor 15,15
print "SCORE: ",score
set cursor 115,15
print "LIVES:"
sprite 4,200,8,8
sprite 5,150,8,8
sprite 6,175,8,8
set cursor 314,15
print "Currently Playing: "
paste image 9,235,5
sprite 7,300,300,7
sprite 7,1400,300,7
update_player()
update_cheeses()
Create_cows()
update_cows()
update_cones()
Create_farmers()
update_farmers()
collision_detection()
if rightkey()=1 then inc x,8
sync
loop
wait key
remstart
function game_menu()
paste image 11,0,0
if downkey() and optionflag=0 then optionflag=1
if optionflag=1 then cls
if optionflag=1 then paste image 12,0,0
if optionflag=1 then wait 5
while optionflag=0
if spacekey()=1
main_game()
repeat:until spacekey()=0
endif
endwhile
if downkey() and optionflag=1 then optionflag=2
if optionflag=2 then cls
if optionflag=2 then paste image 13,0,0
if optionflag=2 then wait 5
if upkey() and optionflag=1 then optionflag=0
if optionflag=0 then cls
if optionflag=0 then paste image 11,0,0
if optionflag=0 then wait 5
if upkey() and optionflag=2 then optionflag=1
if optionflag=1 then cls
if optionflag=1 then paste image 12,0,0
if optionflag=1 then wait 5
endfunction
remend
remstart
function main_game()
endfunction
remend
function jump_partridge()
if jump=0 then jump=1
if jump=1 then dec party,9
if jump=1 and party<=limity then jump=2
if jump=2 then inc party,9
if jump=3 and party==defaulty then jump=0
endfunction
remstart
FIRE_CHEESE AND UPDATE_CHEESE FUNCTIONS
===========================================
remend
function fire_cheese()
if timer() => totaltime + 100
totaltime = timer()
for i=1 to 10
if cheese(i).alive=0
cheese(i).alive=1
cheese(i).x=sprite X(1)+125
cheese(i).y=sprite Y(1)+120
sprite i+10,cheese(i).x,cheese(i).y,3
PLAY SOUND 1
show sprite i+10
exit
endif
next i
endif
endfunction
function update_cheeses
for d=1 to 80
if cheese(d).alive
sprite d+80, cheese(d).x,cheese(d).y,3
inc cheese(d).x,10
endif
if cheese(d).x<=-80
cheese(d).alive=0
sprite d+80,-100,-100,3
hide sprite d+80
endif
next d
endfunction
remstart
FIRE_CHEESE AND UPDATE_CHEESE FUNCTIONS
===========================================
remend
function fire_cone()
if timer() => totaltime + 100
totaltime = timer()
for p=1 to 10
if cone(p).alive=0
cone(p).alive=1
cone(p).x=sprite X(1)+125
cone(p).y=sprite Y(1)+120
sprite p+10,cone(p).x,cone(p).y,14
show sprite p+10
exit
endif
next p
endif
endfunction
function update_cones
for e=1 to 10
if cone(e).alive
sprite e+10, cone(e).x,cone(e).y,14
inc cone(e).x,10
endif
if cone(e).x<=-10
cone(e).alive=0
sprite e+10,-100,-100,14
hide sprite e+10
endif
next e
endfunction
function update_player
if partx > screen width() - sprite width(1)
partx= screen width() - sprite width (1)
endif
if rightkey()=1
inc partx,3
endif
if partx < 0
partx= 0
endif
if leftkey()=1
dec partx,3
endif
if party < 0
party= 0
endif
if returnkey()=1
fire_cone()
endif
if spacekey()=1
fire_cheese()
endif
if upkey()=1
jump_partridge()
endif
endfunction
function Create_cows
for a=0 to maxcows
if timer() => totaltime2 + 100
totaltime2 = timer()
if cow(a).alive=0
cow(i).alive=1
cow(i).x=rnd(screen width())
cow(i).y=-100
endif
endif
next a
endfunction
function update_cows
for a=0 to maxcows
if cow(a).alive
sprite a+20,cow(a).x,cow(a).y,4
inc cow(a).y,10
endif
if cow(a).y>=600
cow(a).alive=0
sprite a+20,-100,-100,4
endif
next a
endfunction
function Create_farmers
for f=0 to maxfarmers
if timer() => totaltime3 + 100
totaltime3 = timer()
if farmer(f).alive=0
farmer(f).alive=1
farmer(f).x=1124
farmer(f).y=509
endif
endif
next f
endfunction
function collision_detection()
for c= 1 to maxcheeses
for v= 1 to maxfarmers
if cheese(c).x >= farmer(v).x and cheese(c).y => farmer(v).y and cheese(c).x < farmer(v).x+10
farmer(f).alive=1
if farmer(f).alive=1 then farmer(f).y=3000
endif
next c
next v
endfunction
function update_farmers
for q=0 to maxfarmers
if farmer(q).alive
sprite q+20,farmer(q).x,farmer(q).y,6
dec farmer(q).x,8
endif
if farmer(q).y>=1000
farmer(q).alive=0
sprite q+20,-50,-100,6
endif
next q
endfunction
What did I dream is nothing as it seems, on the way back down for me?