Home › Forums › TimelineFX Module › Performance in editor vs Blitzmax › Re: Re: Performance in editor vs Blitzmax
Yes, odd isn’t it?
Import rigz.timelinefx
Include "inc_functions.bmx"
Local fixedRateTween:TFixedRateTween = TFixedRateTween.Create(30)
Local particleManager:tlParticleManager
Local effectLib:tlEffectsLibrary = LoadEffects("assets/effects/effects.eff")
Local effect:tlEffect
'SetGraphicsDriver GLMax2DDriver()
'SetGraphicsDriver D3D7Max2DDriver()
SetGraphicsDriver D3D9Max2DDriver()
Graphics 1680,1050,1
particleManager = CreateParticleManager(5000)
effect = CopyCompiledEffect(effectLib.GetEffect("menu_background"), particleManager)
particleManager.addeffect(effect)
effect.setx(0)
effect.sety(0)
effect.SetAreaSize(GraphicsWidth(),GraphicsHeight())
particleManager.SetScreenSize(GraphicsWidth(),GraphicsHeight())
fixedRateTween.Reset()
While Not KeyDown(KEY_ESCAPE)
Cls
fixedRateTween.SetDeltaTime()
While fixedRateTween.RepeatUpdate()
particleManager.Update()
fixedRateTween.SetExecutionTime()
Wend
fixedRateTween.SetTween()
particleManager.DrawParticles(fixedRateTween.GetTween())
DrawText "FPS: " + fixedRateTween.getFPS(), 10, 10
Flip False
Wend
The tween function is pretty much like any other tween function.