Animation test & question?!?!?

Blitz3D Forums/Blitz3D Programming/Animation test & question?!?!?

Dustin(Posted 2006) [#1]
I know all the issues everyone's had with boned B3D objects and speed/performance. So I whipped up a little test.

I threw together a little robot anim then made a quicky program that loaded him along with 400 of his friends all animated.

The numbers I saw were 10-20 milisecs to update world and 60-70 millisecs to render world. This is on my AMD 64 3000 and my 256 meg geforce 6800. Now here's where things get weird...

I loaded it on my 'crappy' AMD XP 2000 with a 32 meg RIVA TNT2 card. And guess what? I got IDENTICAL NUMBERS!!! There's no way these numbers should be even close, much less identical! Anyone want to guess how this is possible? Also, want to try running it yourself and see what numbers you get? BTW, I do have it flip false so it's not a monitor sync thing.

Okay, my little geniuses... tell me what's going on here!

Here's the object : http://www.mediumedge.com/b3d/robot01.b3d

And here's the code:

Graphics3D 640,480 
SetBuffer BackBuffer() 

camera=CreateCamera() 
PositionEntity camera,90,100,-160 

Light=CreateLight() 
RotateEntity Light,90,0,0 


robot01=LoadAnimMesh("robot01.b3d")

Dim robots(20,20,12)
For X = 1 To 20
	For Y = 1 To 20
		robots(X,Y,1) = CopyEntity(robot01)
		PositionEntity robots(X,Y,1),10*X,10*Y,0
	Next 
Next 

Animate robot01,1 
For X = 1 To 20
	For Y = 1 To 20
		Animate robots(X,Y,1)
	Next
Next 

While Not KeyDown(1) 

update = MilliSecs()
UpdateWorld 
update = MilliSecs() - update
render = Millisecs()
RenderWorld 
render = MilliSecs() - render
Text 10,10,"Time to update:" + update
Text 10,30,"Time to render:" + render
Flip False

Wend 
End  



WolRon(Posted 2006) [#2]
this is flawed:
update = MilliSecs()
UpdateWorld 
render = update
update = MilliSecs() - update
RenderWorld 
render = MilliSecs() - render
it should be:
update = MilliSecs()
UpdateWorld 
update = MilliSecs() - update
render = MilliSecs()
RenderWorld 
render = MilliSecs() - render



Dustin(Posted 2006) [#3]
Okay, updated. Now, how about answering the question. :)


WolRon(Posted 2006) [#4]
Too little sample data to verify valid results. (i.e. 10-20, 60-70)

Change your code to take time samples for, say, 10 seconds and then print the average of the results. (Make sure not to start the test immediately either, wait a few seconds before taking samples)

Then compare your time results.