Fitting TimelineFX to work with Xors3D
BlitzMax Forums/BlitzMax Programming/Fitting TimelineFX to work with Xors3D
| ||
Again I ask. Anyone has tried to make TimelineFX work with Xors. I only encounter problem on the command DrawParticales on the main loop. it will really be great if it can be operated along with xors. its seems easy.. but i cant figure it out. maybe its not easy? i dont know for sure.. |
| ||
I'd imagine that Xors uses it's own renderer, whereas TimelineFX uses the standard drawing commands in Blitzmax. Did you just want the particles to be drawn over the top of what you render in Xors? There's probably someway of letting Xors render what it has to then do all your blitzmax drawing afterwards but I dont know how straight forward that is. I would pose the question to the Xors team: How can you use standard blitzmax drawing commands with Xors? |
| ||
Ok thanks for answering I admit i tried to reach you over the email.. no reply.. Your TimelineFX is truly amazing and try to combine it to my GameEditor. TimelineFX is priceless.. for me. Ok down to business.. Here is my code and here is the error I get SuperStrict Import xorsteam.xors3d Import rigz.timelinefx Import rigz.tweener Local MyEffectsLib:tlEffectsLibrary = LoadEffects("effects/examples.eff") Local MyEffect:tlEffect = MyEffectsLib.GetEffect("simple explosion 1") Local MyParticleManager:tlParticleManager = CreateParticleManager() xGraphics3D (1024, 768, 0) myparticlemanager.SetScreenSize(GraphicsWidth(), GraphicsHeight()) myparticlemanager.SetOrigin(GraphicsWidth() / 2, GraphicsHeight() / 2) SetUpdateFrequency(30) Global Tweener:tTweener = New tTweener.Create(30) 'Our main loop While Not KeyDown(KEY_ESCAPE) Or AppTerminate() xCls xRenderWorld() xUpdateWorld() If xMouseHit(1) Local tempeffect:tlEffect = CopyEffect(myeffect, MyParticleManager) tempeffect.SetX(xMouseX()) tempeffect.SetY(xMouseY()) MyParticleManager.AddEffect(tempeffect) End If Tweener.Update() For Local Ticks:Int = 1 To Tweener.FrameTicks Tweener.UpdateExecutionTime() MyParticleManager.Update() Next MyParticleManager.DrawParticles(Tweener.Tween) xFlip Wend The Error: Unhandled Exception:Attempt to access field or method of Null object The the debug takes me to this final point ------------------------------------------ Rem bbdoc: Get current alpha setting. returns: the current alpha value in the range 0..1.0 End Rem Function GetAlpha#() Return gc.color_alpha End Function Ive tried to mess around with parameters and replace them with xors parallel commands. Didnt manage to succeed till now. also when i make changes on the timelinefx.bmx file it some how ignore it. its like im editing a different file.. then the one that is being opened. Hope you can do something about it. all the error comes from the MyParticleManager.DrawParticles(Tweener.Tween) Command all the rest doesnt make the loop a crash. Regards.. |
| ||
Ok thanks for answering I admit i tried to reach you over the email.. no reply.. Your TimelineFX is truly amazing and I try to combine it to my GameEditor. TimelineFX is priceless.. for me. Ok down to business.. Here is my code and here is the error I get SuperStrict Import xorsteam.xors3d Import rigz.timelinefx Import rigz.tweener Local MyEffectsLib:tlEffectsLibrary = LoadEffects("effects/examples.eff") Local MyEffect:tlEffect = MyEffectsLib.GetEffect("simple explosion 1") Local MyParticleManager:tlParticleManager = CreateParticleManager() xGraphics3D (1024, 768, 0) myparticlemanager.SetScreenSize(GraphicsWidth(), GraphicsHeight()) myparticlemanager.SetOrigin(GraphicsWidth() / 2, GraphicsHeight() / 2) SetUpdateFrequency(30) Global Tweener:tTweener = New tTweener.Create(30) 'Our main loop While Not KeyDown(KEY_ESCAPE) Or AppTerminate() xCls xRenderWorld() xUpdateWorld() If xMouseHit(1) Local tempeffect:tlEffect = CopyEffect(myeffect, MyParticleManager) tempeffect.SetX(xMouseX()) tempeffect.SetY(xMouseY()) MyParticleManager.AddEffect(tempeffect) End If Tweener.Update() For Local Ticks:Int = 1 To Tweener.FrameTicks Tweener.UpdateExecutionTime() MyParticleManager.Update() Next MyParticleManager.DrawParticles(Tweener.Tween) xFlip Wend The Error: Unhandled Exception:Attempt to access field or method of Null object The the debug takes me to this final point ------------------------------------------ Rem bbdoc: Get current alpha setting. returns: the current alpha value in the range 0..1.0 End Rem Function GetAlpha#() Return gc.color_alpha End Function Ive tried to mess around with parameters and replace them with xors parallel commands. Didnt manage to succeed till now. also when i make changes on the timelinefx.bmx file it some how ignore it. its like im editing a different file.. then the one that is being opened. Hope you can do something about it. all the error comes from the MyParticleManager.DrawParticles(Tweener.Tween) Command all the rest doesnt make the loop a crash. Regards.. |
| ||
Hi, sorry I'm not at home to answer emails at the moment. Ok, so that error is saying that gc is a null value. gc is the graphics canvas created by Blitzmax, but xors is creating it's own which is why it's not working. That's one of the first commands called in the draw particles function and it's just used to stored the current states so it can restore them after drawing all the particles. I think what you'll have to do is replace all those max2d commands in the drawparticles method with the xors3d equivalent. If you're making any changes to timelinefx you will have to rebuild the modules before the changes come into effect. You can do this in blide if you have it, or on the command line navigate to your Blitzmax/bin folder and use the command bmk makemods rigz Hope that helps, let me know how you get on :) |
| ||
Ye, it helps alot.. because I didnt do rebuiled module .. Ill update.. thanks |
| ||
Can we please have a 3D particle system that can be incorporated in other 3D game engines ? |