[XP] Particle Weather Engine

Started by GasolineWaltz, December 28, 2010, 10:21:54 pm

Previous topic - Next topic

GasolineWaltz

December 28, 2010, 10:21:54 pm Last Edit: January 08, 2011, 09:48:24 am by Blizzard
Particle Weather
Authors: GasolineWaltz
Version: 3
Type: Particle Engine for weather effects
Key Term: Environment Add-on



Introduction

As of right now, this script does two things: creates particle weather and wind effects. Both of these functions are independent, which I think makes for pretty good control over the environment in your game.  

Makes use of particles in the Graphics/Pictures/Particles folder

here's some particles http://www.mediafire.com/?f4dl7aj8zfmml7m


Features


  • Weather Particles

  • Wind





Demo

http://www.youtube.com/watch?v=FsA9ycYqGyM

this is just to give you an idea... the screen cap software I used only records at 30fps, and makes the game seem a little choppy.. It looks soooo much better in game. Especially the rain, you can't really see the wind effects in the video cos of the low fps.

http://www.mediafire.com/?6kfyh4l68f944fj


here's a very simple demonstration of the particles at w3rk



Script

https://docs.google.com/leaf?id=0B5AnMItZ28l8N2Y3Y2Y0ZTktZTBmYS00MTY0LTg5OGYtMzczYjEyZWU5NDI3&hl=en



Instructions
Two things:

$game_map.p_weather(type, power, duration)
       type:     enter as a string. ex: 'rain'
       power:    number of particles to appear on screen,
       duration: amount of time in frames weather takes to reach its max (buggy)

$game_map.p_wind(strength, duration, direction)
      strength:   enter as an array: [x power, ypower] (as of right now this number has to be a multiple of four)        
      duration:   amount of frames between gusts
      direction:  enter as array w/ numbers:
                   [4= left; 6 = right, 2 = down; 6 = up]
                          note: x may be reversed... just mess around with it

#particle_struct at line 214 is h youow build new particles, I tried my best to lay them out in a readable fashion... it's pretty self explanatory, just make a new 'type' and then give that type a bunch of features.


Additional notes:

 If you like this script, help out! It's still in its initial phase, I'm sure there are some bugs to work out... but that aside, more particles/new more realistic particles, effects etc... it could be a pretty cool thing :^_^':


Compatibility
 Seeing as this script just aliases #game_screen and #spriteset_map, it should work with most scripts...


Credits and Thanks


  • GasolineWaltz

  • check out Avelpopo's particle engine




Author's Notes

None

ForeverZer0

I like the idea of using dynamic wind to affect the current weather.

Other than that, I don't get it.  :P
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

You chopped some of the template off. Please fix it and I'll move it to the database.

Seems nice by the way. I'll have to try this out.

GasolineWaltz

@gg
  fixed, I skipped over the "Authors Notes" part because I don't have many notes to put down?

@zero
  sooo, I thought about that too.. maybe it's too much for something so simple like RMXP weather? but, then again, the engine lets you do a lot more with the individual weather effects. You could make a pretty interesting dynamic weather system based on the script... would people notice it? perhaps.. but it still looks prett cool IMHO  8)

G_G

Still not completely fixed. It needs to actually say credits. And if you don't have any notes just put None. However I fixed it for you. So...consider this topic moved.

GasolineWaltz

December 28, 2010, 11:17:02 pm #5 Last Edit: December 28, 2010, 11:23:20 pm by GasolineWaltz
thx! sorry about that haha

SBR*

I really like this script :D! It's an interesting idea to make gusts and such, so: level up :D!

Cya :urgh:!

megaman30796

"You know the world is going crazy," Chris Rock declared in 2003, "when the best rapper [Eminem] is a white guy, the best golfer [Tiger Woods] is a black guy, the tallest guy in the NBA [Yao Ming] is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named 'Bush,' 'Dick,' and 'Colon.' Need I say more?"

GasolineWaltz

Quote from: megaman30796 on December 30, 2010, 02:33:02 am
what can the wind do?


it affects the speed of each particle currently on screen in 8 possible directions. So for example, if you had something like $game_screen.p_wind([4, 0], 15, [4, 2]), every fifteen frames the x-speed of each particle would gradually increase and then decrease 4 points to the left. This, makes it look like a windy day. Wind with rain has to be stronger than with snow, because the rain particles move faster. If you set duration to 0, the wind is constant... 1 and 2 also make for sem-constant wind.

megaman30796

well....i dont really understand what u just said but i get the idea. :^_^':

so wind is useless without a weather....
"You know the world is going crazy," Chris Rock declared in 2003, "when the best rapper [Eminem] is a white guy, the best golfer [Tiger Woods] is a black guy, the tallest guy in the NBA [Yao Ming] is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named 'Bush,' 'Dick,' and 'Colon.' Need I say more?"

GasolineWaltz

kind of, if you set the wind and not the weather, the wind would be going but there would be nothing to see.