One environmental effect I see many people have trouble with in Game Maker’s 3D is rain – how to create it and how to make it look like real rain (not just a bunch of textured walls).
I’ve seen some impressive rain in recent game releases, particularly Gears of War / Gears of War 2, and I wanted to try to create something like that in order to see if the effect is possible in Game Maker. And of course, I also wanted to supply myself and others with a nice example.
After some fiddling around, I’ve come up with what I think is a good replication of the other rain effects I’ve seen in games like Gears, which runs reasonably fast, and isn’t too complicated under the hood. My example uses large, moving 3D walls textured with rain, scrolling down repeatedly and rocking back and forth and side to side using sine wave-based movement. The rain is composed of many objects placed around the level at the start of the game, and the camera disables objects dynamically as it moves around. I’ve also thrown in a simple animated ground (could be better), and fake terrain backdrop (the same as the one in my night sky example), and a skybox (courtesy of Yourself).
The example also uses a rudimentary FPS-style of controls / mouselook as well, but I just threw this in there to help show off the scene, so if you find a problem with that, please disregard it.
You can download the example here (2.5 mb).
Note: This example, for whatever reason, if only working with GM7 at the moment. As soon as I have a chance to figure out why GM6 hates it, I’ll update the link with a fixed GM6 file.
Please use this example for learning purposes only, and don’t pull anything directly out of it to use for your own work (including textures) without first asking me about it. Anyway, thanks for reading and enjoy!