Here's the same example that use ANIMATE command only, please check it out:
Graphics3D 800,600,32,0
Global frameTimer = CreateTimer(60)
light=CreateLight()
PositionEntity light,0,10,0
camera=CreateCamera()
TranslateEntity camera,0,3,-100
Global xx=LoadAnimMesh("bugtest.b3d")
;SKINNED CYLINDERS
Animate xx,1,.5
Animate FindChild(xx,"Cylinder01"),1,.5
Animate FindChild(xx,"Cylinder02"),1,.5
Animate FindChild(xx,"Cylinder04"),1,.5
Animate FindChild(xx,"Cylinder05"),1,.5
Animate FindChild(xx,"Cylinder07"),1,.5
Animate FindChild(xx,"Cylinder08"),1,.5
Animate FindChild(xx,"Cylinder10"),1,.5
Animate FindChild(xx,"Cylinder11"),1,.5
Animate FindChild(xx,"Cylinder13"),1,.5
Animate FindChild(xx,"Cylinder14"),1,.5
Animate FindChild(xx,"Cylinder16"),1,.5
Animate FindChild(xx,"Cylinder17"),1,.5
Animate FindChild(xx,"Cylinder83"),1,.5
Animate FindChild(xx,"Cylinder84"),1,.5 ;<-The rotating one
Animate FindChild(xx,"Cylinder86"),1,.5
Animate FindChild(xx,"Cylinder87"),1,.5
Animate FindChild(xx,"Cylinder88"),1,.5
Animate FindChild(xx,"Cylinder90"),1,.5
Animate FindChild(xx,"Cylinder92"),1,.5
Animate FindChild(xx,"Cylinder93"),1,.5
Animate FindChild(xx,"Cylinder95"),1,.5
Animate FindChild(xx,"Cylinder96"),1,.5
Animate FindChild(xx,"Cylinder97"),1,.5
Animate FindChild(xx,"Cylinder99"),1,.5
While Not KeyHit(1)
WaitTimer(frameTimer)
time = MilliSecs()
Framecounter_counter=Framecounter_counter+1
If Framecounter_time+1000 <=MilliSecs() Then
Framecounter_framerate=Framecounter_counter
Framecounter_counter=0
Framecounter_time=MilliSecs()
FpsCounterAccumulator=FpsCounterAccumulator+Framecounter_framerate
EndIf
cpuStartMesure=MilliSecs()
UpdateWorld
cpuLoad=MilliSecs()-cpuStartMesure
RenderWorld
Text (800-85-FontWidth()),FontHeight(),"FPS: "+Framecounter_framerate
Text (800-100-FontWidth()),FontHeight()*2,"AnmTime: "+AnimTime (xx)
Text (800-100-FontWidth()),FontHeight()*3,"CPUload: "+cpuLoad
Flip
Wend
EndGraphics
End
I need this bug to be fixed cause i have cutscenes in the game where 5-6 characters talk and move, and after 20secs of animation, it starts to slowdown till it goes at 15fps or less...(and it starts from over 60 with alla characters visible) I don't think it would be too much difficult for you to fix it. really thank you.
|