how would i do weather effects without slowing the game? such as rain, hail, wind.
the game is a sidescroller shooter and i use the pmo for main character movement
[Game design makes my brain feel like its gonna explode.]
Option 1
You can make it so the rain droplets 'Do not follow the screen', so they stay static regardless of where you go. This means your rain is falling as if the area was only 640x480, even if the actual play area is vast.
PROS:
Quick
CONS:
Harder to make it deal with collisions destroying the rain droplets
Option 2
Only make it rain within a certain nearness to the screen.
So for instance, it may rain the screen area, and about 100px above, below, left and right of the screen. Any droplets outside of that get destroyed instantly.
PROS:
Quick
Can handle collisions easily
CONS:
A bit complicated for some
For lightning strikes and stuff, well they're the easy parts. Just make a big object the size of the window and make it flash randomly on and off. Also remember that a thunder strike which is distant has a delay.
So you could make it so that randomly, thunder strikes have different delays. Remember, the more distant, the greater the delay between flash and clap. Also, the greater the delay or distance, the lower the frequency of the thunder clap sound sample must be (and possibly volume).
If there's no delay at all, the thunderclap is right overhead. Now when this really happens, it's deafening and you can actually feel the shockwaves.
Now we can't deafen the player, and it'll sound rubbish to overload their speakers with a super-loud sample. So make the sample as loud as you can get away with, and throw in a heavy screen-shake. Etc.
You could do something simple if you don't need to destroy the water droplets by making all the ones that fall off the frame at the bottom be set back up at the top just outside it. You might want to make the droplet's X position random so that the rain doesn't look like late night TV after all the shows go off.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Oh and you might want to slap all your rain into its own layer, underneath any player overlays (like health or lives) and over the actual gameplay screen.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
I used the first tutorial and it works great. The problem is when i try to use it in my game it gets messed up. In the tut its just a 500x380 but my game is a scrolling shooter that is 1920x480.
When i stand still it works fine but when i strat walking and the screen starts scrolling a whole lot of raindrops come out the side of the screen instead of fallin from the sky
I used the first tutorial and it works great. The problem is when i try to use it in my game it gets messed up. In the tut its just a 500x380 but my game is a scrolling shooter that is 1920x480.
When i stand still it works fine but when i strat walking and the screen starts scrolling a whole lot of raindrops come out the side of the screen instead of fallin from the sky
You have to set it to move as the frame moves.
I have proven new mathematic formula to be true...