Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: GasolineWaltz on December 28, 2010, 10:21:54 pm

Title: [XP] Particle Weather Engine
Post by: GasolineWaltz on December 28, 2010, 10:21:54 pm
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 (http://www.mediafire.com/?f4dl7aj8zfmml7m)


Features





Demo

http://www.youtube.com/watch?v=FsA9ycYqGyM (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 (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 (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




Author's Notes

None
Title: Re: [XP] Particle Weather Engine
Post by: ForeverZer0 on December 28, 2010, 10:38:39 pm
I like the idea of using dynamic wind to affect the current weather.

Other than that, I don't get it.  :P
Title: Re: [XP] Particle Weather Engine
Post by: G_G on December 28, 2010, 10:47:11 pm
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.
Title: Re: [XP] Particle Weather Engine
Post by: GasolineWaltz on December 28, 2010, 11:01:03 pm
@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)
Title: Re: [XP] Particle Weather Engine
Post by: G_G on December 28, 2010, 11:15:23 pm
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.
Title: Re: [XP] Particle Weather Engine
Post by: GasolineWaltz on December 28, 2010, 11:17:02 pm
thx! sorry about that haha
Title: Re: [XP] Particle Weather Engine
Post by: SBR* on December 29, 2010, 05:21:31 am
I really like this script :D! It's an interesting idea to make gusts and such, so: level up :D!

Cya :urgh:!
Title: Re: [XP] Particle Weather Engine
Post by: megaman30796 on December 30, 2010, 02:33:02 am
what can the wind do?
Title: Re: [XP] Particle Weather Engine
Post by: GasolineWaltz on December 30, 2010, 10:58:51 am
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.
Title: Re: [XP] Particle Weather Engine
Post by: megaman30796 on December 30, 2010, 09:41:31 pm
well....i dont really understand what u just said but i get the idea. :^_^':

so wind is useless without a weather....
Title: Re: [XP] Particle Weather Engine
Post by: GasolineWaltz on December 31, 2010, 07:31:02 pm
kind of, if you set the wind and not the weather, the wind would be going but there would be nothing to see.