Imphy
Forum Replies Created
-
AuthorPosts
-
ImphyParticipantThanks – 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.
ImphyParticipantAnother 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 =)
ImphyParticipantGlad 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!
ImphyParticipantYes, 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 .
ImphyParticipantThanks 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):
Resolution Driver Virtual Resolution FPS
1024x76832 OpenGL VR 1600x1200 240
1024x768x32 DX9 VR 1600x1200 240
1024x768x0 OpenGL VR 1600x1200 180
1024x768x0 DX9 VR 1600x1200 95
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.
ImphyParticipantYes, 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.
ImphyParticipantSounds 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.
ImphyParticipantI 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.
ImphyParticipantThanks so far, getting closer.
Using:
myparticlemanager.SetScreenSize(viewport.getWidth(), viewport.getHeight())
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 🙂
ImphyParticipantThanks 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?
ImphyParticipantThat 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.
-
AuthorPosts