Physics for visual effects

Started by winkio, March 11, 2011, 03:02:01 am

Previous topic - Next topic

winkio

So one thing that people never think of using scripting for is visual effects.  There's simple linear effects like sliding windows, hp bars that take time to go down, etc.  There are also spring effects, which are generally smoother, and used in newer games.  I've implemented a short (less than 50 lines) little physics engine in RMXP that could be used to create these effects, and others.  It is completely lag free, it just runs a few calculations in the background when being used.

Now, on to the point of this thread: do you want me to build in support for particle effects?  They look nice, and all the new 2D games use them (flash, XBOX live arcade, etc.).  I don't know how well RMXP handles changing sprites, but obviously, if it lags we will scrap it.  Any opinions?

Blizzard

I'm up for it. A simple particle engine could improve the game's visual representation quite a bit.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Subsonic_Noise

I for once planned to replace the regular battle animations in Endzeit with particle effects so please, go for it. :D

WhiteRose

I think that would look awesome! By all means, go for it.

winkio

Well that was easy: 30 minutes of coding, 10 minutes of testing XD  And most importantly, zero lag.  I'll put a demo up sometime soon.

Hatsamu

Cool, I'll be looking forward to it *-*

winkio

March 11, 2011, 07:42:46 pm #6 Last Edit: March 11, 2011, 07:49:33 pm by winkio
I just whipped up a few quick samples.  I did a bunch of opacity mixing on them, so it's going to lag if you have more than one at once.  Simply talk to the person at the right to clear the particle effects.

Download

EDIT: just a little footnote, these things are created using scripting.  Once you script a certain particle effect and define it's behavior, you would be able to put it into either the map, the battle, or a window using a simple script call.  And also, to clarify, the reason that the opacity mixing causes lag is because there are over 100 semi-transparent particles all trying to draw each frame, so they each have to be blended with the background and each other multiple times.  In reality, we would never use this many particles if we had opacity mixing, I just wanted to try it out.

Blizzard

Quote from: winkio on March 11, 2011, 04:23:52 pm
zero lag


When I turn on all 3 of the effects in your demo, my frame rate drops to 15.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

winkio

March 11, 2011, 07:50:56 pm #8 Last Edit: March 11, 2011, 08:00:39 pm by winkio
Yeah, RMXP doesn't handle opacity well.  Let me assure you that with completely opaque effects, it will display thousands of particles at 40 FPS

EDIT: okay, thousands was a slight exageration.  My point was that I was using tons of particles and tons of effects in the demos to see how big of a particle effect RMXP could handle, when in reality, we will end up using much less.

AliveDrive

So I predict some cool special attacks that feature fresh new graphix. ;)

Oh, and with all 3 on, I got 7 fps xD

But it shouldn't be a problem they ran fine one at a time.
Quote from: Blizzard on September 09, 2011, 02:26:33 am
The permanent solution for your problem would be to stop hanging out with stupid people.

Hatsamu

As said, it will be great for creating new attack animations. *-*


(Btw, try talking 20 times in a row with one of those particles-activating characters xP)