School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,443 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,532 people online right now. Registration is fast and FREE... Join Now!




"Pyro" Particle Editor

 

"Pyro" Particle Editor

chuckb

10 Jun, 2009 - 01:25 PM
Post #1

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hi,
Have any of you used Pyro to add particle effects to your project? It can be found here at http://pyro.fenomen-games.com/. It's free for your first title and very inexpensive for subsequent titles.

I ask because our team is using this library to add effects to our game. I haven't located any tutorials or substantial samples (other than the SDK) on the web using Google or http://lmgtfy.com/.

I printed all of the .h and .cpp files in the SDK and spent part of the day studying the library code. I'm going to do some experimenting to see if my understanding has improved. smile.gif

Regards,
Chuck

User is offlineProfile CardPM
+Quote Post


chuckb

RE: "Pyro" Particle Editor

10 Jun, 2009 - 04:52 PM
Post #2

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hey!

Please test!

I've taken the SDK demo for Pyro and modified the code so that two different effects could be applied (left and right mouse button). The C++ DirectX source code and .exe is zipped and ready for download from here. I compiled this code with Visual Studio 2005.

Here's the screen shot.

IPB Image

Regards,
Chuck
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

11 Jun, 2009 - 05:13 PM
Post #3

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
*Update*

I can read a data file with effects filenames. Everything works. It's slow to load and I get an error on delete. This is not very efficient but I do like to build in stages. Here's a sample file.
CODE
//effects.dat file
0, assets\\effects\\ExplodeFlash.pyro, flash explosion
1, assets\\effects\\Explosion1.pyro, big explosion
2, assets\\effects\\Fire1.pyro, small fire
3, assets\\effects\\smoke1.pyro, light gray smoke


Here's the call to add effect to the screen.
CODE
eff[g_effectNum].Add(g_AddPosition.x, g_AddPosition.y);


I'll try optimizing. I've had an unexpected 'scaling' effect. I'm trying to figure that out because I really want to scale. biggrin.gif Sometimes techniques are discovered accidentally.

Regards,
Chuck
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

11 Jun, 2009 - 07:10 PM
Post #4

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
*Update*

Here's an improved version. Pyro Demo Program

Regards,
Chuck
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

13 Jun, 2009 - 07:48 AM
Post #5

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hi,
This program crashed on someone's machine.

Here's another version with a logging feature. I would appreciate if you could test on Windows. If it crashes, please post the contents of the "logfile.txt" here in a code window.

Thanks for helping me to debug.

Regards,
Chuck
User is offlineProfile CardPM
+Quote Post

Kanvus

RE: "Pyro" Particle Editor

13 Jun, 2009 - 08:36 AM
Post #6

D.I.C Regular
Group Icon

Joined: 19 Feb, 2009
Posts: 451



Thanked: 39 times
Dream Kudos: 50
My Contributions
doesnt work for me, didnt get far enough to change the log file. popup error box when double clicking the .exe

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem."

The warning icon is a white x in a red circle. The button available to click was OK.

windows xp, extracted from winrar onto desktop.

hope that was specific enough to help you see the error
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

13 Jun, 2009 - 10:47 AM
Post #7

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hi Kanvus,
Thanks for testing. I've got two failures with XP and three success with Vista. I appreciate the added detail.

I'll try testing on an XP box to see if I can replicate this problem. I'm not very experienced debugging problems associate with various Window's platforms.

Thanks,
Chuck
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

13 Jun, 2009 - 09:28 PM
Post #8

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hi,
Will some of you download, unzip, and test this app? Kanvus found a problem earlier. I "think" I corrected it.

I would appreciate the feedback.

Pyro Particle Demo

Regards,
Chuck

User is offlineProfile CardPM
+Quote Post

Kanvus

RE: "Pyro" Particle Editor

13 Jun, 2009 - 10:12 PM
Post #9

D.I.C Regular
Group Icon

Joined: 19 Feb, 2009
Posts: 451



Thanked: 39 times
Dream Kudos: 50
My Contributions
amazing

wonder why it lags though

nvm its me using 60% cpu

User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

14 Jun, 2009 - 06:10 AM
Post #10

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Hi Kanvus,
Thanks for testing.

The program is slow to load on some systems (as much as 20 seconds or so). Would you describe what you mean by "lag". Does it occur after clicking on the display? E.g. you click and time elapses, and then an effect is shown?

Did you use your PC resource meter to measure the 60% on the CPU?

Thanks,
Chuck
User is offlineProfile CardPM
+Quote Post

Kanvus

RE: "Pyro" Particle Editor

14 Jun, 2009 - 06:38 AM
Post #11

D.I.C Regular
Group Icon

Joined: 19 Feb, 2009
Posts: 451



Thanked: 39 times
Dream Kudos: 50
My Contributions
no, your app is pretty amazingly fast and smooth. i was using 60% cpu on another program and forgot about it.
User is offlineProfile CardPM
+Quote Post

chuckb

RE: "Pyro" Particle Editor

14 Jun, 2009 - 09:54 AM
Post #12

D.I.C Head
**

Joined: 29 May, 2009
Posts: 176



Thanked: 4 times
My Contributions
Whew!!! I wasn't sure how to solve that problem. biggrin.gif

I'm glad it worked and thanks again for testing.

Regards,
Chuck
User is offlineProfile CardPM
+Quote Post

smjones

RE: "Pyro" Particle Editor

29 Jun, 2009 - 02:08 PM
Post #13

New D.I.C Head
*

Joined: 29 Jun, 2009
Posts: 1


My Contributions
Nice work Chuck!

Works great on my systems.

XP SP3 and Vista 32-bit

Regards,
Steve

This post has been edited by smjones: 29 Jun, 2009 - 02:14 PM
User is offlineProfile CardPM
+Quote Post

Lunchbox

RE: "Pyro" Particle Editor

1 Sep, 2009 - 04:16 AM
Post #14

New D.I.C Head
*

Joined: 26 Aug, 2009
Posts: 19


My Contributions
Hey guys,
does anyone of you know whether I can use the Pyro tool with C#?
Or is it only for C++?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:29AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month