Or so goes the argument. Still.

I wish Apple would just pull the plug and completely remove MRC support from LLVM. I’m getting tired, annoyed and sometimes angry when I browse stackoverflow.com and frequently find MRC code samples containing one or more blatant memory management issues.

Before I rant any further, this article is about testing the performance difference of ARC vs MRC code. I provide some examples, and the updated performance measurement project I’ve used before for cocos2d performance analysis, and the results of the full run at the bottom. I also split it into both synthetic low-level tests and closer to real-world algorithms to prove not one but two points:

ARC is generally faster, and ARC can indeed be slower – but that’s no reason to dismiss it altogether.

Measuring & Comparing Objective-C ARC vs MRC performance

Without further ado, here are the results of the low-level MRC vs ARC performance tests, obtained from an iPod touch 5th generation with compiler optimizations enabled (release build):

Continue reading »

YETIPIPI / YETIPEE now available worldwide!

On March 19, 2013, in Announcements, by Steffen Itterheim

The game I worked on called YETIPEE is now available worldwide in the App Store. YETIPEE is the english version of YETIPIPI.

Previously it was only available to german users. Now you have no more excuses – get the game! :)

If you’re interested to learn more about the technical details of this game, check out the YETIPIPI postmortem.

Tagged with:  

I wrote iCanSleep after I couldn’t find a tool that matched my requirements.

Both Caffeeine and InsomniaX rubbed me the wrong way – the former does not allow the display to sleep (WTF? Who would want that?) and the latter prevents sleeping altogether (WTF? I can set Energy Saver settings to “Never” myself, thank you).

To be fair: both tools have some merit, just not for me. Specifically InsomniaX has features for MacBook Pro users.

What I wanted was a tool with customizable “no sleep” duration, and not the 5-30 minutes, 1, 2 and 5 hour option of Caffeine, or none as with InsomniaX.

One that

Continue reading »

Tagged with:  

Kobold2D v2.1 now available!

On February 23, 2013, in cocos2d, Kobold2D, by Steffen Itterheim

I am so very happy to … no, actually I’m relieved Kobold2D is working fine again with the latest Xcode 4.6, including iOS 6 autorotation fixes and the FIX_CATEGORY_BUG issue. Being happy is reserved for whenever I’ve added something nice to KoboldTouch.

Of course I updated cocos2d-iphone to version 2.1-rc0a (on first sight that version looks like being encoded in hexadecimal). Which meant I also had to update cocos2d-iphone-extension to whatever is the current development version – which must be somewhat above 0.21 but that’s hard to tell because there’s no reference of a version number anywhere.

Also updated Chipmunk (6.1.2) and obviously that had to be followed by updating Chimpunk (oh there it is again – my favorite typo today) SpaceManager v0.2.01.

Lastly Admob was playing hard to catch. And it has grown awfully huge, comes with several of Google’s other SDKs as well. Given the dwindling interest in ads by game developers I just pulled the plug and removed AdMob. You can still add it back in to your project according to Google’s instructions though.

That said, here’s the download link for Kobold2D v2.1. Here’s the link to the Release Notes.

I’ll make another update when cocos2d 2.1 is final. The next version is dated for “March” according to the Changelog, but that’s going to be another release candidate. I didn’t want to hold off on updating Kobold2D for the cocos2d 2.1 final version.

PS: There won’t be anymore updates to the Kobold2D v1.x branch.

Tagged with:  

In order to write Tiled’s TMX file format I needed to do exactly this: figure out how to compress data, encode it as a string, and write it to XML.

I wrote down what I learned from using zlib, base64 and xswi – XML Stream writer for iOS (a single Objective-C class) while writing KoboldTouch‘s TMX writer.

I split it into two articles in the Essential Cocos2D section of the www.KoboldTouch.com homepage:

I was positively surprised how relatively painless zlib and base64 encoding worked (I expected the worst!) and how simple and effective xswi is for writing XML compared to any other XML library.

