Theme, story and characters make the game more interesting. As John Caramack once said, “Story in a game is like story in a p**n movie”; it’s not the main element, but it definitely makes it more interesting! Our game definitely got pumped up, now that it has an aesthetic to it. You will have to wait a little more until we post about our story (we just don’t wanna give away everything at once!)
We finally named our game: Pablo and The Puppet Punch.
The development is going on good. We achieved pretty good things this week, so get ready for a really long post.First with the art updates. After deciding the theme with puppets and all, we had to decide a common structure for puppets. After a lot of discussions and references, we came up with this-
The puppet body basically consists of 7 parts:
- Head + Helmet/Crown
- Main Body
- Lower Body
- Left lower-arm
- Left upper-arm
- Right upper-arm
- Right Lower-arm
We have divided puppets into these parts to simulate perfectly the movement of a puppet. Here’s a sample Indian puppet:
Now with the Programming updates:
This week we achieved some really good stuff technically. First of those things is Rag-doll physics:
The closest way of virtually simulating a puppet would be through Rag-doll simulation. The way a rag-doll body doesn’t have control over itself when it gets hit is what we exactly want the puppets in the game to do. But the Rag-doll physics will need some tweaking to make it look something similar to this:
Implementing Rag-doll in Cocos 2D with the help of rigid body dynamics that Box 2D has, wasn’t that a big problem. We’ll update you in some days about how we implemented Rag-doll; till then, a google search on how to implement Rag-doll will yield you some useful results.
But, the main problem that we are facing, is the switch that has to take place between Rag-doll and pure animation. There are two states:
1. Pure Animation: When puppet is attacking Pablo.
2. Rag-doll: When a puppet is falling or is being hit by Pablo.
The switch between these both should be very smooth and shouldn’t look awkward. This switch from Rag-doll to animation and vice-versa has been previously done in games like Zombie Smash. You can see the game-play video here
In Zobie-smash, the zombies have a normal character animation when they are walking and once when the player hits the zombie or holds it and throws it, the zombie switches to the rag-doll state. The advantage that these guys had was that the zombies were so small in size, that one couldn’t notice the jerk that occurs in between the switch. But, a slight jerk when it switches from rag-doll to animation and vice-versa still exists in this game.
We can’t afford to have any jerk, taking into consideration the size of the puppets on our game screen.
Coming back to the game, the puppets need to have animation when they attack and for the rest of the time, they should have Rag-doll bodies. We pondered a lot over it and got a fix for the transition from Animation and Rag-doll. After the attack animation of any puppet plays, then it should switch to Rag-doll.
One way to do this was to create a rag-doll body in a default position like the one on right:
The attack animations could end at this position, so that it could switch to Rag-doll from there. But, after implementing it, we noticed a big flaw. If the player hits the puppet while it is still in the attacking mode, i.e.., in the middle of the attack animation, then it has to immediately have to switch to rag-doll. This is what was happening:
A jerk again! The next option we had was to stop loading the animation sprites once the player hits the puppet and load the physics bodies of the respective parts by taking into reference the position of the parts in the last played animated sprite. We implemented this and it worked! The switch was not at all jerky and looked awesome!
After the Rag-doll was done, we went to deal with our next major implementation – Pablo’s actions in the game. In this game, the player has to use Pablo’s hands to hit the puppets. Hence, Pablo’s hands are the most crucial and the most important visual element as well as game-play element in the game. Pablo’s hand has to be implemented in the most natural way as possible. The bone structure, the turns and recoil after hit; everything has to be natural. The only way to do it was not animated sprites, but to actually simulate a hand! After a lot of googling on how to do it, Inverse Kinematics seems to be the best way to simulate the hand. God! It involves a lot of math and geometry, which is definitely going to take time.
Hopefully by next week, we should be able to update you over how to implement this, till then let us know if you have any ideas over how to virtually simulate a hand.
FB page : https://www.facebook.com/MechMocha
Youtube : http://www.youtube.com/user/MechMocha