Author Topic: [XP] Particle Weather Engine  (Read 7957 times)

Offline GasolineWaltz

  • Trained Member
  • *
  • Posts: 18
  • LV: 3
  • Gender: Male
    • View Profile
[XP] Particle Weather Engine
« on: December 29, 2010, 05:21:54 AM »
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
« Last Edit: January 08, 2011, 04:48:24 PM by Blizzard »

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #1 on: December 29, 2010, 05:38:39 AM »
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.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #2 on: December 29, 2010, 05:47:11 AM »
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.

Offline GasolineWaltz

  • Trained Member
  • *
  • Posts: 18
  • LV: 3
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #3 on: December 29, 2010, 06:01:03 AM »
@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)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #4 on: December 29, 2010, 06:15:23 AM »
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.

Offline GasolineWaltz

  • Trained Member
  • *
  • Posts: 18
  • LV: 3
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #5 on: December 29, 2010, 06:17:02 AM »
thx! sorry about that haha
« Last Edit: December 29, 2010, 06:23:20 AM by GasolineWaltz »

Offline SBR*

  • Chaos User
  • ******
  • Posts: 1195
  • LV: -7
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #6 on: December 29, 2010, 12:21:31 PM »
I really like this script :D! It's an interesting idea to make gusts and such, so: level up :D!

Cya :urgh:!

Offline megaman30796

  • Transcended Spirit
  • ***
  • Posts: 227
  • LV: -60
  • Gender: Male
  • BEST TOILET EVER!!!!
    • View Profile
    • 99% Loading
Re: [XP] Particle Weather Engine
« Reply #7 on: December 30, 2010, 09:33:02 AM »
what can the wind do?
"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?"

Offline GasolineWaltz

  • Trained Member
  • *
  • Posts: 18
  • LV: 3
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #8 on: December 30, 2010, 05:58:51 PM »
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.

Offline megaman30796

  • Transcended Spirit
  • ***
  • Posts: 227
  • LV: -60
  • Gender: Male
  • BEST TOILET EVER!!!!
    • View Profile
    • 99% Loading
Re: [XP] Particle Weather Engine
« Reply #9 on: December 31, 2010, 04:41:31 AM »
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?"

Offline GasolineWaltz

  • Trained Member
  • *
  • Posts: 18
  • LV: 3
  • Gender: Male
    • View Profile
Re: [XP] Particle Weather Engine
« Reply #10 on: January 01, 2011, 02:31:02 AM »
kind of, if you set the wind and not the weather, the wind would be going but there would be nothing to see.