The 100 Hour Game

Inspired by Pancake and Burger by Philipp Stollenmayer, I want to make and release a simple but well crafted iOS game in 100 hours.

The 100 hour deadline is part business—as this is unlikely to make any money, I probably shouldn’t spend that much time on it—and part creative—having a time constraint will force me to make faster decisions and to not second guess them.

Day 1—Ideas and Concepts

I already had an idea coming in to this project and so I fired up Procreate on my iPad and sketched out the basic concept and quickly realised that it’s way too complicated for this project.

A sketch of a parking video game
Idea 1 sketch
A sketch of a thumb with a coin balancing on it
Idea 2 sketch

Scrapping that (for the moment), I spent the next thirty minutes mind mapping new ideas and landed on a coin flip game.

The game loop is simple: tap the screen to flip a coin in the air, then tilt the device left or right to catch it in a position suitable for flipping again. Points are awarded for successful catches.

I wanted to experiment with Inverse Kinematics for a realistic thumb movement, and here’s where I hit my first snag.

Getting the IK set up in Xcode was really easy using the scene editor, as was having it reach for a node. In the image below, the green node was the target node and the blue rectangle represented the end effector.

A screenshot of the inverse kinematics concept app I experimented with

I added this to touchesBegan(withEvent:)

And this to touchesEnded(withEvent:)

This gave me the exact behaviour I was looking for. A nice, realistic flicking motion. The blue “fingernail” node was given a static physics body that interacted with the yellow coin’s dynamic physics body. The collisions worked as expected and it was all looking good until it came to the actual flicking motion.

Unfortunately, it appears that using the reachTo actions does not update the velocity of its physics body, so no momentum is applied to the other objects that it interacts with.

Overriding the didSimulatePhysics method and printing out the velocity of the fingernail node after every update confirmed that there was no velocity during the movement, so none got applied to the coin when the thumb flipped up and it ended up unrealistically stuck to the fingernail.

The two alternative options I’ve come up with are to try and fake it using the collision delegate and applying an appropriate impulse at the end of the thumb motion, or to abandon IK and use a mixture of constraints and joints.

I have posted a question on SA for some guidance and I’ll experiment with these options tomorrow.


If you you enjoyed this, sign up to my mailing list to get my latest posts direct to your inbox.

Your email won't be shared and you can unsubscribe any time (the link’s at the bottom of every email).

One thought on “The 100 Hour Game”

Comments are closed.