Home › Forums › TimelineFX Module › Performance in editor vs Blitzmax › Re: Re: Performance in editor vs Blitzmax
Yes, it runs OK now š I am also thinking of having 3 effect details for every effect so you can choose level of detail. Would be really cool if it could be benchmarked/automated some way when the game is first run with the option to manually change. I prefer not to use a particle limit as the detail limiter as it doesn’t look too good in an environment where most particle fade in (it starts to pulsate).
I’ve also added a custom method to the tlParticleManager to perform as I wish with multiple viewports at different locations. Without it I couldn’t get the effects to draw correctly in different viewports.
New fields for tlParticleManager
Field vp_x:Float
Field vp_y:Float
New method to set the position of the viewport:
Method SetScreenPosition(x:Int, y:Int)
vp_x = x
vp_y = y
End Method
and in the DrawParticles method I’ve changed the if statement for drawing to:
If px > vp_x - e.Image_Diameter And px vp_y - e.Image_Diameter And py < vp_y + vp_h + e.Image_Diameter
Not sure if there is another way to solve it using the existing methods but setorigin and setscreensize and setareasize didn’t quite cover it for me .