well i guess my post for the challenge is gonna have to be
copying ric's but (you stold all of my ideas you ******* lol just kidding although i was working on the reflection and the sun when you posted that lol not much more i can do and im pretty busy)
if check display mode(1024,768,32)=1 then set display mode 1024,768,32
sync on
sync rate 60
autocam off
hide mouse
ink rgb(120,160,185),0
box 0,0,97,97
get image 1,0,0,100,100
make matrix 1, 1000, 1000, 20, 20
position matrix 1,-500,0,-500
prepare matrix texture 1, 1, 1, 1
ghost matrix on 1,3
update matrix 1
color backdrop 0
set ambient light 0
make light 1
set light range 1,2000
hide light 0
make object sphere 100,20
set object light 100,0
global a#
global cxa#
global cx#
global cy#
global cz#
cz#=-400
global theta#
make_objects()
DO
move_light()
update_shadow()
camera_stuff()
sync
LOOP
function camera_stuff()
oldcx#=cx#
oldcz#=cz#
speed# = 5
if shiftkey() then speed# = 10
if upkey()=1
cx#=newxvalue(cx#,a#,speed#)
cz#=newzvalue(cz#,a#,speed#)
endif
if downkey()=1
cx#=newxvalue(cx#,a#,-speed#)
cz#=newzvalue(cz#,a#,-speed#)
endif
if leftkey()=1
cx#=newxvalue(cx#,wrapvalue(a#-90.0),speed#)
cz#=newzvalue(cz#,wrapvalue(a#-90.0),speed#)
endif
if rightkey()=1
cx#=newxvalue(cx#,wrapvalue(a#+90.0),speed#)
cz#=newzvalue(cz#,wrapvalue(a#+90.0),speed#)
endif
a#=wrapvalue(a#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
if cxa#<-90.0 then cxa#=-90.0
if cxa#>90.0 then cxa#=90.0
cy# = get ground height(1,cx#,cz#)
position camera cx#,cy#+50,cz#
rotate camera wrapvalue(cxa#),a#,0
endfunction
function make_objects()
ink rgb(155,155,255),0
box 0,0,10,10
get image 2,0,0,10,10
make object sphere 1,50,30,30
texture object 1,2
set object specular power 1,30
set object specular 1,rgb(250,150,150)
set object smoothing 1,100
set object diffuse 1,rgb(200,170,140)
position object 1,-100,25,0
make object sphere 2,50,20,20
make mesh from object 2,2
add limb 1,1,2
delete object 2
delete mesh 2
color limb 1,1,0
ink rgb(0,255,0),0
box 0,0,10,10
get image 4,0,0,10,10
make object cylinder 5,50
texture object 5,4
set object specular power 5,30
set object specular 5,rgb(250,150,150)
set object smoothing 5,100
set object diffuse 5,rgb(200,170,140)
position object 5,0,25,0
make object cylinder 6,50
xrotate object 6,90
fix object pivot 6
make mesh from object 2,6
add limb 5,1,2
delete object 6
delete mesh 2
color limb 5,1,0
ink rgb(255,0,0),0
box 0,0,10,10
get image 3,0,0,10,10
make object cone 3,50
texture object 3,3
set object specular power 3,30
set object specular 3,rgb(250,150,150)
set object smoothing 3,100
set object diffuse 3,rgb(200,170,140)
position object 3,100,25,0
make object cone 4,50
xrotate object 4,90
fix object pivot 4
make mesh from object 2,4
add limb 3,1,2
delete object 4
delete mesh 2
color limb 3,1,0
make object sphere 101,50
texture object 101,2
fade object 101,30
position object 101,-100,-25,0
xrotate object 101,-180
make object cone 103,50
texture object 103,3
fade object 103,60
position object 103,100,-25,0
xrotate object 103,-180
make object cylinder 105,50
texture object 105,4
fade object 105,30
position object 105,0,-25,0
xrotate object 105,-180
endfunction
function move_light()
lightx#=260*sin(theta#)
lightz#=150*cos(theta#)
lighty#=180+150*cos(theta#/1.4)
inc theta#
position light 1,lightx#,lighty#,lightz#
position object 100,lightx#,lighty#,lightz#
endfunction
function update_shadow()
for object=1 to 5 step 2
horizontal_distance#=sqrt((light position x(1)-object position x(object))^2+(light position z(1)-object position z(object))^2)
vertical_distance#=light position y(1)-object position y(object)
offset#=24+(horizontal_distance#/vertical_distance#)
offset limb object,1,0,-25,offset#
scale limb object,1,100,2,100+2*offset#
bearing#=atanfull(light position x(1)-object position x(object),light position z(1)-object position z(object))
rotate object object,0,bearing#-180,0
next object
endfunction
but anyways remember your long b4 posted ULTIMATE PONG well i have modified it a BUNCH and i need your help on it now....
i added:
-Different colored levels
-Menu
-Highscore
-More changing of camera
-Music and Sound FX
-Increase of music speed as level gain
-Different "Stages"
and i want to add a system on being able to have your own "character" with like your own name with custom paddle color and perhaps other features but i would like some1 to help me have a way to store the color of the paddle (red green and blue) and the name and other feature data if you think of any. here is my best crack at it, it is based off of the highscore version but i dont understand it completely myself
i was thinking to store the name as a string than the colors as integers and any other settings as integers (ex. if feature=1 then... if feature=2 then.... etc. etc.)
you will need the following pictures in the directory for menu system
http://www.sell4funebay.com/images/button.bmp
http://www.sell4funebay.com/images/buttonover.bmp
(if your wondering why it is "www.sell4funebay.com" it is sell-4-fun-ebay to break it down and it is my moms ebay business website im just using it to host my pictures for stuff like this)
also i "remmed out"(if that is a coding term lol) the sound fx and music
my shot at the "character" thing is the function at button of code(line 991)
global newornot
global level
dim sco_name$(9)
dim sco_score(9)
newornot=0
if check display mode(1024,768,32)=1 then set display mode 1024,768,32
Ink RGB(255,255,255),0
set text font "tahoma"
set text size 28
`load sound "blip.wav",1
`load sound "metalclank.wav",2
`load music "dust.mp3",1
`load music "ancient_sighs.mp3",2
character()
wait key
Menu:
`loop music 1
backdrop off
buttons()
initscores()
do
sync
background()
buttons()
loop
make:
hide mouse
`create green texture
for x=0 to 100
for y=0 to 100
ink rgb(0,x+y,0),0
dot x,y
next y
next x
get image 103,0,0,100,100
cls
`create purple texture
for x=0 to 100
for y=0 to 100
ink rgb(x+y,0,x+y),0
dot x,y
next y
next x
get image 102,0,0,100,100
cls
`create blue texture
if level<3
hereb4=0
newornot=0
for x=0 to 100
for y=0 to 100
ink rgb(0,0,x+y),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=3
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y,0,0),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=5
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(0,x+y,0),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=7
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y,0,x+y),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=9
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y/1.04,x+y,x+y/17),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=11
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y,x+y/2.3,x+y/23.1),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=13
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y/5.66,x+y/1.14,x+y),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
if level=15
hereb4=1
newornot = 1
for x=0 to 100
for y=0 to 100
ink rgb(x+y,x+y,x+y),0
dot x,y
next y
next x
get image 101,0,0,100,100
endif
`create star texture
for x=0 to 100
for y=0 to 100
d=rnd(20)
ink rgb(100+rnd(100),100+rnd(100),rnd(100)+100),0
if d=1 then dot x,y
next y
next x
get image 1,0,0,100,100
`create tile texture
if level<3
cls
ink rgb(0,0,255),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=3
cls
ink rgb(255,0,0),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=5
cls
ink rgb(0,255,0),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=7
cls
ink rgb(255,0,255),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=9
cls
ink rgb(245,255,15),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=11
cls
ink rgb(255,110,11),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=13
cls
ink rgb(45,223,255),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if level=15
cls
ink rgb(255,255,255),0
box 0,0,10,10
box 10,10,20,20
get image 2,0,0,20,20
endif
if escapekey()=1 then end
set text font "sf automaton_mod"
set text size 25
`create starsphere
make object sphere 1000,-1000,50,50
texture object 1000,1
scale object texture 1000,5,5
xrotate object 1000,-90
`player paddle
make object sphere 1,20,20,20
scale object 1,100,400,100
ghost object on 1
texture object 1,102
set object emissive 1,rgb(200,200,200)
set object specular 1,rgb(250,250,250)
set object specular power 1,10
set object fog 1,0
set object collision on 1
set object collision to boxes 1
`reflection of player paddle
clone object 302,1 `top
scale object 302,100,400,100
fade object 302,90
clone object 303,1 `bottom
scale object 303,100,400,100
fade object 303,90
`computer paddle
make object sphere 2,20,20,20
scale object 2,100,400,100
ghost object on 2
texture object 2,103
set object emissive 2,rgb(200,200,200)
set object specular 2,rgb(250,250,250)
set object specular power 2,10
set object fog 2,0
set object collision on 2
set object collision to boxes 2
`reflection of computer paddle
clone object 304,2 `top
scale object 304,100,400,100
fade object 304,90
clone object 305,2 `bottom
scale object 305,100,400,100
fade object 305,90
`ball
make object sphere 3,20,40,40
texture object 3,101
set object specular 3,rgb(200,200,200)
set object specular power 3,15
set object emissive 3,rgb(150,150,100)
set object ambient 3,0
set object collision on 3
set object fog 3,0
`reflection of ball
clone object 300,3 `top reflection
fade object 300,50
clone object 301,3 `bottom reflection
fade object 301,50
`bottom wall
make object plain 4,500,800
xrotate object 4,90
set object collision on 4
texture object 4,2
scale object texture 4,5,5
set object transparency 4,1
`top wall
make object plain 5,500,800
xrotate object 5,90
set object collision on 5
texture object 5,2
scale object texture 5,5,5
set object transparency 5,1
`back wall
make object plain 6,500,100
texture object 6,101
scale object texture 6,2,10
set object texture 6,2,0
set object transparency 6,1
set object fog 6,0
ghost object on 6
`position walls
position object 4,0,-150,100
position object 5,0,150,100
position object 6,0,0,300
`restart point for new game (the goto command is not dead yet!)
newgame:
if newornot = 0
for object=300 to 305
hide object object
next object
`zoom in
paddlex#=0
position object 1,-paddlex#,0,0
position object 2,paddlex#,0,0
position object 3,0,0,0
zrotate camera 0
camz#=-2000.0
camrl#=0
position camera 0,0,0,camz#
while camz#<-500.0
inc camz#,10
inc camrl#,.1589
roll camera right camrl#
position camera 0,0,camz#
sync
endwhile
position camera 0,0,0,-500
`set paddle positions
while paddlex#<180
inc paddlex#
position object 1,-paddlex#,0,0
position object 2,paddlex#,0,0
sync
endwhile
do
text screen width()/2-100,200,"Gravity on? [Y]es [N]o"
if inkey$()="y" then gravity=1:exit
if inkey$()="n" then gravity=0:exit
sync
loop
text screen width()/2-70,240,"GET READY!"
sync
wait 600
for object=300 to 305
show object object
next object
`set initial variables
level=1
pscore=0
cscore=0
pv#=10 `player paddle velocity
bvx#=10 `ball velocity
crntmscspd#=100
newornot=0
here1=1
here2=1
here3=1
here4=1
here5=1
here6=1
here7=1
if gravity=1
cv#=3.5 `computer paddle velocity
g#=0.5
else
cv#=2
g#=0
endif
endif
`restart point for new serve or new level
restart:
randomize timer()
wait 800
py#=-10+rnd(20) `player's initial y position
cy#=-10+rnd(20) `computer's initial y position
bx#=0 `ball x
by#=0 `ball y
bvy#=1.5+rnd(10)/10 `ball direction (in degrees:- horizontal=0)
bvx#=abs(bvx#)
`main loop
do
`set sound volume 1,80 : set sound volume 2,80
`set music volume 1,100
`player input
remstart
if upkey()>0 and object collision (1,5)=0
py#=py#+pv#
endif
if downkey()>0 and object collision (1,4)=0
py#=py#-pv#
endif
remend
py#=py#-mousemovey()
if py#>110 then py#=110
if py#<-110 then py#=-110
`move player paddle
position object 1,-180,py#,100
position object 302,-180,-py#-300,100
position object 303,-180,-py#+300,100
`position object 401,-180,py#,100
`ball motion
bvy#=bvy#+g#
bx#=bx#+bvx#
by#=by#-bvy#
`collision with court
if by#>140
`play sound 2
by#=by#-10
bvy#=bvy#*-1
endif
if by#<-140
`play sound 2
by#=by#+10
bvy#=bvy#*-1
endif
`collision with player paddle
if object collision(3,0)=1
`play sound 1
bvx#=bvx#*-1 `reverse velocity
bx#=-150 `prevent embedding
`measure offset between player paddle and ball and adjust direction
po#=by#-py#
bvy#=bvy#-po#*0.15
Endif
`and same for computer paddle.....
If object collision(3,0) = 2
If object collision(3,0) = 2
`play sound 1
bvx#=bvx#*-1
bx#=150
co#=by#-cy#
bvy#=bvy#-co#*0.15
Endif
if bvy#>15.0 then bvy#=15.0
if bvy#<-15.0 then bvy#=-15.0
`new ball position
position object 3,bx#,by#,100
position object 300,bx#,-by#+300,100
position object 301,bx#,-by#-300,100
`computer paddle A.I.
`return to middle
if bvx#<0
if cy#>2 then a#=-cv#
if cy#<2 then a#=cv#
if cy#<=2 and cy#>=-2 then a#=0
cy#=cy#+a#
endif
`move towards ball
if bvx#>0
if by#>cy# then a#=cv#
if by#<cy# then a#=-cv#
cy#=cy#+a#
endif
position object 2,180,cy#,100
position object 304,180,-cy#+300,100
position object 305,180,-cy#-300,100
`win or lose
if object position x(3) < -250
cscore=cscore+1
vb#=vb#*-1
goto restart
endif
if object position x(3) > 250
pscore = pscore +1
goto restart
endif
`print score
text screen width()/2-20,screen height()/2-12,str$(pscore)+" : "+str$(cscore)
`goto next level, increase difficulty and reset scores
if pscore>2
crntmscspd#=crntmscspd#+10
bv#=bv#+0.5
pv#=pv#+0.3
cv#=cv#+0.5
level=level+1
pscore=0
cscore=0
` set music speed 2,crntmscspd#
goto restart
endif
`display level
text screen width()/2-40,screen height()/2-100,"Level "+str$(level)
`game over text
if cscore>2
goto highscore
endif
if inkey$()="q" or inkey$()="Q"
level=0
cscore=0
for x=1 to 1000
if object exist(x) then delete object x
if image exist(x) then delete image x
next x
if sound exist(1) then delete sound 1
if sound exist(2) then delete sound 2
if music exist(1) then delete music 1
show mouse
ink 0,0
cls
goto Menu
endif
if level>4 and level<11
`scroll textures
scroll object texture 1000,0,-0.014
scroll object texture 4,0,0.08
scroll object texture 5,0,0.08
if clockwise=1 then roll camera right 0.1
if camera angle z()>30 then clockwise=0:turn camera left 0.1
if clockwise=0 then roll camera left 0.1
if camera angle z()<-30 then clockwise=1:turn camera right 0.1
else
`scroll textures
scroll object texture 1000,0,-0.004
scroll object texture 4,0,0.004
scroll object texture 5,0,0.004
endif
if level>10 and level<16
`scroll textures
scroll object texture 1000,0,-0.028
scroll object texture 4,0,0.16
scroll object texture 5,0,0.16
if clockwise=1 then roll camera right 0.2
if camera angle z()>30 then clockwise=0:turn camera left 0.2
if clockwise=0 then roll camera left 0.2
if camera angle z()<-30 then clockwise=1:turn camera right 0.2
endif
if level>14 and level<21
`scroll textures
scroll object texture 1000,0,-0.042
scroll object texture 4,0,0.24
scroll object texture 5,0,0.24
if clockwise=1 then roll camera right 0.3
if camera angle z()>30 then clockwise=0:turn camera left 0.3
if clockwise=0 then roll camera left 0.3
if camera angle z()<-30 then clockwise=1:turn camera right 0.3
endif
If here1=1
If level=3
set text font "sf automaton_mod"
ink rgb(0,0,255),0
set text size 25
do
text screen width()/2-300,200,"You have beat 1st opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here1=0
goto make
endif
endif
If here2=1
If level=5
set text font "sf automaton_mod"
ink rgb(255,0,0),0
set text size 25
do
text screen width()/2-300,200,"You have beat 2nd opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here2=0
goto make
endif
endif
If here3=1
If level=7
set text font "sf automaton_mod"
ink rgb(0,255,0),0
set text size 25
do
text screen width()/2-300,200,"You have beat 3rd opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here3=0
goto make
endif
endif
If here4=1
If level=9
set text font "sf automaton_mod"
ink rgb(255,0,255),0
set text size 25
do
text screen width()/2-300,200,"You have beat 4th opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here4=0
goto make
endif
endif
If here5=1
If level=11
set text font "sf automaton_mod"
ink rgb(255,110,11),0
set text size 25
do
text screen width()/2-300,200,"You have beat 5th opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here5=0
goto make
endif
endif
If here6=1
If level=13
set text font "sf automaton_mod"
ink rgb(45,223,255),0
set text size 25
do
text screen width()/2-300,200,"You have beat 6th opponent would you like to continue? [Y]es [N]o"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here6=0
goto make
endif
endif
If here7=1
If level=15
set text font "sf automaton_mod"
ink rgb(255,255,255),0
set text size 25
do
text screen width()/2-300,200,"You have beat 7th opponent would you like to continue? [Y]es [N]o"
text screen width()/2-150,200,"<<This is your last opponent>>"
if inkey$()="n" then end
if inkey$()="y" then exit
if inkey$()="N" then end
if inkey$()="Y" then exit
sync
loop
for x = 1 to 1000
if object exist(x) then delete object x
next x
here7=0
goto make
endif
endif
sync
loop
highscore:
for p=0 to 9
if level>sco_score(p) or level=sco_score(p)`if score higher or the same
high_score=p+1 `important counter for the writing of the high score list
gotscore=1
entry=1
clear entry buffer
exit
endif
next p
if gotscore=0
gotscore=2
endif
If gotscore=1
Ink RGB(255,140,243),0
repeat
text screen width()/2-100,screen height()/2-60,"ENTER HIGH SCORE"
new$=entry$()
for n=1 to len(new$)
if asc (mid$(new$,n))=8
line$=left$(line$,len(line$)-1) ` backspace in score entry
else
if len(line$)<10 then line$=line$+mid$(new$,n) `limit letters in entry to 9
endif
next n
clear entry buffer
center text screen width()/2,screen height()/2,line$ `displays what you enter
sync
until returnkey()=1
for b=9 to high_score-1 step -1
if b-1>0 or b-1=0`-----------action if array exist
sco_name$(b)=sco_name$(b-1)
sco_score(b)=sco_score(b-1)
endif
next b
sco_name$(high_score-1)=line$
sco_score(high_score-1)=level
high_score=0
`--------------------save score board to file
if file exist("scores.dat") then delete file "scores.dat"
open to write 1,"scores.dat"
for k=0 to 9
write string 1,sco_name$(k)
write file 1,sco_score(k)
next k
close file 1
level=0
cscore=0
sync
for x=1 to 1000
if object exist(x) then delete object x
if image exist(x) then delete image x
next x
if sound exist(1) then stop sound 1
if sound exist(2) then stop sound 2
if music exist(1) then stop music 1
if music exist(2) then stop music 2
if music exist(2) then set music speed 2,100
show mouse
ink 0,0
cls
goto Menu
endif
If gotscore=2
set text font "sf automaton_mod"
ink rgb(0,200,0),0
Set text size 42
text screen width()/2-100,screen height()/2+200,"Game Over"
Set text size 22
text screen width()/2-130,screen height()/2+250,"(Press Any Key To Continue)"
sync
wait key
sync
ink rgb(0,0,255),0
level=0
cscore=0
for x=1 to 100
if object exist(x) then delete object x
if image exist(x) then delete image x
next x
if sound exist(1) then stop sound 1
if sound exist(2) then stop sound 2
if music exist(1) then stop music 1
if music exist(2) then stop music 2
if music exist(2) then set music speed 2,100
show mouse
ink 0,0
cls
Ink RGB(255,255,255),0
goto Menu
Endif
function over(but,x1,y1,x2,y2)
if mousex()>x1 and mousex()<X2
if mousey()>y1 and mousey()<Y2
over_area=1
endif
endif
endfunction over_area
function buttons()
if image exist(1)=0 then load image "button.bmp",1
if image exist(2)=0 then load image "buttonover.bmp",2
if over(1,screen width()/2-70,screen height()/2-200,screen width()/2+84,screen height()/2-158)=1
if mouseclick()=1
sync on
sync rate 50
autocam off
hide light 0
color backdrop rgb(0,0,0)
set ambient light 80
if light exist(1)=0 then make light 1
position light 1,100,100,20
set light range 1,100000
color light 1,rgb(255,220,180)
`stop music 1
`loop music 2
fog on
fog color 0
fog distance 850
hide mouse
goto make
endif
paste image 2,screen width()/2-70,screen height()/2-200
Ink 0,0
text screen width()/2-50,screen height()/2-195,"New Game"
else
paste image 1,screen width()/2-70,screen height()/2-200
Ink RGB(255,255,255),0
text screen width()/2-50,screen height()/2-195,"New Game"
endif
if over(1,screen width()/2-70,screen height()/2-150,screen width()/2+84,screen height()/2-108)=1
if mouseclick()=1 then scores()
paste image 2,screen width()/2-70,screen height()/2-150
Ink 0,0
text screen width()/2-50,screen height()/2-145,"Highscores"
else
paste image 1,screen width()/2-70,screen height()/2-150
Ink RGB(255,255,255),0
text screen width()/2-50,screen height()/2-145,"Highscores"
endif
if over(1,screen width()/2-70,screen height()/2-100,screen width()/2+84,screen height()/2-58)=1
if mouseclick()=1 then credits()
paste image 2,screen width()/2-70,screen height()/2-100
Ink 0,0
text screen width()/2-50,screen height()/2-95,"Credits"
else
paste image 1,screen width()/2-70,screen height()/2-100
Ink RGB(255,255,255),0
text screen width()/2-50,screen height()/2-95,"Credits"
endif
if over(1,screen width()/2-70,screen height()/2-50,screen width()/2+84,screen height()/2-8)=1
paste image 2,screen width()/2-70,screen height()/2-50
if mouseclick()=1
exit prompt " Thanks For Playing","Tsunami Entertainment -- horlocker@yahoo.com"
end
endif
Ink 0,0
text screen width()/2-50,screen height()/2-45,"Exit"
else
paste image 1,screen width()/2-70,screen height()/2-50
Ink RGB(255,255,255),0
text screen width()/2-50,screen height()/2-45,"Exit"
endif
endfunction
Function background()
ink rgb(0,0,196),0
random# = rnd(1024)
random2# = rnd(768)
line random#,random#,random#+1,random2#
set text font "sf automaton_mod"
set text size 28
endfunction
Function initscores()
if file exist("scores.dat")=0
sco_name$(0)="Nick"
sco_score(0)=10
sco_name$(1)="Tera"
sco_score(1)=9
sco_name$(2)="The Queen"
sco_score(2)=8
sco_name$(3)="Pat"
sco_score(3)=7
sco_name$(4)="Thomas"
sco_score(4)=6
sco_name$(5)="Cody"
sco_score(5)=5
sco_name$(6)="Josh"
sco_score(6)=4
sco_name$(7)="Justin"
sco_score(7)=3
sco_name$(8)="Holly"
sco_score(8)=2
sco_name$(9)="James"
sco_score(9)=1
endif
if file exist("scores.dat")>0
open to read 1,"scores.dat"
for a=0 to 9
read string 1,sco_name$(a)
read file 1,sco_score(a)
next a
close file 1
endif
Endfunction
Function scores()
x=370
y=580
y2=380
crntcolor#=0
ink 0,0
box x,y2,x+370,y+10
ink rgb(248,217,1),0
y=380
for a=0 to 9
if a<9 then text x,y,"0"+str$(a+1)+". "+sco_name$(a)
if a<9 then text x+200,y,"................."+str$(sco_score(a))
if a=9 then text x,y,str$(a+1)+". "+sco_name$(a)
if a=9 then text x+200,y,"................."+str$(sco_score(a))
inc y,20
next a
set text font "sf automaton_mod"
sync
Endfunction
Function credits()
ink 0,0
box 370,380,740,590
ink rgb(248,217,1),0
center text 550,380,"[Producer]"
center text 550,410,"Nicholas"
center text 550,440,"[Special Thanks To]"
center text 550,470,"Ric"
center text 550,500,"[And]"
center text 550,530,"www.thegamecreators.com"
Endfunction
Function character()
if file exist("chara.dat")=0
Ink RGB(0,0,255),0
repeat
text screen width()/2-100,screen height()/2-60,"ENTER YOUR NAME!"
new$=entry$()
for n=1 to len(new$)
if asc (mid$(new$,n))=8
line$=left$(line$,len(line$)-1) ` backspace in score entry
else
if len(line$)<11 then line$=line$+mid$(new$,n) `limit letters in entry to 9
endif
next n
clear entry buffer
center text screen width()/2,screen height()/2,line$ `displays what you enter
sync
until returnkey()=1
user_name$(1)=line$
user_paddle(1)=paddle
if file exist("chara.dat") then delete file "chara.dat"
open to write 2,"chara.dat"
for k=0 to 5
write string 2,user_name$(k)
write file 2,user_paddle(k)
next k
close file 1
if file exist("chara.dat")>0
open to read 2,"chara.dat"
for x=0 to 9
read string 2,user_name$(x)
read file 2,user_paddle(x)
next x
close file 2
Endfunction
hope you can help
Thx for all the help Ric,
Kimo Sabi
I must say I am quite a »»ç¶´¬¬Géñíú§¬¬´¶««