More FULL game tuts, like warcraft and other popular games
if u do help me, can u explain the code so I can learn and teach myslef as I did with flash?
i luv u all.
if map$(int(curposx),int(curposz))="#" or
set display mode 800,600,16
sync on
sync rate 0
hide mouse
backcolor=rgb(0,0,0)
backdrop on
color backdrop backcolor
cls
mapsize=512
dim map$(mapsize,mapsize)
maxcubes=16
cubesize=200
collisionstep=int(cubesize/10)
fog on
fog color backcolor
fog distance (int(maxcubes)*cubesize)
set camera range 1,(maxcubes*cubesize)
function loadmap(filename$,size)
open to read 1,filename$
for y=1 to size
for x=1 to size
read byte 1,tmp
map$(x,y)=chr$(tmp)
next x
next y
close file 1
endfunction
loadmap("Dungeon/media/mymap.map", mapsize)
load image "Dungeon/media/wall2.jpg",1
load image "Dungeon/media/ground.jpg",2
load image "Dungeon/media/wall.jpg",3
load music "Dungeon/media/forest_temple.mp3",1
play music 1
loop music 1
` Wall
for i=1 to maxcubes*maxcubes
make object cube 100+i,cubesize
texture object 100+i,1
next i
` Floor
for i=1 to maxcubes*maxcubes
make object plain 10000+i,cubesize,cubesize
rotate object 10000+i,90,0,0
texture object 10000+i,2
next i
` Ceiling
for i=1 to maxcubes*maxcubes
make object plain 20000+i,cubesize,cubesize
rotate object 20000+i,270,0,0
texture object 20000+i,3
next i
set ambient light 30
make light 1
make light 2
set point light 1,0,0,0
set spot light 2,45,90
color light 2,RGB(252,216,141)
color light 1,RGB(236,182,100)
color light 0,RGB(0,0,0)
for z=1 to mapsize
for x=1 to mapsize
if map$(x,z)="O"
cx=x*cubesize
cz=z*cubesize
endif
next x
next z
position camera cx,0,cz
oldpositionx#=camera position x()
oldpositionz#=camera position z()
if mouseclick()=1 then move camera maxcubes
if mouseclick()=2 then move camera maxcubes*(-1)
ry#=wrapvalue(ry#+mousemovex())
rotate camera 0,ry#,0
cx#=int(camera position x()/cubesize)-int(maxcubes/2)
cz#=int(camera position z()/cubesize)-int(maxcubes/2)
tx#=camera position x()
tz#=camera position z()
zzz=0
for zz=1 to maxcubes
for xx=1 to maxcubes
zzz=zzz+1
curposx=int(cx#)+xx
curposz=int(cz#)+zz
if curposx<=1 then curposx=1
if curposx>=mapsize then curposx=mapsize
if curposz<=1 then curposz=1
if curposz>=mapsize then curposz=mapsize
for zz=1 to maxcubes
for xx=1 to maxcubes
zzz=zzz+1
curposx=int(cx#)+xx
curposz=int(cz#)+zz
if curposx<=1 then curposx=1
if curposx>=mapsize then curposx=mapsize
if curposz<=1 then curposz=1
if curposz>=mapsize then curposz=mapsize
` Wand
if map$(int(curposx),int(curposz))="#" or
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
else
hide object 100+zzz
endif
` Boden
if map$(int(curposx),int(curposz))=":" or
map$(int(curposx),int(curposz))="D" or
map$(int(curposx),int(curposz))="S" or
map$(int(curposx),int(curposz))="T" or
show object 10000+zzz
position object 10000+zzz,curposx*cubesize,(cubesize/2)*(-
1),curposz*cubesize
else
hide object 10000+zzz
endif
` Decke
if map$(int(curposx),int(curposz))=":" or
map$(int(curposx),int(curposz))="D" or
map$(int(curposx),int(curposz))="S" or
map$(int(curposx),int(curposz))="T"
show object 20000+zzz
position object
20000+zzz,curposx*cubesize,(cubesize/2),curposz*cubesize
else
hide object 20000+zzz
endif
next xx#
next yy#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Wall
if map$(int(curposx),int(curposz))="#" or
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Collision detection
if map$(int(curposx),int(curposz))="#"
if tx#>=((curposx*cubesize)-(cubesize/2))-collisionstep and
tx#<=((curposx*cubesize)+(cubesize/2))+collisionstep and
tz#>=((curposz*cubesize)-(cubesize/2))-collisionstep and
tz#<=((curposz*cubesize)+(cubesize/2))+collisionstep
position camera oldpositionx#,camera position
y(),oldpositionz#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
endif
endif
else
hide object 100+zzz
endif
position light 1,camera position x(),camera position y(),camera
position z()
position light 2,camera position x(),camera position y(),camera
position z()
color light 1,RGB(200+int(rnd(50)-25),120,60)
rotate light 2,camera angle x(),camera angle y(),camera angle z()
"Could not determine paramenter type of '"#" or '
(P.S. I didn't mean.....anything....when I said.....I luv u all....)
It's because you have an empty "or" statement, you say "or", then don't say what the or is. Either delete the "or" or add something to it .
if a = 1 ...
or b = 2
print a + b
endif
if a = 1 or ...
b = 2
print a + b
endif
set display mode 800,600,16
sync on
sync rate 0
hide mouse
backcolor=rgb(0,0,0)
backdrop on
color backdrop backcolor
cls
mapsize=512
dim map$(mapsize,mapsize)
maxcubes=16
cubesize=200
collisionstep=int(cubesize/10)
fog on
fog color backcolor
fog distance (int(maxcubes)*cubesize)
set camera range 1,(maxcubes*cubesize)
function loadmap(filename$,size)
open to read 1,filename$
for y=1 to size
for x=1 to size
read byte 1,tmp
map$(x,y)=chr$(tmp)
next x
next y
close file 1
endfunction
loadmap("media/mymap.map", mapsize)
load image "media/wall2.jpg",1
load image "media/ground.jpg",2
load image "media/wall.jpg",3
load music "media/forest_temple.mp3",1
play music 1
loop music 1
` Wall
for i=1 to maxcubes*maxcubes
make object cube 100+i,cubesize
texture object 100+i,1
next i
` Floor
for i=1 to maxcubes*maxcubes
make object plain 10000+i,cubesize,cubesize
rotate object 10000+i,90,0,0
texture object 10000+i,2
next i
` Ceiling
for i=1 to maxcubes*maxcubes
make object plain 20000+i,cubesize,cubesize
rotate object 20000+i,270,0,0
texture object 20000+i,3
next i
set ambient light 30
make light 1
make light 2
set point light 1,0,0,0
set spot light 2,45,90
color light 2,RGB(252,216,141)
color light 1,RGB(236,182,100)
color light 0,RGB(0,0,0)
for z=1 to mapsize
for x=1 to mapsize
if map$(x,z)="O"
cx=x*cubesize
cz=z*cubesize
endif
next x
next z
position camera cx,0,cz
oldpositionx#=camera position x()
oldpositionz#=camera position z()
if mouseclick()=1 then move camera maxcubes
if mouseclick()=2 then move camera maxcubes*(-1)
ry#=wrapvalue(ry#+mousemovex())
rotate camera 0,ry#,0
cx#=int(camera position x()/cubesize)-int(maxcubes/2)
cz#=int(camera position z()/cubesize)-int(maxcubes/2)
tx#=camera position x()
tz#=camera position z()
zzz=0
for zz=1 to maxcubes
for xx=1 to maxcubes
zzz=zzz+1
curposx=int(cx#)+xx
curposz=int(cz#)+zz
if curposx<=1 then curposx=1
if curposx>=mapsize then curposx=mapsize
if curposz<=1 then curposz=1
if curposz>=mapsize then curposz=mapsize
` Wand
if map$(int(curposx),int(curposz))="#"
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
else
hide object 100+zzz
endif
` Boden
if map$(int(curposx),int(curposz))=":"
map$(int(curposx),int(curposz))="D"
map$(int(curposx),int(curposz))="S"
map$(int(curposx),int(curposz))="T"
show object 10000+zzz
position object 10000+zzz,curposx*cubesize,(cubesize/2)*(-1),curposz*cubesize
else
hide object 10000+zzz
endif
` Decke
if map$(int(curposx),int(curposz))=":"
map$(int(curposx),int(curposz))="D"
map$(int(curposx),int(curposz))="S"
map$(int(curposx),int(curposz))="T"
show object 20000+zzz
position object 20000+zzz,curposx*cubesize,(cubesize/2),curposz*cubesize
else
hide object 20000+zzz
endif
next xx#
next yy#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Wall
if map$(int(curposx),int(curposz))="#"
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Collision detection
if map$(int(curposx),int(curposz))="#"
if tx#>=((curposx*cubesize)-(cubesize/2))-collisionstep and tx#<=((curposx*cubesize)+(cubesize/2))+collisionstep and tz#>=((curposz*cubesize)-(cubesize/2))-collisionstep and tz#<=((curposz*cubesize)+(cubesize/2))+collisionstep
position camera oldpositionx#,camera position y(),oldpositionz#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
endif
endif
else
hide object 100+zzz
endif
position light 1,camera position x(),camera position y(),camera position z()
position light 2,camera position x(),camera position y(),camera position z()
color light 1,RGB(200+int(rnd(50)-25),120,60)
rotate light 2,camera angle x(),camera angle y(),camera angle z()
set display mode 800,600,16
sync on
sync rate 0
hide mouse
backcolor=rgb(0,0,0)
backdrop on
color backdrop backcolor
cls
mapsize=512
dim map$(mapsize,mapsize)
maxcubes=16
cubesize=200
collisionstep=int(cubesize/10)
fog on
fog color backcolor
fog distance (int(maxcubes)*cubesize)
set camera range 1,(maxcubes*cubesize)
function loadmap(filename$,size)
open to read 1,filename$
for y=1 to size
for x=1 to size
read byte 1,tmp
map$(x,y)=chr$(tmp)
next x
next y
close file 1
endfunction
loadmap("Dungeon/media/mymap.map", mapsize)
load image "Dungeon/media/wall2.jpg",1
load image "Dungeon/media/ground.jpg",2
load image "Dungeon/media/wall.jpg",3
load music "Dungeon/media/forest_temple.mp3",1
play music 1
loop music 1
` Wall
for i=1 to maxcubes*maxcubes
make object cube 100+i,cubesize
texture object 100+i,1
next i
` Floor
for i=1 to maxcubes*maxcubes
make object plain 10000+i,cubesize,cubesize
rotate object 10000+i,90,0,0
texture object 10000+i,2
next i
` Ceiling
for i=1 to maxcubes*maxcubes
make object plain 20000+i,cubesize,cubesize
rotate object 20000+i,270,0,0
texture object 20000+i,3
next i
set ambient light 30
make light 1
make light 2
set point light 1,0,0,0
set spot light 2,45,90
color light 2,RGB(252,216,141)
color light 1,RGB(236,182,100)
color light 0,RGB(0,0,0)
for z=1 to mapsize
for x=1 to mapsize
if map$(x,z)="O"
cx=x*cubesize
cz=z*cubesize
endif
next x
next z
position camera cx,0,cz
oldpositionx#=camera position x()
oldpositionz#=camera position z()
if mouseclick()=1 then move camera maxcubes
if mouseclick()=2 then move camera maxcubes*(-1)
ry#=wrapvalue(ry#+mousemovex())
rotate camera 0,ry#,0
cx#=int(camera position x()/cubesize)-int(maxcubes/2)
cz#=int(camera position z()/cubesize)-int(maxcubes/2)
tx#=camera position x()
tz#=camera position z()
zzz=0
for zz=1 to maxcubes
for xx=1 to maxcubes
zzz=zzz+1
curposx=int(cx#)+xx
curposz=int(cz#)+zz
if curposx<=1 then curposx=1
if curposx>=mapsize then curposx=mapsize
if curposz<=1 then curposz=1
if curposz>=mapsize then curposz=mapsize
for zz=1 to maxcubes
for xx=1 to maxcubes
zzz=zzz+1
curposx=int(cx#)+xx
curposz=int(cz#)+zz
if curposx<=1 then curposx=1
if curposx>=mapsize then curposx=mapsize
if curposz<=1 then curposz=1
if curposz>=mapsize then curposz=mapsize
` Wand
if map$(int(curposx),int(curposz))="#" or
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
else
hide object 100+zzz
endif
` Boden
if map$(int(curposx),int(curposz))=":" or
map$(int(curposx),int(curposz))="D" or
map$(int(curposx),int(curposz))="S" or
map$(int(curposx),int(curposz))="T" or
show object 10000+zzz
position object 10000+zzz,curposx*cubesize,(cubesize/2)*(-
1),curposz*cubesize
else
hide object 10000+zzz
endif
` Decke
if map$(int(curposx),int(curposz))=":" or
map$(int(curposx),int(curposz))="D" or
map$(int(curposx),int(curposz))="S" or
map$(int(curposx),int(curposz))="T"
show object 20000+zzz
position object
20000+zzz,curposx*cubesize,(cubesize/2),curposz*cubesize
else
hide object 20000+zzz
endif
next xx#
next yy#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Wall
if map$(int(curposx),int(curposz))="#" or
map$(int(curposx),int(curposz))="S"
show object 100+zzz
position object 100+zzz,curposx*cubesize,0.0,curposz*cubesize
` Collision detection
if map$(int(curposx),int(curposz))="#"
if tx#>=((curposx*cubesize)-(cubesize/2))-collisionstep and
tx#<=((curposx*cubesize)+(cubesize/2))+collisionstep and
tz#>=((curposz*cubesize)-(cubesize/2))-collisionstep and
tz#<=((curposz*cubesize)+(cubesize/2))+collisionstep
position camera oldpositionx#,camera position
y(),oldpositionz#
oldpositionx#=camera position x()
oldpositionz#=camera position z()
endif
endif
else
hide object 100+zzz
endif
position light 1,camera position x(),camera position y(),camera
position z()
position light 2,camera position x(),camera position y(),camera
position z()
color light 1,RGB(200+int(rnd(50)-25),120,60)
rotate light 2,camera angle x(),camera angle y(),camera angle z()
function SampleFunc
if bDebug
DebugIn("FunctionNameHere")
endif
...
Do something
...
if bDebug
DebugOut("FunctionNameHere")
endif
endfunction
IN >------->SampleFunction 2007-06-23 23:45:55
IN >-------->UpdateDisplay 2007-06-23 23:45:55
OUT <--------<UpdateDisplay 2007-06-23 23:45:55
OUT <-------<SampleFunction 2007-06-23 23:45:56
Jesus is a ROCKSTAR