Do not get me wrong, it runs smoothly in a exe (attached), but when I run it in DarkEDIT, it lags when I use certain commands... Here is the code:
#include "DBCcollisions.dba"
Flush Video Memory
cls 0
sync on : Sync Rate 60
set display mode 1280, 960, 32
Backdrop On : Color Backdrop 0
Fog On : Fog Distance 75 : Fog Color 0
Load object "sky08.x", 1 : Scale Object 1, 5000, 5000, 5000 : Position Object 1, 50, -25, 50 : Set Object 1, 1, 1, 1, 0, 0, 0
Load Object "ground.x", 2 : Scale Object 2, 700, 250, 700 : Position Object 2, -10, 0, -10
Make Object Sphere 3, 2 : Position Object 3, -10, 0, -10
SetUpComplexObjectDBC(2, 2, 0)
Do
OldX#=Object Position X(3) : YP#=Object Position Y(3) : OldZ#=Object Position Z(3)
If UpKey()=1
Move Object 3, .2
Endif
If DownKey()=1
Move Object 3, -.2
Endif
If LeftKey()=1
Y#=Y#-.8
Y#=WrapValue(Y#)
YRotate Object 3, Y#
Endif
If RightKey()=1
Y#=Y#+.8
Y#=WrapValue(Y#)
YRotate Object 3, Y#
Endif
X#=Object Position X(3) : Z#=Object Position Z(3)
If X#<>OldX# and Z#<>OldZ#
intersectobjectdbc(2, 1, OldX#, YP#+5, OldZ#, X#, YP#-5, Z#, 1) : YP#=getStaticCollisionY()+1
Endif
Position Object 3, X#, YP#, Z#
Set Camera To Follow X#, YP#, Z#, Y#, 15, YP#+7, 6, 1
Sync
Loop
I can send the source files if needed... (The land image is fairly large due to my plans later, so it is a fairly large file.)
**Edit** Attached is now the file for the dba's and source. Will put .exe back soon.
***Edit*** Ergh! It did not upload right... I need to remake it then and see if I can remake what it was doing...
****Edit**** Heh, it seems it only runs slow on certain computers, but not mine... (Was working on it with my dad's comp.) Problem solved.