Okay. One word. SPRITES.
Your ingame rain lags because of what your doing. Your using the 3D spheres on a global range. You have to think small and cheep to get away with it. I use this technique in my own games I write.
To use sprites you need a transparent PNG/GIF image with raindrops on it, apply it to the face of a block (usually in games I use a single sided rectangle) then in the script recrussivly position the multiple "sprites" around the characters camera. Move them downward, and when out of view, reset them above the camera. In the technique you aren't filling the WHOLE world with indevidual raindrops which would therefore send the polygon count through the roof. Instead, you have only the neccessary polygons to get the effect you want!
The only downfall is it takes some more advanced coding to call a in-game collision check to see if your under shade and therefore stop the raind accordingly.
You can't do this in Roblox because one, the characters camera is not a selectable object class so you can't find its global position or orientation. And single sided sprites aren't a block type.
Sprites are also the way to do fire. Since they have a textured face you can use actual detailed fire graphics instead of using the standard in-game primitives. Then just use a star formation and update each sprite to animate and move/scale randomly, and tada! Fire! |