Slowing down

Blitz3D Forums/Blitz3D Beginners Area/Slowing down

olo(Posted 2008) [#1]
In my 'game' I have and object that moves randomly on the x axis and z axis. The problem is that when i play the game the object moves really fast and it looks pretty bad.

Does anyone know what i could do?

If the FPS is too high or something please tell me how i could change it as i am new to blitz3d and am not familiar on how to do this.

Thanks all


GfK(Posted 2008) [#2]
Use the timing code from the castle demo (in the Mak folder), or choose some timing code from the code archives and use that.

The other solution is to move the object slower. I.e. try moving it by 0.1 units instead of 1 unit at a time.


olo(Posted 2008) [#3]
here is the code that moves the objects (in main loop). so the "moving it by 0.1 units insted of 1 units at a time" seems simplest..how would i incorporate this here?

For i=0 To 100
MoveEntity spheres(i), Rnd(-0.5,0.5), 0, Rnd(-1.2,1.2)
 
Next



i really have no idea and really appreciate your help

thanks


KillerX(Posted 2008) [#4]
Timer = MilliSecs()
For i=0 To 100
MoveEntity spheres(i), Rnd(-0.5,0.5), 0, Rnd(-1.2,1.2)
Next
While Not MilliSecs() - Timer > 100
Wend

Put that in your main loop


olo(Posted 2008) [#5]
ok thanks, but that kind of slowed my whole game down. It did what i wanted but it also slowed down everything else, isnt there a way, you know of, that i could only slow down the objects?

sorry, my fault, i didnt explain what i was trying properly


KillerX(Posted 2008) [#6]
For i=0 To 100
MoveEntity spheres(i), Rnd(-0.5,0.5)/10, 0, Rnd(-1.2,1.2)/10
Next



olo(Posted 2008) [#7]
great it works now, thanks so much

olo