I’ve been working on “Jill” for the past few weeks. Figuring the best way to do the parts-gathering part of the game (specifically as relating to animation) is doing my head in. I’m trying a few different things as I go, seeing what seems to work the best. The general gist of what it has to do is:
- Player picks up parts of a robot, starting with the head (which she carries under one arm). This part is easy.
- Each time a part is picked up it is added to the robot’s animation, changing the animation completely (eg when the player finds the arm and shoulder components to add to the head the robot will start dragging itself along behind the player. When the player finds a torso and leg it should start jumping after the player on one leg, etc)
So the robot’s speed, gait, entire animation will pretty much change completely as each new part is added (at least until both legs are in place).
I wasn’t sure whether I should do this by pre-drawing sprites for every part combination and then switching the sprite with a new one when a new part is found or actually splitting up this robot into multiple sprites and creating their animations in the Unity editor. Because drawing all these sprite combinatiosn sounded like the least appealing thing in the world to me I decided to try the latter first.
So far I’ve only made the head-and-arm idle and head-and-arm crawl animations, which follow the head carrying stage. Basically, when a part is picked up I check two main things:
Does the part that the player clicked actually have a parent GameObject that is marked as the primary parent? For example, the robot’s left arm is made up of two game objects - the upper arm and the lower arm. However, they are found and picked up at the same time. So I nested them in a parent “Left Arm” game object. When you click on either the upper OR lower left arm, the part that is actually picked up is the Left Arm game object.
That main game object (in this case the Left Arm) has a component with some attributes and requirements related to that part. For example: any prerequisite parts that the player must already have in order to attach this part, the animations associated with this part, which other part this part should be attached to, etc.
In the meantime, I’ve also sliced up the player and created a crappy placeholder crouch animation.
I’ve been exploring the city (mostly Södermalm) and seeing a lot of interesting places and people. Well, interesting to me.