Yes I can. I will look for one.
rem ******** Legal information ********
rem *Name: Snakey 3d *
rem *Internal name: S3d Main Source *
rem *Version: 1.0 *
rem *Date started: 1 April 2003 *
rem *Date finished: 5 April 2003 *
rem *Company: CuSo Interactive *
rem *Language: English *
rem *Requires DirectX 7.0 to run *
rem *This information is the same with*
rem *all other language versions. *
rem * *
rem *This game is made for the Retro *
rem *competition on DBPro.com. *
rem ****** Legal information end ******
rem Initialisation
load music "music.mp3",1
loop music 1
set display mode 800,600,32
dim objects#(200,6)
dim highscore$(10,2)
init:
set camera view 0,0,1,1
for a=1 to 31000
if object exist(a) then delete object a
next a
disable escapekey
cls
for a=1 to 10
highscore$(a,1)=""
highscore$(a,2)=""
next a
open to read 1,"highscore.txt"
for a=1 to 10
read string 1,highscore$(a,1)
read string 1,highscore$(a,2)
next a
close file 1
for a=1 to 10
bc=len(highscore$(a,1))
if bc>17
highscore$(a,1)=left$(highscore$(a,1),17)
bc=17
endif
bc=26-bc
for c=1 to bc
highscore$(a,1)=highscore$(a,1)+" "
next c
highscore$(a,1)=highscore$(a,1)+highscore$(a,2)
number$=highscore$(a,1)
set text font "Lucida Console"
Set text size 14
Set text to bold
tw = text width(number$)
th = text height("A")
create bitmap a, tw, th
text 0, 0, number$
get image a, 0, 0, tw, th
delete bitmap a
next a
load image "menu.bmp",11
sprite 11,0,0,11
set sprite 11,0,1
for a=1 to 10
sprite a,270,70+(a*30),a
set sprite a,0,1
next a
do
if mousex()>40 and mousey()>490 and mousex()<400 and mousey()<566 and mouseclick()>0 then goto ahead
if mousex()>425 and mousey()>490 and mousex()<790 and mousey()<566 and mouseclick()>0
delete music 1
end
endif
sync
loop
ahead:
for a=1 to 10
delete image a
delete sprite a
next a
delete image 11
delete sprite 11
randomize timer()
disable escapekey
sync on
load image "out.bmp",1
make object plain 30001,440,220
make object plain 30002,440,220
make object plain 30003,220,440
make object plain 30004,220,440
make object plain 30005,440,440
make object plain 30006,440,440
rotate object 30001,90,0,0
rotate object 30002,90,0,0
rotate object 30003,0,90,0
rotate object 30004,0,90,0
rotate object 30005,0,0,180
rotate object 30006,0,0,180
position object 30001,0,-200,0
position object 30002,0,200,0
position object 30003,-200,0,0
position object 30004,200,0,0
position object 30005,0,0,-100
position object 30006,0,0,100
texture object 30001,1
texture object 30002,1
texture object 30003,1
texture object 30004,1
texture object 30005,1
texture object 30006,1
load image "card1.bmp",2
load image "card2.bmp",3
load image "card3.bmp",4
make object box 30007,100,3,50
rotate object 30007,90,90,90
position object 30007,-100,50,50
texture object 30007,int(rnd(2)+2)
make object box 30008,100,3,50
rotate object 30008,90,90,90
position object 30008,100,-50,-50
texture object 30008,int(rnd(2)+2)
make object box 30009,100,3,50
rotate object 30009,90,90,90
position object 30009,0,-20,-50
texture object 30009,int(rnd(2)+2)
make object box 30010,100,3,50
rotate object 30010,90,90,90
position object 30010,80,-80,50
texture object 30010,int(rnd(2)+2)
make object box 30011,100,3,50
rotate object 30011,90,90,90
position object 30011,100,80,50
texture object 30011,int(rnd(2)+2)
make object box 30012,100,3,50
rotate object 30012,90,90,90
position object 30012,110,120,50
texture object 30012,int(rnd(2)+2)
make object box 30013,100,3,50
rotate object 30013,90,90,90
position object 30013,-110,120,-50
texture object 30013,int(rnd(2)+2)
make object box 30014,100,3,50
rotate object 30014,90,90,90
position object 30014,0,170,-50
texture object 30014,int(rnd(2)+2)
make object box 30015,100,3,50
rotate object 30015,90,90,90
position object 30015,-20,146,50
texture object 30015,int(rnd(2)+2)
make object box 30016,100,3,50
rotate object 30016,90,90,90
position object 30016,120,162,-50
texture object 30016,int(rnd(2)+2)
make object box 30017,100,3,50
rotate object 30017,90,90,90
position object 30017,113,-169,-50
texture object 30017,int(rnd(2)+2)
make object box 30018,100,3,50
rotate object 30018,90,90,90
position object 30018,-123,-152,50
texture object 30018,int(rnd(2)+2)
make object box 30019,100,3,50
rotate object 30019,90,90,90
position object 30019,0,-142,50
texture object 30019,int(rnd(2)+2)
make object box 30020,100,3,50
rotate object 30020,90,90,90
position object 30020,20,-156,-50
texture object 30020,int(rnd(2)+2)
autocam off
load object "front.x",1
rotate object 1,0,90,0
scale object 1,200,200,200
position object 1,0,0,0
set object rotation zyx 1
set object collision to polygons 1
set global collision on
object=1
camera=0
score=0
hide mouse
speed#=1.0
set camera view 0,0,800,600
rem The game
game:
gosub placedot
do
if escapekey()
delete music 1
end
endif
if object collision(1,0)>30000 then goto score
if object collision(1,0)=30000
object=object+1
load object "back.x",object
set object rotation zyx object
scale object object,200,200,200
position object object,objects#(object-1,1),objects#(object-1,2),objects#(object-1,3)
rotate object object,objects#(object-1,4),objects#(object-1,5),objects#(object-1,6)
move object object,10
gosub placedot
speed#=speed#+0.1
score=score+1
endif
if object collision(1,0)>4 and object collision(1,0)<400 then goto score
if object angle x(1)<=90 or object angle x(1)=>270
rotate object 1,wrapvalue(object angle x(1)+mousemovey()),wrapvalue(object angle y(1)+mousemovex()),wrapvalue(object angle z(1))
endif
if object angle x(1)>=90 and object angle x(1)=<270
rotate object 1,wrapvalue(object angle x(1)+mousemovey()),wrapvalue(object angle y(1)-mousemovex()),wrapvalue(object angle z(1))
endif
move object 1,speed#
posx#=object position x(1)
posy#=object position y(1)
posz#=object position z(1)
if inkey$()="c" and ckey=0
camera=camera+1
ckey=1
endif
if inkey$()<>"c" then ckey=0
if camera=2 then camera=0
if camera=0
position camera posx#,posy#,posz#
rotate camera object angle x(1),object angle y(1),object angle z(1)
move camera -10
xrotate camera wrapvalue(camera angle x()-90)
move camera 10
xrotate camera wrapvalue(camera angle x()+90)
move camera -20
endif
if camera=1
position camera 96,96,96
point camera posx#,posy#,posz#
endif
for a=object to 2 step -1
point object a,objects#(a-1,1),objects#(a-1,2),objects#(a-1,3)
move object a,abs(objects#(a-1,1)-objects#(a,1))*(speed#/10)
move object a,abs(objects#(a-1,2)-objects#(a,2))*(speed#/10)
move object a,abs(objects#(a-1,3)-objects#(a,3))*(speed#/10)
next a
for a=1 to object
objects#(a,1)=object position x(a)
objects#(a,2)=object position y(a)
objects#(a,3)=object position z(a)
objects#(a,4)=object angle x(a)
objects#(a,5)=object angle y(a)
objects#(a,6)=object angle z(a)
next a
if camera position x()>198 then position camera 198,camera position y(),camera position z()
if camera position y()>198 then position camera camera position x(),198,camera position z()
if camera position z()>98 then position camera camera position x(),camera position y(),98
if camera position x()<-198 then position camera -198,camera position y(),camera position z()
if camera position y()<-198 then position camera camera position x(),-198,camera position z()
if camera position z()<-98 then position camera camera position x(),camera position y(),-98
sync
loop
rem Placing the dot
placedot:
if object exist(2)=0
load object "dot.x",30000
scale object 30000,200,200,200
endif
x=int(rnd(380))
y=int(rnd(380))
z=int(rnd(180))
x=-190+x
y=-190+y
z=-90+z
position object 30000,x,y,z
if object collision(30000,0)=0 then return
goto placedot
rem Making score
score:
delete image 1
delete image 2
delete image 3
delete image 4
show mouse
cls
set camera view 0,0,1,1
for a=1 to 10
if score>val(highscore$(a,2))
load image "score.bmp",11
sprite 11,0,0,11
set sprite 11,0,1
number$=str$(score)
set text font "Lucida Console"
Set text size 18
Set text to bold
tw = text width(number$)
th = text height("A")
create bitmap 1, tw, th
text 0, 0, number$
get image 1, 0, 0, tw, th
delete bitmap 1
number$=str$(a)
set text font "Lucida Console"
Set text size 18
Set text to bold
tw = text width(number$)
th = text height("A")
create bitmap 2, tw, th
text 0, 0, number$
get image 2, 0, 0, tw, th
delete bitmap 2
sprite 1,405,179,1
set sprite 1,0,1
sprite 2,517,215,2
set sprite 2,0,1
open to read 1,"highscore.txt"
for d=1 to 10
read string 1,highscore$(d,1)
read string 1,highscore$(d,2)
next d
close file 1
do
if asc(inkey$())<>8 and asc(inkey$())<>13 and keya=0
name$=name$+inkey$()
keya=1
endif
if asc(inkey$())=8 and keya=0
name$=left$(name$,len(name$)-1)
keya=1
endif
if asc(inkey$())=13 and keya=0
goto aheadd
keya=1
endif
if inkey$()="" then keya=0
number$=name$
set text font "Lucida Console"
Set text size 22
Set text to bold
tw = text width(number$)
if name$="" then tw=2
th = text height("A")
create bitmap 3, tw, th
text 0, 0, number$
get image 3, 0, 0, tw, th
delete bitmap 3
sprite 3,160,420,3
set sprite 3,0,1
sync
loop
aheadd:
for s=10 to a+1 step -1
highscore$(s,1)=highscore$(s-1,1)
highscore$(s,2)=highscore$(s-1,2)
next s
highscore$(a,1)=name$
highscore$(a,2)=str$(score)
delete file "highscore.txt"
open to write 1,"highscore.txt"
for a=1 to 10
write string 1,highscore$(a,1)
write string 1,highscore$(a,2)
next a
close file 1
delete image 11
delete sprite 11
delete image 1
delete image 2
delete sprite 1
delete sprite 2
delete image 3
delete sprite 3
goto init
endif
next a
goto init
Here is full source of my snakey game. It's late here 5:20 AM so I'm not able now to look but you will be able to find it in this code I think.
Oneother thing, you should have a file called highscore.txt, with the following content:
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
Noscore
0
EDIT: If you want the game to work you need the objects, music and textures. Just download my game from www.cuso.tk and place this source in the snakey folder.