Forum Replies Created
Thanks – I just used a photo of a cloud that I converted to grey scale and then cut out a circle from it. I think it’s 512×512 or even 1024×1024 in size.
Another use of a custom made emitter for my promo video of a soundtrack:
Basically it’s just a lot of the same cloud texture in multiple slowly rotating, scaling, and alpha fading forms =)
Glad the change made sense 🙂
Nice with the EffectAmount as well – that’ll be the best way to implement it of course. I think what I’ll do is use my intense (yet suttle) menu effect to set the global value by launching it in max detail and monitor the framerate and adjusting the global value accordingly (with the ability to override in the options menu).
Again I must say that your particle editor and mod really rocks. I’ve learned a bit more how to achieve the effects that I want and it packs much more power and flexibility than one might suspect – nice benchmark of what quality software should be like!
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 tlParticleManager1234<br />Field vp_x:Float<br />Field vp_y:Float<br />
New method to set the position of the viewport:123456<br />Method SetScreenPosition(x:Int, y:Int)<br />vp_x = x<br />vp_y = y<br />End Method<br />
and in the DrawParticles method I’ve changed the if statement for drawing to:1234<br />If px > vp_x - e.Image_Diameter And px vp_y - e.Image_Diameter And py < vp_y + vp_h + e.Image_Diameter<br /><br />
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 .
Thanks for taking the time to modify the code Pete.
When testing with your version I located the (two) causes:
1) I assume your editor is running in OpenGL and it seems that in windowed mode OpenGL is roughly twice as fast as DX9 for timelineFX whereas in fullscreen mode the OpenGL and DX9 is pertty much identical. My test results were (ifnore the actual FPS as it’s a modified version of the effect, it’s the differences that are relevant):1234567<br />Resolution Driver Virtual Resolution FPS<br />1024x76832 OpenGL VR 1600x1200 240<br />1024x768x32 DX9 VR 1600x1200 240<br />1024x768x0 OpenGL VR 1600x1200 180<br />1024x768x0 DX9 VR 1600x1200 95<br />
2) I’ve created an effect to fill the screen at 1920×1200 (which is the virtual resolution of my game) and the editor runs in different aspect and the interface covers some of the area so it’s less particles to draw.
Don’t know if the DX9 OpenGL differences are consistent on other machines or if it’s just on this laptop.
Yes, odd isn’t it?1234567891011121314151617181920212223242526272829303132333435363738394041<br />Import rigz.timelinefx<br /><br />Include "inc_functions.bmx"<br /><br />Local fixedRateTween:TFixedRateTween = TFixedRateTween.Create(30)<br /><br />Local particleManager:tlParticleManager<br />Local effectLib:tlEffectsLibrary = LoadEffects("assets/effects/effects.eff")<br />Local effect:tlEffect<br /><br />'SetGraphicsDriver GLMax2DDriver()<br />'SetGraphicsDriver D3D7Max2DDriver()<br />SetGraphicsDriver D3D9Max2DDriver()<br /><br />Graphics 1680,1050,1<br /><br />particleManager = CreateParticleManager(5000)<br />effect = CopyCompiledEffect(effectLib.GetEffect("menu_background"), particleManager)<br />particleManager.addeffect(effect)<br />effect.setx(0)<br />effect.sety(0)<br />effect.SetAreaSize(GraphicsWidth(),GraphicsHeight())<br />particleManager.SetScreenSize(GraphicsWidth(),GraphicsHeight())<br /><br />fixedRateTween.Reset()<br />While Not KeyDown(KEY_ESCAPE)<br />Cls<br />fixedRateTween.SetDeltaTime()<br />While fixedRateTween.RepeatUpdate()<br />particleManager.Update()<br />fixedRateTween.SetExecutionTime()<br />Wend<br />fixedRateTween.SetTween()<br /><br />particleManager.DrawParticles(fixedRateTween.GetTween())<br />DrawText "FPS: " + fixedRateTween.getFPS(), 10, 10<br /><br />Flip False<br />Wend<br />
The tween function is pretty much like any other tween function.
Sounds interesting with your collisions. I’m in the process of making a scalable tile engine without the traditional limitations and unlimited layer and transition support etc. I probably have to create my own collisions for it to integrate fully but considering your efforts with timelineFX I’ll be keeping my eye at your progress 🙂
I’ll have a look at wxWidges as well, I bought ifsogui to have a play around with – I like to sponsor projects even though I’m unsure I will use it for sure.. but I’m quite happy with the simple approach of ifsogui.
I get lost in translation when it comes to multiple coordinate spaces but with your help this did the trick:
MyParticleManager.SetOrigin( viewport.getCameraX() – viewport.getX() + viewport.getWidth()/2, viewport.getCameraY() – viewport.getY() + viewport.getHeight()/2)
You’ve truly done an amazing job with this module – and editor 🙂 Did you use MaxGUI for the editor by the way? I’m evaluating what GUI to use for the mapeditor for my tile-engine.
Thanks so far, getting closer.
MyParticleManager.SetOrigin( obj_tank_base.getX() – viewport.getX(), obj_tank_base.getY() – viewport.getY())
I get it correct once panning the world and object is in center. Now I just need to compensate when camera reaches boundary and the vehicle drives off center and near the edges. Will report back 🙂
Thanks for your reply.
I use smokeeffect.setx() and .sety() to set the position of the smokeeffect and the coordinates i use are world-to-screen translated for the object.
The object has a position in the space 2048 x 1048 and when i use my method getObjTranslatedX() it takes the X-coordinate in world space and converts it to screen space using parameters such as my viewport X,Y, width, and height along with it’s cameraX and cameraY position.
Maybe I need to rethink how I translate my world to screen?
That was the issue it seems like, I had 1.35 on this machine still 🙂
Then my next problem is that using e.g. Local MyEffect:tlEffect = MyEffectsLib.GetEffect(“simple explosion 1”) returns a null object even though it exists in the effect library I’ve loaded in MyEffectsLib. The exact error message is: MaxIDE: “Unhandled Exception: Attempt to access field or method of Null object” on the line “MyParticleManager.addeffect(CopyEffect(MyEffect, MyParticleManager))”
Update: Found the issue, I was ignoring the hierarchy so I of course needed to use “Pyro/Simpla Explosion 1” instead.