OK thank you very much.
about the texture.
`sync ect.
Sync On : Sync Rate 0
backcolor=rgb(80,20,10)
backdrop on
color backdrop backcolor
cls
Load image "wall.jpg",10
mapsize=512
dim map$(mapsize,mapsize)
maxcubes=16
cubesize=200
collisionstep=int(cubesize/10)
`menu (load game = unfinished
Do
if Button(20,55,"New Game")=1 then Goto New_Game
Button(20,95,"Load Game")
If Button(20,135,"Exit")=1 then End
sync
loop
`make objects/texture
New_Game:
cls
Repeat
Text 240,220,"Get Ready to Play";
sync
Until scancode()>0
make object box 1,4,3,5
make object box 2,4,3,20
make matrix 1,200,200,5,5
texture object 2,10
Position Matrix 1,-100,0,-100
movespeed = 75
turnspeed = 87.5
time=timer()
`move keys
Do
gameTime=timer()-time
MSframe#=gameTime*(movespeed/1000.0)
TSframe#=gameTime*(turnspeed/1000.0)
If Upkey()=1
Move Object 1,MSframe#
endif
If Downkey()=1
Move Object 1,-MSframe#
endif
If Leftkey()=1
Dec a#,TSframe#
endif
If Rightkey()=1
Inc a#,TSframe#
endif
yrotate object 1,a#
`camera
posx#=cos(270-a#) * 30 + object position x(1)
posz#=sin(270-a#) * 30 + object position z(1)
Position Camera posx#,object position y(1)+6,posz#
Point Camera object position x(1),object position y(1)+6,object position z(1)
time=timer()
sync
Loop
end
function Button(x1,y1,WORDS$)
Pressed=0
x2=Text Width(WORDS$)
y2=Text Height(WORDS$)
if mousex()>x1 and mousex()<x1+x2
if mousey()>y1-y2 and mousey()<y1+y2
Pressed=1
endif
endif
if pressed=1 then ink rgb(255,0,0),0 else ink rgb(255,255,255),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,WORDS$
endfunction pressed
-edit- i also added the collision thing to when you collision between to objects it moves it backwards .2 this way it is like a wall. but the problem is, is if you go backward throgh it you can go through the wall? is there a different type of collision you can do or what do i change to fix it... plz help!
-2nd edit- ok well i fixed the backward thing i put a box inside the box but the second box if they got a tiny bit insid the other box it would push them .35 so this means they would have to be goping backwards to go in and then it will push them forward (even thoigh ur actually staying there)
-Ants95