Tuesday, February 21, 2012

Skycrane

My game the little crane that could is still going strong, so I keep releasing updates for it. Lately, it has been very popular in Japan, not sure why. A lot of Japanese downloads, but the conversion rate in Japanese market is pretty low. Anyway, the next update will feature something special: a Skycrane.

Just like I did for the crane on wheels, I am taking the high road: a proper full blown physics simulation. This means that the forces of lift actually work on the rotor blades, where force leads to acceleration leads to velocity leads to movement. Also, the force that spins the main rotor causes the body of the helicopter to counter rotate, so I apply an anti-torque force with the tail rotor. Note that the tail rotor is not yet visualized in the image. Also missing are wheel struts and some sort of winch with hook that will enable the player to grab objects.

After implementing this elaborate and accurate simulation, I found out that controlling the helicopter was neigh impossible. It was simply too hard to steer due to oscillations and spiralling out of control. That is why I added two PID controllers that sit between the cyclic controller (joystick) and the control surfaces. They translate the player's intent into steering signals, 180 times per second. With PID control you can fix overshoots, oscillations and steady state errors by carefully tuning the proportional, integral and derivative constants. Now the Skycrane flies like a dream: it has nice, yet realistic handling characteristics.

11 comments:

qubodup said...

The visual style of your games amazes me. :)

Anonymous said...

Great work Bram!
Cheers,
Andree

Bram Stolk Sr said...

6 rotorblades? dat doet eigenlijk alleen Sikorsky http://www.b-domke.de/AviationImages/Rotorhead.html
Skycrane will lift TLCTC to greater heights....Happy Birthday

Anonymous said...

What about a port to windows based Desktop's :)

Anonymous said...

I played Little Crane on my iPhone 4 and liked it so much I bought the extra levels. Since I like both cranes and helicopters I think I will ennoble Skycrane. Only one problem - I have move to the Android platform because iOS simply is too restricting (and Android has a lot more options and functions). My question is: Will Little Crane (& Skycrane) be available on the Android platform?

Anonymous said...

ennoble = enjoy :-)

Bram said...

I'm sorry, no, I don't think little crane will be available for Android anytime soon.
You can play the game on a Macintosh desktop machine though. (It's missing the skycrane, but has a cool crawler crane on tank treads)

Anonymous said...

Hi there. Any particular reason that it won't be available on Android? If it is a matter of resources I'm sure you can team up with a party that has the time, skill and resources to pull it off. It's a great game.. a shame that it can't be enjoyed be more users.. If I'm not mistaken (haven't got the statistics on me) Android has surpassed iOS in number of users..

Bram said...

It would require more than a porting effort:
I completely adopted all Apple technology. The code base is 100% objective-C, and not a thin layer Objective C around a large C or C++ codebase, like most game devs do. Also I make extensive use of Apple tech like GCD, blocks, NSNotification, etc.
This means a complete rewrite in C or C++ is req'd. It would be a big project.

Anonymous said...

Thanks for your time and answers. :-)

Bram said...

Maybe a little late, but in november, Little Crane for Android got released after all. Quite an effort to go from ObjectiveC to C++ but the end result was a quality port. https://play.google.com/store/apps/details?id=com.steenriver.littlecrane