Thursday, February 11, 2010

Another Toy!


Using the arrow keys to navigate and the spacebar to fly, the player drives the little light creature around gathering the balls that are arrayed above it.

I used IPO curves to animate the light/flame as a substitute for particles, since particles can't be used in the Game Engine. Also used logic blocks to end the spheres when the player contacts them. The sound track is a song from our team's very own Sarah Spencer!

Try to collect them all before the song ends!


EDIT 2/13/2010:

It seems like some more explanation of how I made my game is in order. The "flame" is an animation made using IPO curves following this series of tutorials. The animation itself is not affected by the spheres that the player is meant to capture. However, the spheres have a "near" sensor for the property of "man" which is attached to an "edit object" actuator set to "end object".




This makes them into a "pickup" which can later be set to be counted as the player collects them. They are also set to "no collision" so that the flame can go through the sphere. This effect can also be achieved by making the spheres an "actor" and a "ghost", but I don't like the "ghost" modifier because I can't figure out how to make it a ghost to the player but not the plane it rests on (meaning it falls through the ground).


The flame emitter is parented to a cone, which has the property of "man" and is set to invisible so only the flame is seen.






So in reality, the cone is what interacts with and "ends" the spheres, but the flame is what the player sees. I did it this way because the flame emitter is picky about what logic bricks are applied to it ( I suspect this is another example of animation reacting in an odd way within the GE) and because I can apply a material to the cone (but not the emitter, which is an empty)--making it possible to later use a touch sensor (which only detects materials) on "pickups" or other game elements if I need to. (No, I'm not sure why I would need to use a touch sensor and not a near sensor, but I try to use things in a way that keeps my options open later down the line--I find it prevents many moments of hair-pulling).


Anyhow, I hope this helps to clarify how my little game was made and on to the next challenge!


No comments:

Post a Comment