As I hadn't kept up with my blog after the final game was assigned, here are some details of what happened with the robot game, and where we went from there.
For the time manipulation in the game I decided to go with manipulating variables in the objects instead of messing with physics. This gave me more control over what was going on. I controlled these variables through messaging. Basically, this means I place a couple of methods in all objects that would need to be manipulated by time that would set the speed and other variables of the objects accordingly. This way I could only affect one object if I wanted to, or I could affect many. Through the messaging system I then called the method I wanted to use on the objects that had that functionality in them.
As part of the player controls I made the health and object collection scripts along with the attack functions in both the enemies and the player character. I also made collectable items that the enemies dropped when they were killed that would heal the character. This was done because we were planning on having the game battle heavy. With this in mind I also created an AI, for the enemies, which was customizable in aggression towards the player. Basically I made it so you could alter the radius the player had to be from the enemies for detection, how much damage they did, and the time between attacks.
The next task was to get environmental objects in that could be manipulated by time. Early in the planning of the game we had played through a game called Roborally. This game included conveyor belts, spinning disks, and other obstacles located in a factory building. We decided that our game was going to be taking place in a factory and therefore these obstacles would work in our environment. It was thus my job to get those things working.
I created scripts for the conveyors that would move the player when touched. I never got this working completely right. Sometimes they functioned perfectly, but sometimes they would throw the player through the ground. Other times, nothing happened. I think this was because the models used for the objects were full of many moving parts. I did try to encapsulate them into invisible squares to see if that would work better, but it didn’t work. I could have gotten them working if I didn’t have to take care of everything else, but this is life.
After many weeks, I finally got a level design and I started implementing it into the game and laying out the objects where they needed to go. I got the time manipulation working so that animations would slow down and speed up along with the variable functions.
No comments:
Post a Comment