Heres my attempt at olympic archery
`texture subroutines
gosub olympictexture
gosub woodtexture
gosub grasstexture
gosub PlusSign
gosub MinusSign
gosub NewGameText
gosub OptionsText
gosub EndGameText
gosub NewGameText1
gosub OptionsText1
gosub EndGameText1
gosub PlusSign1
gosub MinusSign1
gosub MainMenu
gosub target
gosub cementmaker
global wind as integer
global distance as integer
global power as float
global points as integer
global totalpoints as integer
wind=3
distance=30
goto menu
menu:
show mouse
do
paste image 1,screen width()/2-50,0
paste image 6, screen width()/2-34,70
paste image 7,screen width()/2-30,90
paste image 8,screen width()/2-34,110
if mousex()>screen width()/2-34
if mousex()<screen width()/2+34
if mousey()<89
if mousey()>71
paste image 9,screen width()/2-34,70
if mouseclick()=1
goto game
endif
endif
endif
endif
endif
if mousex()>screen width()/2-30
if mousex()<screen width()/2+30
if mousey()<109
if mousey()>91
paste image 10,screen width()/2-30,90
if mouseclick()=1
cls
goto options
endif
endif
endif
endif
endif
if mousex()>screen width()/2-34
if mousex()<screen width()/2+34
if mousey()<129
if mousey()>111
paste image 11,screen width()/2-34,110
if mouseclick()=1
end
endif
endif
endif
endif
endif
loop
return
options:
do
cls
paste image 1,screen width()/2-50,0
ink rgb(255,255,255),rgb(255,255,255)
text screen width()/2-text width("Distance:"),100,"Distance:"+" "+str$(distance)
text screen width()/2-text width("Wind Violence (1-10):"),130,"Wind Violence (1-10):"+" "+str$(wind)
paste image 5,screen width()/2+30,100
paste image 4,screen width()/2+55,100
paste image 5,screen width()/2+30,130
paste image 4,screen width()/2+55,130
text 0,screen height()-16,"To return to the menu, press the down key"
if mousex()>screen width()/2+30
if mousex()<screen width()/2+50
if mousey()>100
if mousey()<120
paste image 13,screen width()/2+30,100
if mouseclick()=1
dec distance
wait 40
endif
endif
endif
endif
endif
if mousex()>screen width()/2+55
if mousex()<screen width()/2+75
if mousey()>100
if mousey()<120
paste image 12,screen width()/2+55,100
if mouseclick()=1
inc distance
wait 40
endif
endif
endif
endif
endif
if mousex()>screen width()/2+30
if mousex()<screen width()/2+50
if mousey()>130
if mousey()<150
paste image 13,screen width()/2+30,130
if mouseclick()=1
dec wind
wait 200
endif
endif
endif
endif
endif
if mousex()>screen width()/2+55
if mousex()<screen width()/2+75
if mousey()>130
if mousey()<150
paste image 12,screen width()/2+55,130
if mouseclick()=1
inc wind
wait 200
endif
endif
endif
endif
endif
if wind>10
wind=10
endif
if wind<1
wind=1
endif
if distance>700
distance=700
endif
if distance<1
distance=1
endif
if downkey()=1
cls
goto menu
endif
loop
return
game:
wait 1000
sync on
sync rate 60
autocam off
make object plain 1,50,distance+20
rotate object 1,90,0,0
position object 1,25,0,(distance+20)/2
texture object 1,3
make object box 2,4,4,1
make mesh from object 1,2
delete object 2
make object box 2,0.9,5,0.9
add limb 2,1,1
offset limb 2,1,0,4,0
position object 2, 25,2,distance
texture object 2,2
texture limb 2,1,15
make object plain 3, 50,distance*2
position object 3,25,distance,distance+20
texture object 3,16
totalarrows=3
make object cone 4,0.4
make mesh from object 2,4
delete object 4
hide mouse
position camera 25,4,25
point camera 25,4,distance
limit=0
make camera 1
set camera view 1, screen width()-150, screen height()-150,screen width(),screen height()
do
paste image 1,screen width()/2-50,0
gosub AimingReticule
gosub Camera1Controls
gosub PowerBar
gosub FiringConditions
gosub Firing
text 0,0,"Points: "+str$(totalpoints)
sync
loop
return
AimingReticule:
ink rgb(0,0,255),rgb(0,0,255)
circle screen width()/2, screen height()/2, 1
ink rgb(255,0,0),rgb(255,0,0)
circle screen width()/2, screen height()/2, 2
return
Camera1Controls:
rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
if wrapvalue(camera angle x(0))>95
if wrapvalue(camera angle x(0))<180
xrotate camera 0,95
endif
endif
if wrapvalue(camera angle x(0))>180
if wrapvalue(camera angle x(0))<280
xrotate camera 0,280
endif
endif
return
PowerBar:
text 0,screen height()-17, "Power:"
a#=power#/100
b#=a#*255
c#=a#*70
d=c#
ink rgb(b#,0,0),rgb(b#,0,0)
text text width("Power")+10, screen height()-17, str$(power#,0)
box 1,screen height()-28,d,screen height()-18
if upkey()=1
if fired=0
inc power#
wait 10
endif
endif
if downkey()=1
if fired=0
dec power#
wait 10
endif
endif
if power#>100
power#=100
endif
if power#<1
power#=1
endif
return
FiringConditions:
if mouseclick()=1
if fired=0
gosub CreateArrow
fired=1
limit=0
position object totalarrows, camera position x(0), camera position y(0), camera position z(0)
rotate object totalarrows, camera angle x(0), camera angle y(0), camera angle z(0)
move object totalarrows,0.1
rotate object totalarrows,object angle x(totalarrows),object angle y(totalarrows),object angle z(totalarrows)
endif
endif
if object position y(totalarrows)<0
fired=0
endif
return
Firing:
if fired=1
point camera 1, object position x(totalarrows),object position y(totalarrows),object position z(totalarrows)
position camera 1,object position x(totalarrows)-4,object position y(totalarrows),object position z(totalarrows)
show object totalarrows
move object totalarrows,a#*6
if limit=0
g#= abs(180-wrapvalue(object angle x(totalarrows)))
g#= 1-((-g#+180)/180)
rotate object totalarrows,wrapvalue(object angle x(totalarrows))+g#,object angle y(totalarrows),object angle z(totalarrows)
endif
if wrapvalue(object angle x(totalarrows))>90
if wrapvalue(object angle x(totalarrows))<100
limit=1
endif
endif
if object collision(totalarrows,2)=1
x= object position x(totalarrows)
y= object position y(totalarrows)
if points=0
if x>object position x(2)-0.5
if x<object position x(2)+0.5
if y>5.5
if y<6.5
points=10
endif
endif
endif
endif
endif
if points=0
if x>object position x(2)-1
if x<object position x(2)+1
if y>5
if y<7
points=8
endif
endif
endif
endif
endif
if points=0
if x>object position x(2)-1.5
if x<object position x(2)+1.5
if y>4.5
if y<7.5
points=6
endif
endif
endif
endif
endif
if points=0
if x>object position x(2)-2
if x<object position x(2)+2
if y>4
if y<8
points=5
endif
endif
endif
endif
endif
fired=0
inc totalpoints, points
points=0
endif
endif
return
CreateArrow:
inc totalarrows
make object box totalarrows,0.1,0.1,2
add limb totalarrows,1,2
offset limb totalarrows,1,0,0,1
rotate limb totalarrows,1,90,0,0
add limb totalarrows,2,2
offset limb totalarrows,2,0,0,-1.02
rotate limb totalarrows,2,90,0,0
color object totalarrows, rgb(100,50,50)
return
`Texture making subroutines
olympictexture:
create bitmap 1,100,53
set current bitmap 1
cls
for x=1 to 100
for y=1 to 53
dot x,y, rgb(255,255,255)
next y
next x
ink rgb(0,0,255),rgb(0,0,255)
circle 17,17,15
circle 17,17,14
ink rgb(0,0,0),rgb(0,0,0)
circle 51,17,15
circle 51,17,14
ink rgb(255,0,0),rgb(255,0,0)
circle 85,17,15
circle 85,17,14
ink rgb(255,255,0),rgb(255,255,0)
circle 34,34,15
circle 34,34,14
ink rgb(0,255,0),rgb(0,255,0)
circle 68,35,15
circle 68,35,14
get image 1,1,1,100,53
set current bitmap 0
delete bitmap 1
return
woodtexture:
create bitmap 1,50,50
set current bitmap 1
for x=1 to 50
for y=1 to 50
abc=rnd(20)+50
dot x,y, rgb(abc+40,abc,abc)
next y
next x
get image 2,1,1,50,50
set current bitmap 0
delete bitmap 1
return
grasstexture:
create bitmap 1, 50, 50
set current bitmap 1
for x=1 to 50
for y=1 to 50
dot x,y,RGB(0,rnd(60)+130,0)
next x
next y
get image 3,1,1,50,50
set current bitmap 0
delete bitmap 1
return
PlusSign:
create bitmap 1, 20,20
set current bitmap 1
for x=1 to 20
for y=1 to 20
dot x,y,rgb(200,200,200)
next y
next x
ink rgb(0,0,0),rgb(0,0,0)
line 10,5,10,15
line 5,10,15,10
get image 4,1,1,20,20
set current bitmap 0
delete bitmap 1
return
MinusSign:
create bitmap 1, 20,20
set current bitmap 1
for x=1 to 20
for y=1 to 20
dot x,y,rgb(200,200,200)
next y
next x
ink rgb(0,0,0),rgb(0,0,0)
line 5,10,15,10
get image 5,1,1,20,20
set current bitmap 0
delete bitmap 1
return
NewGameText:
create bitmap 1,68,20
set current bitmap 1
for x=1 to 68
for y=1 to 20
dot x,y,rgb(200,200,200)
next y
next x
text 2,2,"New Game"
get image 6,1,1,68,20
set current bitmap 0
delete bitmap 1
return
OptionsText:
create bitmap 1,60,20
set current bitmap 1
for x=1 to 60
for y=1 to 20
dot x,y,rgb(200,200,200)
next y
next x
text 2,2,"Options"
get image 7,1,1,60,20
set current bitmap 0
delete bitmap 1
return
EndGameText:
create bitmap 1,68,20
set current bitmap 1
for x=1 to 68
for y=1 to 20
dot x,y,rgb(200,200,200)
next y
next x
text 2,2,"End Game"
get image 8,1,1,68,20
set current bitmap 0
delete bitmap 1
return
NewGameText1:
create bitmap 1,68,20
set current bitmap 1
for x=1 to 68
for y=1 to 20
dot x,y,rgb(150,150,150)
next y
next x
text 2,2,"New Game"
get image 9,1,1,68,20
set current bitmap 0
delete bitmap 1
return
OptionsText1:
create bitmap 1,60,20
set current bitmap 1
for x=1 to 60
for y=1 to 20
dot x,y,rgb(150,150,150)
next y
next x
text 2,2,"Options"
get image 10,1,1,60,20
set current bitmap 0
delete bitmap 1
return
EndGameText1:
create bitmap 1,68,20
set current bitmap 1
for x=1 to 68
for y=1 to 20
dot x,y,rgb(150,150,150)
next y
next x
text 2,2,"End Game"
get image 11,1,1,68,20
set current bitmap 0
delete bitmap 1
return
PlusSign1:
create bitmap 1, 20,20
set current bitmap 1
for x=1 to 20
for y=1 to 20
dot x,y,rgb(150,150,150)
next y
next x
ink rgb(0,0,0),rgb(0,0,0)
line 10,5,10,15
line 5,10,15,10
get image 12,1,1,20,20
set current bitmap 0
delete bitmap 1
return
MinusSign1:
create bitmap 1, 20,20
set current bitmap 1
for x=1 to 20
for y=1 to 20
dot x,y,rgb(150,150,150)
next y
next x
ink rgb(0,0,0),rgb(0,0,0)
line 5,10,15,10
get image 13,1,1,20,20
set current bitmap 0
delete bitmap 1
return
MainMenu:
create bitmap 1, 76,20
set current bitmap 1
for x=1 to 76
for y=1 to 20
dot x,y,rgb(0,0,rnd(50)+100)
next y
next x
text 2,2, "Main Menu"
get image 14,1,1,76,20
set current bitmap 0
delete bitmap 1
return
target:
create bitmap 1, 20,20
set current bitmap 1
for x=1 to 20
for y=1 to 20
dot x,y,rgb(255,0,0)
next y
next x
b=1
for a=1 to 9
changed=0
if b=1
if changed=0
b=0
changed=1
endif
endif
if b=0
if changed=0
b=1
changed=1
endif
endif
if b=0
ink rgb(255,255,255),rgb(255,255,255)
circle 10,10,a
endif
if b=1
ink rgb(255,0,0),rgb(255,0,0)
circle 10,10,a
endif
next a
get image 15,1,1,20,20
set current bitmap 0
delete bitmap 1
return
cementmaker:
create bitmap 1, 300, 300
set current bitmap 1
for x=1 to 300
for y=1 to 300
a=rnd(10)+130
dot x,y,rgb(a,a,a)
next y
next x
for a=1 to 50
dot rnd(300),rnd(300),rgb(0,0,0)
next a
get image 16,1,1,300,300
set current bitmap 0
delete bitmap 1
return
Im not done yet, im working on adding a scoring system, after which, i'll seperate play mode into 1. practice mode and 2. Genuine olympic rules mode.
parrot