hi I know I joined awhile ago but I never really messed with DBP or DBC at all.
well here is what I'm trying to do I'm making a hang man game but not to good at code and my code is well over 700 lines and was woundering
if there was any way to shorten it up im not good at functions plus please dont tell me to you a mouse button function cause i want no mouse in this game so here is my code please help if you can
set display mode 800,600,32 : sync on : sync rate 0 :ink rgb(0,0,0),0 = black : backdrop off
hide mouse
draw to back : set image colorkey 255,255,255 :
load image "images\Homag.png",7
load image "images\newgame.png",1
load image "images\TheSimpsons1.png",2
load image "images\highscores.png",3
load image "images\options.png",4
load image "images\quitgame.png",5
load image "images\noose.png",6
load image "images\SYC.png",8
load image "images\homerpic.jpg",9
load image "images\margepic.jpg",10
load image "images\bartpic.jpg",11
load image "images\lisapic.jpg",12
load image "images\maggiepic.jpg",13
load image "images\grampspic.jpg",14
load image "images\nedspic.jpg",15
load image "images\melhousepic.jpg",16
load image "images\bobpic.jpg",17
load image "images\krustyspic.jpg",18
load music "simpsonsgame.mp3",1
load music "simpsonsintro.mp3",2
load sound "homer\brain.wav",1
load sound "homer\ebert.wav",2
load sound "homer\bologna.wav",3
load sound "homer\awcrap.wav",4
load sound "homer\homer-wh.wav",5
load sound "homer\ahllo.wav",6
play music 2
loop music 1
volume=100-99
if music exist(1)=1
print "volume:" ; music volume(1)
set music volume 1,75
endif
start:
cls
sprite 2,0,0,2
sprite 1,25,390,1
sprite 3,25,440,3
sprite 4,25,490,4
sprite 5,15,540,5
sync
ngicon:
sprite 6,230,370,6
sync
repeat
rotate sprite 1,3
if returnkey()=1
play sound 1
goto ChrSelect
endif
wait 0100
sync
rotate sprite 1,0
if returnkey()=1
play sound 1
goto ChrSelect
endif
wait 0100
sync
rotate sprite 1,-3
if returnkey()=1
play sound 1
goto ChrSelect
endif
wait 0100
sync
rotate sprite 1,0
if returnkey()=1
play sound 1
goto ChrSelect
endif
wait 0100
sync
if upkey()=1 then goto quicon
if returnkey()=1
play sound 1
goto ChrSelect
endif
until downkey()=1
goto hsicon
hsicon:
sprite 6,245,420,6
sync
repeat
rotate sprite 3,3
if returnkey()=1
play sound 2
`wait 3000
`goto HighScores
goto hsicon
endif
wait 0100
sync
rotate sprite 3,0
if returnkey()=1
play sound 2
`wait 3000
`goto HighScores
goto hsicon
endif
wait 0100
sync
rotate sprite 3,-3
if returnkey()=1
play sound 2
`wait 3000
`goto HighScores
goto hsicon
endif
wait 0100
sync
rotate sprite 3,0
if returnkey()=1
play sound 2
`wait 3000
`goto HighScores
goto hsicon
endif
wait 0100
sync
if upkey()=1 then goto ngicon
if returnkey()=1
play sound 2
`wait 3000
`goto HighScores
goto hsicon
endif
until downkey()=1
goto opicon
opicon:
sprite 6,195,470,6
sync
repeat
rotate sprite 4,3
if returnkey()=1
play sound 3
`wait 8500
`goto Options
goto opicon
endif
wait 0100
sync
rotate sprite 4,0
if returnkey()=1
play sound 3
`wait 8500
`goto Options
goto opicon
endif
wait 0100
sync
rotate sprite 4,-3
if returnkey()=1
play sound 3
`wait 8500
`goto Options
goto opicon
endif
wait 0100
sync
rotate sprite 4,0
if returnkey()=1
play sound 3
`wait 8500
`goto Options
goto opicon
endif
wait 0100
sync
if upkey()=1 then goto hsicon
if returnkey()=1
play sound 3
`wait 8500
`goto Options
goto opicon
endif
until downkey()=1
goto quicon
quicon:
sprite 6,230,520,6
sync
repeat
rotate sprite 5,3
if returnkey()=1
play sound 4
wait 2000
end
endif
wait 0050
sync
rotate sprite 5,0
if returnkey()=1
play sound 4
wait 2000
end
endif
wait 0050
sync
rotate sprite 5,-3
if returnkey()=1
play sound 4
wait 2000
end
endif
wait 0050
sync
rotate sprite 5,0
if returnkey()=1
play sound 4
wait 2000
end
endif
wait 0050
sync
if upkey()=1 then goto opicon
if returnkey()=1
play sound 4
wait 2000
end
endif
until downkey()=1
goto ngicon
ChrSelect:
cls
hide sprite 1
hide sprite 2
hide sprite 3
hide sprite 4
hide sprite 5
hide sprite 6
sprite 7,0,0,7
sprite 8,150,15,8
sprite 9,25,80,9
sprite 10,120,80,10
sprite 11,215,80,11
sprite 12,310,80,12
sprite 13,405,80,13
sprite 14,25,170,14
sprite 15,120,170,15
sprite 16,215,170,16
sprite 17,310,170,17
sprite 18,405,170,18
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
sync
NewGame:
HighScores:
Options:
homer:
wait 0100
sprite 19,60,40,6
show sprite 19
sync
wait 0100
repeat
if returnkey()=1
play sound 6
wait 2000
end
endif
if downkey()=1 then goto gramps
if leftkey()=1 then goto krusty
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto marge
marge:
wait 0100
sprite 19,156,40,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if downkey()=1 then goto ned
if leftkey()=1 then goto homer
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto bart
bart:
wait 0100
sprite 19,252,40,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if downkey()=1 then goto melhouse
if leftkey()=1 then goto marge
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto lisa
lisa:
wait 0100
sprite 19,348,40,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if downkey()=1 then goto bob
if leftkey()=1 then goto bart
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto maggie
maggie:
wait 0100
sprite 19,444,40,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if downkey()=1 then goto krusty
if leftkey()=1 then goto lisa
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto gramps
gramps:
wait 0100
sprite 19,60,130,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if upkey()=1 then goto homer
if leftkey()=1 then goto maggie
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto ned
ned:
wait 0100
sprite 19,156,130,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if upkey()=1 then goto marge
if leftkey()=1 then goto gramps
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto melhouse
melhouse:
wait 0100
sprite 19,252,130,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if upkey()=1 then goto bart
if leftkey()=1 then goto ned
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto bob
bob:
wait 0100
sprite 19,348,130,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if upkey()=1 then goto lisa
if leftkey()=1 then goto melhouse
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto krusty
krusty:
wait 0100
sprite 19,444,130,6
sync
wait 0100
repeat
if returnkey()=1
play sound 5
wait 1000
`end
endif
if upkey()=1 then goto maggie
if leftkey()=1 then goto bob
if spacekey()=1
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
show sprite 1
show sprite 2
show sprite 3
show sprite 4
show sprite 5
show sprite 6
goto start
endif
sync
wait 0100
until rightkey()=1
wait 0100
goto homer
ps please help me with getting rid of the goto it seem to slow down code i think