Don’t multiply velocity/position changes with delta time! End of story.

Okay, not quite. There’s a rationale that goes with it. And there are situations where applying delta time is important, if not required - but probably not in the way you’ve been taught by tutorials and fellow developers.

This is important stuff because applying delta time wrongly makes for a bad game experience.

What is this delta time thing anyway?

If you integrate velocity to a node’s position every frame, you have the option to multiply that velocity with the delta time passed in the update: method. Delta time is simply the time difference between the previous and the current frame.

Actually that is not entirely accurate - delta time is the time difference between the last and current execution of the update: method. This usually occurs every frame, but doesn’t have to be. On a scheduled selector that runs every second, the delta time is - tadaa - one second.

Okay, not even that is accurate. On a scheduled selector that runs every second, delta time is at least one second. It could be slightly more. This can depend on the resolution of the timer and how well one second divides with the time allocated to render a frame, or (as you’ll see later) whether time delta was calculated with the same means as the screen refresh rate.

What does multiplying with delta time do?

The effect of (not) multiplying a node’s velocity with delta time is as follows, assuming that 60 fps is the maximum achievable framerate as on iOS:

  • Don’t multiply with time delta: the node slows down as the framerate drops below 60 fps.
  • Multiply with time delta: the node moves the same distance regardless of the framerate.

Multiplying with delta time is often referred to as “framerate independent” (updates, movement, gameplay, etc). In contrast not multiplying with time delta is often called “framerate dependent” (updates, movement, gameplay, etc).

Unfortunately, framerate independent updates are said to be “important” and often taught by fellow game developers without actually teaching the implications, drawbacks and situations where you don’t want to apply delta time. Here’s one key point to take away early:

Applying delta time only makes a difference when the framerate drops below 60 fps.

If your game always runs at 60 fps there’s absolutely no point to multiply with time delta. If time delta is only used to combat the effect of short-lasting framerate drops, possibly introduced by system events, you’re doing it wrong.

In this case, and most others too, you’re almost always better off not applying delta time on iOS. And if you do, there’s a whole set of things to consider, including the architecture of both the game and the engine.

Continue reading »

YETIPIPI Gameplay Video

On December 20, 2012, in Announcements, by Steffen Itterheim

Check out this new gameplay video from the official YETIPIPI website:

Get the game here. Note: it’s only available in Germany & Austria for now, worldwide release will hopefully be in January.

You can find more details about the game including a technical postmortem in an earlier blog post.

Also for the german speaking crowd (and those who are really quick to learn a new language): Game One posted a video interview with cartoonist Joscha Sauer about the game. Game demo starts at 11:30.

Tagged with:  

Linkvent Calendar, Day 17: Controls & Usability

On December 17, 2010, in Cocos2D Linkvent Calendar, by Steffen Itterheim

Nikita Gazarov is the developer of Chopper Defense HD for iPad, a fast-paced Tower Defense meets Arcade game … type of game. Hard to describe, better see for yourself:

For the Linkvent Calendar he wrote two articles about gameplay usability. In his first post Virtual Controls Usability he describes the dual-stick implementation he used in Chopper Defense, and what the problems and solutions to that were. In his second post he goes into detail about The Sins of Accelerometer Controls, as experienced in games like Fly Effect Real 3D while Tilt to Live does almost everything correctly.

The “Great Apps Made With Cocos2D” List

On October 19, 2010, in cocos2d, Games, by Steffen Itterheim

This list is a collection of exemplary games and apps made with the Cocos2D for iPhone game engine. They should be seen as reference products in terms of what you can do with Cocos2D and simply the variety of games and apps developers have created with Cocos2D. This post is linked to from the Cocos2D book.

If you wish to add a game or app to this list, and you can provide prove or guarantee that it was made with Cocos2D, please leave a comment. From time to time I’ll move the notable mentions up to the actual blog post and delete it from the comments (to avoid duplication) but you can still grab some attention and a little traffic to your game by simply adding a comment to it here. And don’t forget that the official Cocos2D website has a games page, where you can also add yours.

Note: the order of the apps in this list is arbitrary, although I try to group similar apps together.

The “Great Apps Made With Cocos2D” List


