I keep getting some real low frame rates, 22fps when still - 8 when moving. below is the code i'm using. The map i made in cart shop 4.0 which only has a few rooms in it.
I've tried running in windowed modes etc.
specs are
amd athlon 2200
512 ram
geforce 5200 (crummy i know)
set display mode 800,600,32
sync on
sync rate 60
autocam off
Set camera range 1,20000
hide mouse
set normalization on
backdrop on
color backdrop RGB(98,98,255)
rem Make normal light
set ambient light 30
rem Make shadow light
make light 1
position light 1,250,100,250
color light 1,225,205,105
set light range 1,10000
fog on : fog distance 50000 : fog color RGB(100,100,100)
rem inilalize player origin
X#=0
Z#=0
Y#=0
rem **************************Your level goes here*****************
load object "mapwip.x",7
position object 7,0,-200,0
scale object 7,100,100,100
set object texture 7,0,1
Set object collision to polygons 7
rem make players wall collision
make object cube 10,70
Set object collision to polygons 10
hide object 10
rem create player ground collision
make object cube 4,65
set object collision to polygons 4
hide object 4
player_speedz1=0
Rem Main loopy loop
Do
set cursor 10,10
print screen fps()
oldcAY# = cAY#
oldcAX# = cAX#
cAY# = WrapValue(cAY#+MousemoveX()*0.2)
cAX# = WrapValue(cAX#+MousemoveY()*0.2)
caZ# = Camera angle Z()
Rem input for the players wall collision
If Upkey()=1
XTest# = Newxvalue(X#,cAY#,20)
ZTest# = Newzvalue(Z#,cAY#,20)
gosub SlidingCollision
else
If Downkey()=1
XTest# = Newxvalue(X#,Wrapvalue(cAY#-180),20)
ZTest# = Newzvalue(Z#,Wrapvalue(cAY#-180),20)
gosub SlidingCollision
Endif
Endif
If Leftkey()=1
XTest# = Newxvalue(X#,Wrapvalue(cAY#-90),20)
ZTest# = Newzvalue(Z#,Wrapvalue(cAY#-90),20)
gosub SlidingCollision
else
If Rightkey()=1
XTest# = Newxvalue(X#,Wrapvalue(cAY#+90),20)
ZTest# = Newzvalue(Z#,Wrapvalue(cAY#+90),20)
gosub SlidingCollision
Endif
Endif
Rem Rotate camera accordint to mouse movement
YRotate camera CurveAngle(cAY#,oldcAY#,24)
XRotate camera CurveAngle(cAX#,oldcAX#,24)
rem position camera at the position of the players sliding sphere
Position Camera X#-25,Object position y(10),Z#
`goto gravity
gosub gravity
Sync
Loop
Rem Heres the magic
SlidingCollision:
position object 10,XTest#,Object position y(10),Z#
if object collision(7,10) = 0 then X# = XTest#
position object 10,X#,Object position y(10),ZTest#
if object collision(7,10) = 0 then Z# = ZTest#
return
Gravity:
rem gravity
position object 4,X#,Object position y(10)-103,Z#
if Object collision(7,4)>0=0
if player_speedz1=>0
player_speedz1=0
endif
player_speedz1=player_speedz1-1
position object 10,Object position x(10),Object position y(10)+player_speedz1,Object position z(10)
endif
position object 4,X#,Object position y(10)-104,Z#
if Object collision(7,4)>0
if player_speedz1=<-0
player_speedz1=0
endif
player_speedz1=player_speedz1+1
position object 10,Object position x(10),Object position y(10)+player_speedz1,Object position z(10)
endif
if player_speedz1=>50
player_speedz1=50
endif
if player_speedz1=<-50
player_speedz1=-50
endif
return
any help would be much appreciatted!