Tuesday, February 10, 2009

You shouldn't have done that...he's just a boy.

Telekinesis Post Mortem

The Good
The best thing that I can say about this project is that in the end, I got the basics of what I was going for. In the game you’re able to pick up and levitate an object. You can rotate this object around you, and walk with it. This was the main goal of my project. Having accomplished that, I feel that this project was a success.

The Bad
There were a lot of things in this project that went wrong. As I said before I had my basic expectations laid out for this project. However, like any project I do, I like to go above and beyond. I wanted to have good weight detection on all the objects. I also wanted to lay out a bunch of little puzzles that would demonstrate how you would use this power. The problem came about when I realized that telekinesis is very difficult to program. The start of my problems began with my good friend math. I knew that programming this would require some math. However, I didn’t take into account how much math would be involved. In high school I only got to geometry. The math that was needed for this project involved calculus.
After I learned the formula I needed to calculate rotation, I had difficulty putting it into the Torque engine. The formula needed me to acquire the angle at which my player was rotated. Getting this information from Torque was easy enough to do. It was the last variable that is given to you by the getTransform function. This variable in Torque is flawed though. The angle works the way it’s designed to from 0 to 240. However, after 240, the angles go back down to 0. This took me a long time to get right. After a lot of researching I finally found a fix for it.
When I put everything together it still didn’t worked like it was supposed to. The objects would teleport behind you and then rotate like normal. This was another block of code that took a long time to figure out. I started to think that it may be the formula that I have that wasn’t working. This is when I began to look up the formula again. As it turns out, there is at least six different ways to rotate something around a given point mathematically.
After everything was solved for the basics of telekinesis, I learned that the way I was going about moving the object made the collision not work. This made me a sad panda. Time became the deciding factor in whether to fix this or not. Unfortunately this wasn’t fixed in the final version.


The Ugly
YOUR FACE!!111!!!ONE1!!! HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA!

What I Learned
Calculus. Well not all of calculus. I did learn how to use sin and cos effectively. I also learned that sometimes I cannot go above and beyond, and I’m stuck with just the basics.

What the Future Beholds
I would really like to implement this into the engine. If I can recompile the engine to use telekinesis automatically, I believe that it would fix my collision problems. It would also be good practice for recompiling the engine to do what I want it to. That way I will no longer have to fight so hard with Torque. If I do have the time to put it in the engine, and it works well, I’d like to upload it as a resource to the Garage Games website. I haven’t seen anything like this up there, and I feel like it would be good exposure for me.

No comments:

Post a Comment