Forums → Programming Forum → SUSHI CAT iphone jiggle mechanics
- 4 Replies
To any developers out there who worked on the iOS version of Sushi Cat.
I am a CS student currently learning to program in iOS using Cocos2d and Box2d.
I love sushi cat, and as a learning exercise, I have been trying to replicate the jiggling mechanics of sushi cat. I have an idea of how you implemented it in the Flash version, but I have literally no idea how you translated those squishy, jiggly cat physics to iOS.
If you guys would be willing to share any pointers or hints for how this type of physics could be implemented, I would be really grateful (obviously I don't expect you to share any copyrighted trade secret code etc).
Thanks and best wishes!
You'll have a better shot asking the developer directly. He doesn't seem to have his e-mail linked so you may just have to hope he checks his comments and sees yours.
Sushi Cat is just a chain of circle rigid bodies linked together with joints into a much bigger circle. The initial area of the bigger circle is calculated and stored. Every update the rigid body circles are "extruded" outwards, away from the center point, to match the initial area of the bigger circle. The amount and how often you "extrude" determines how rigid the squishy body ends up being.
That's the easy part, rendering the little guy is where things got challenging, but that's a different story.
I could be wrong, but is it a bitmap fill with the eyes and other things added on top? That would also make it easy to expand by just increasing the size of everything as it eats sushi.
Kind of. The bitmap fill didn't give me the effect I was looking for plus the bitmap had to scale slightly with the soft body as it grew so I ended up going the slower route and drawing the body with graphics data and using that as a mask over the body bitmap. It made the body look a little more 3D and didn't make him look like just a bitmap fill. The ears and legs were "snapped" to a specific rigid body circle and as the body grew, they would stay locked to the outer edge (up to a certain length though for the ears only). The face was kept at the center point at all times while a dark border was drawn around the entire cat. I think I had some bevel filters on him at some point, but they had to be removed for performance.
You must be logged in to post a reply!
We strive to deliver the best gaming experiences... on the internet and on your mobile phone. Play thousands of free online games, get access to free mmorpg games, online rpg games, fun online flash games, and more.
We offer free flash games in many different genres: online shooting games, online puzzle games, online war games, free online car games, free online hidden object games and dozens more.
This is the best place on the web to play online games for free... play on Armor Games! No matter what game style you prefer, we've got it here.
Gaming websites, passionate bloggers, and quirky streamers are welcome to share or review our games. If you need game keys, art, trailers, screenshots or more check out our press kit website.
Game developer? Visit developers.armorgames.com to request AG developer status, find documentation on our APIs, and get access to our development environment. Let's make sweet, sweet games together.
Looking for a publishing partner that can help your app rocket to success? Contact the mobile team to learn more about how we can help!