Aaron R Leiby (a.k.a. Taliesin) o[]xxxx}{>>>>>>>>>>>>>> http://www.cs.rit.edu/~arl8258 ICQ: 147141 11 June 1998 UnrealMod: Leiby.u Gravitron.uc GravCannon.uc GravTest.unr ////////////////////////////////////////////////////////////////////////////////////////////// // This is NOT a weapon mod. It does, however, contain a weapon mod that is simply used to // // launch the Gravitrons into 'orbit'. The purpose of this mod it to demonstrate a simple, // // yet cool, particle system. Without the GravCannon, it would not work very well. // ////////////////////////////////////////////////////////////////////////////////////////////// =To run= + Copy Leiby.u to your /Unreal/System directory. + Copy GravTest.unr to your /Unreal/ =Classes= + GravCannon: This is simply an expansion of the FlakCannon. Very little modifications were made other than making it fire Gravitrons instead of FlakAmmo. + Gravitron: This is where the cool part comes in. Gravitron are not very usefull in the gaming environment. However, they look pretty darn cool. Essentially, they are particles the of a soccerball which are collectivly attracted to each other (related by distance). They emit a trail of smoke that makes them easier to see, and accents thier non-linear trajectories. They also glow. =Things to try= + Grab the GravCannon, give yourself some extra ammo (type: 'allammo' at the console), and start firing away. Start out with just two Gravitrons and watch how they interact. Then get a couple more flying around. When you are sufficiently satisfied with that, launch about a hundred more and see how they react. + In order to get a better view, you may want to turn off gravity. (typing: 'fly' at the console does the trick nicely) + In UnrealEd, you can edit the default properties of the Gravitrons. There is a section conviently labeled Gravitron. >bRandomColors< - tells the gravitrons if they should choose a random color to glow as, or use the default colors defined under LightColor. >CollisionEnergy< - defines the amount of energy expanded when two Gravitrons collide. This prevents them from all forming a big glob by introducing more energy to the system every time one gravitron collides with another. +(CollisionEnergy=1.0 means that no extra energy is added - they bounce as normal physics would allow.) +(CollisionEnergy<1.0 means that collsions are dampered. - more realistic 'real-world' physics, but not very useful for this application.) +(CollisionEnergy>1.0 adds more energy to the system. The bigger the number the greater the effect of the collision. Essentially, the velocity of the gravitron is multiplied by CollisionEnergy, and that new velocity is used after the collision.) >Gravity< - This regulates how much each Gravitron is attracted to another. Also, there is a value for friction which is currently hardcoded that slows the gravitrons down. This is used primarily to keep 'race' conditions from happening since I am constantly adding more energy to the system due to collisions. This was not made into a default property since I saw no reason to modify it. =Things I wish to add= + Colored smoke trails. + Trails other than smoke. + Better models (rather than the dopey eight-sided thingys I'm using now). + Better textures to go with the better models. + Rotating the models. + Make Gravitrons useful, instead of just pretty. + Make a real gun instead of simply extending FlakCannon. + Make better noises. + Make Gravitrons spark when they collide. =Notes= + The physics used in Gravitron.uc is nothing special. In fact, it not very sound. I started by wanting to make them react using the Laws of Gravity and Planetary Motion, etc., but I couldn't remember the formulas off the top of my head, and I was too lazy to look them up. So instead, I made up my own laws (using the inverse square-root of the distance between two objects) and tweeked them until I got the desired results. + Originally, I coded this all in Java and later decided to try it in UnrealScript. If you want to see the Java version, point your Java enabled browser to: http://www.cs.rit.edu/applets/Gravitron.html.