I’ll probably continue to add those articles to Essential Cocos2D rather than posting them on this blog. Confluence is just so much more convenient for writing technical documentation than WordPress.

Final word: Enjoy! :)

Tagged with:  

KoboldTouch: New Plans & Pricing, and FAQ

On February 14, 2013, in KoboldTouch, by Steffen Itterheim

I added two additional Plans to KoboldTouch:

  • NEW: 1-Month Support & Updates: $19.95
  • 3-Months Support & Updates: $39.95 (same as before)
  • NEW: 12-Months Support & Updates: $119.95 (4 quarters for the price of 3)

All plans are now non-recurring / not auto-renewing. No more subscription plans.

The 1-Month plan is for trying out KoboldTouch, or getting or updating it cheaply. Lowering the barrier of entry. I want to increase the user base to gather more feedback, requests and suggestions.

The 12-Month plan is for supporters and early adopters who are willing to invest into KoboldTouch while saving money in the long run.

Note: You can continue using and publishing apps built with KoboldTouch even after your support & updates plan has expired.

Learn more about KoboldTouch and sign up.

Target Audience

At this point KoboldTouch isn’t for everyone (yet). I decided to narrow the focus to the type of users I seem to have convinced and the type of users I like to work with and attract more. I summed it up like so:

KoboldTouch is a custom-built game engine for demanding iOS & Mac OS X developers.

Continue reading »

Essential Cocos2D is now available for free!

On February 7, 2013, in idevblogaday, by Steffen Itterheim

The cocos2d-iphone reference documentation project dubbed Essential Cocos2D is now available for free. It is no longer bundled with KoboldTouch.

This is just one aspect of several upcoming changes I will be making to KoboldTouch over the next days. I removed Essential Cocos2D from the equation because after the first 3 months as well as the KoboldTouch survey it became clear that KoboldTouch should be all about KoboldTouch – both from my side & my motivation as well as what (potential) customers are interested in.

Instead of adding more hassle to the mix by turning it into a paid eBook project I decided it’s probably the best for everyone to give it away for free.

Essential Cocos2D caused a conflict of interest by taking time & energy away from developing KoboldTouch and its documentation. Now I’ll be using Essential Cocos2D as the container (and easily browsable one too) and inspiration for the in-depth Cocos2D articles I’ll continue to write infrequently for my iDevBlogADay posts.


Continue reading »

When you embark on a project, the first thing a developer ought to do is to run some basic math. Especially if you already have some specs regarding the number and sizes of assets. Because otherwise you may end up trying hard to work around a memory related issue which perhaps even modern desktop computers would struggle with.

So today, I’ll do some math for you, the things you should consider before starting a project or adding one more of those big new shiny features to your app. Kind of like an addendum to my popular article about memory optimization and reducing bundle size.

How much wood texture would a woodchuck choke on if a woodchuck could choke on wood textures?

A texture is an in-memory representation of an image made up of individual pixels. Each pixel uses a certain amount of memory to represent its color. A texture’s memory size is therefore simply the product of width * height * sizeof(color).

Before I go any further, I like to stress it again: the size of an image file is much smaller than the size of the texture generated from the image. Don’t use image file sizes to make memory usage estimations.

Most common are 32-Bit and 16-Bit textures which use 4 and 2 Bytes respectively per pixel. A 4096×4096 image with 32-Bit color depth therefore uses 64 MB memory. Let that sink in for a moment …

At 16-Bit it only uses half of that, though without color dithering (TexturePacker does this for you) this might not look too good depending on the image.

This is pretty much what you’re stuck with unless you export textures as .pvr.ccz. Not only does this format load tremendously faster than PNG (not to speak of JPG which are unbearably slow to load in cocos2d), the .pvr.ccz format also reduces the texture memory size because the texture can stay compressed in memory.

It’s extremely difficult to estimate how much smaller a PVR texture’s memory footprint will be without actually giving it a try. But you can expect anywhere between 10% to 50% reduction.

To the non-power-of-two!

Continue reading »

Page 6 of 37« First...45678...2030...Last »