The Elements (iPad) is a graphical representation of the periodic table of elements. The outstanding feature is the plentiful photographs and smooth 360 animations which invite you to explore the elements that make up you, me and the rest of the universe (excluding empty space, of which there’s a lot I’ve been told). It’s priced highly but worth every cent, and if you need an App to brag about your new iPad: this is it!

Note: iPad demo starts at 2:55


Bloomies is a colorful gardening game, full of bees. If that doesn’t sway you over, maybe the idea of fostering and nurturing your own garden does. The flowers need your constant attention and the gameplay is addictive just like any Tamagotchi-style game. Oh, and it happens to be made by two former colleagues of mine. It’s just a beautiful game, and so is their follow-up game Super Blast.


StickWars is a sort of Tower Defense game where you defend your castle from incoming stick figures by flicking them in the air or literally shaking them to the ground. The developer, John Hartzog, had never before worked with Objective-C or on mobile devices but he pulled it off. StickWars remains to this date within the Top 100 games and continues to be updated even a years after the initial release.


ZombieSmash is also a Castle Defense game, except that this time hordes of zombies are attacking and you get explosives, 16 ton weights, shotguns and other cool items that make a bloody mess to fend them off. Your castle is your barn and if you can defend it, you’ll be rewarded with a slow motion animation of the final zombie losings its, err, unlife. The outstanding feature of this game is certainly the ragdoll animation system that allows zombies to walk, crawl or otherwise try to move even if they lost some of their limbs.


Super Turbo Action Pig revives a simple gameplay concept of a scrolling level where your character always falls down except when you touch the screen to boost his jetpack. The extraordinary part here is that the game’s graphics are extremely well made and the overall presentation of the game, the trailer, the website and the humor are setting a great example.


Farmville, do I even have to explain what it’s about? It’s an incredibly successful Facebook game that has millions of players worldwide building their farms in an isometric landscape. It just goes to show how powerful Cocos2D is if a company like Zynga uses it to port it’s most successful game to the iPhone.


Zombie Farm came out on the iPhone even before Farmville, and it was also created with Cocos2D. It does have it’s own, unique edge and stands well on its own. If you have enjoyed Farmville, you haven’t played Zombie Farm yet! Visit the Zombie Farm forum thread.


Melvin Says There’s Monsters (iPad) is a beautifully animated cartoon kid story with professional quality voice overs. The story is cleverly constructed and has an insightful turning point. It’s a pleasure to watch even for an adult, and it also uses Cocos2D’s page flip animations very effectively. If you have an iPad and kids, it’s a must have!


Alice (iPad) is also a shining example of a kid’s book app for the iPad, made with Cocos2D and lots of Chipmunk physics mixed in for good measure. Visit the Alice forum thread.


Trainyard is an innovative puzzle game that was clearly engineered with the user in mind. It features a mode for the color blind, is optimized to use little battery power, saves and loads the game just as the user left it and even allows users to share puzzle solutions on the web, using a duplicate of the game engine written in Flash. This all besides being a really innovative puzzle game where you lay tracks and combine trains to match them with colored trainyards.


AbstractWar 2.0 is a dual-stick shooter featuring colorful and effectful geometric visuals like its role model game Geometry Wars on Xbox Live Arcade. It’s an intense space shooter with plenty of game modes. You can even play it in multiplayer via a Bluetooth connection and it allows you to use your own iPod music.


Fuji Leaves is an interesting music game, where dropping balls hit leaves and depending on speed and location of impact, a sound is played. With several balls on the screen bouncing around you can dynamically create musical scores. It’s intensely fascinating to play this game, trying to come up with interesting scores and just the right placement of leaves. Before you know it, an hour has passed.


Moonlights borrows the grid-building physics from another popular Indie game. If you wouldn’t know it, on first sight Moonlights looks and feels just like World of Goo, and that alone is no mean feat. Visit the Moonlights forum thread.


Checkmates Chess (iPad) is as gorgeous and elegant as chess can be. You can play against another human or the computer (well, against the iPad to be precise). Making use of the full size of the iPad, you can now leave your pieces at home. Visit the Checkmates Chess forum thread.