Hi, I'm working on a plane game but ever since I started it has been realy laggy and jumpy. I know the plane model isn't to complexe and our computer has run much more complicate games before.
Here is the code if you want to take a look at it...
Load Object "plane.x", 1
position object 1, 0 ,0, 0
yrotate object 1, 180
fix object pivot 1
sync rate 30
do
set cursor 0, 0
print screen fps()
rem Get players positions stored in vars
playerx#=object position x(1)
playery#=object position y(1)
playerz#=object position z(1)
rem Get a new camera position
camerax#=newxvalue(playerx#, object angle x(1), -50)
cameray#=newyvalue(playery#, object angle y(1), -50)
cameraz#=newzvalue(playerz#, object angle z(1), -50)
rem position camera camerax#, cameray#, cameraz#
rem point camera playerx#, playery#, playerz#
position camera -100, -100, -100
point camera playerx#, playery#, playerz#
move object 1, 6
if joystick up()=1 then pitch object down 1, 5
if joystick down()=1 then pitch object up 1, 5
if joystick fire a()=1
set cursor 0, 24
print "Bang"
endif
if joystick left()=1
turn object left 1, 5
endif
if joystick right()=1
turn object right 1, 5
endif
sync
loop
Any ideas as to why it may be lagging would be much appreciated.
Tim
[EDIT]: Almost forgot, I use DBC. Hope to get DBP for Christmas.