On my recent iOS puzzler Wordz, I decided not to reinvent the wheel, and instead use an off-the-shelf 2d game framework. I settled on Cocos2d. It makes it very easy to put together sprite-based games or apps by providing all the basic pieces like a scene graph, animations and integration with a couple of physics engines. It’s built on OpenGL but, happily, hides all that away from you – unless you need it.
No sooner had I released it, than Apple came out and announced a new framework for 2d games: SpriteKit. And it’s remarkably similar to Cocos2d. Here I’ll take a look at a few places where they differ, so you know what to look out for if you’re considering migrating to SpriteKit. Continue reading SpriteKit for Cocos2D developers→
If you’ve been wondering where I’ve got to over the past few weeks, rest assured I’ve not given it all up, but I’m taking 6 weeks out to travel round the west coast of the USA with my family in an RV (a motorhome). If you need any more detail than that (really?), head over to bigtrip.voyce.com.
Of course, being an oft-accused Apple fanboy, I took the opportunity to stop at the Cupertino mothership on the way through.
Novice Windows programmers can often think that DllMain is a good place to get that one-time set-up and tear-down work done. It seems to offer an ideal opportunity to know when your DLL has just been loaded, and when it’s about to be unloaded. What better place to add all that expensive, complicated initialisation…? STOP! WAIT! Before you add anything in DllMain, make sure you understand what state the process will be in when it gets called. Once you know that, you may well change your mind… Continue reading Don’t do anything in DllMain… Please→
While working on some F#/C# WPF code the other day, I kept hitting a fatal FormatException when running under the debugger. Annoyingly, the app would quit with:
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: Input string was not in a correct format.
Wow. I’ve been totally overwhelmed by the response to the 7 signs your UI was created by a programmer: 40,000 readers and counting, and that was just over a couple of days! I’m expecting some seriously good programmer-created user interfaces after this. And if I spot one more typo in a dialog box, I promise I’ll raise an army of UI pedants to hunt you down and put your users out of their misery.
A couple of apologies are in order. Firstly, sorry if you tried to hit the site and found it down. I totally wasn’t prepared for the traffic; my bad. Secondly, sorry if you’ve posted a comment on the article here or elsewhere and I haven’t responded. I’m been swamped and the day job always seems to get in the way, dammit.
Anyway, thanks for reading, keep in touch, and I’ll try and get over that ‘difficult second album’ period I seem to be having.
I’ve just spent several hours struggling with an annoying WordPress problem: when I edited a post to make some additions, it suddenly stopped displaying any content. The title, header and footer were still visible, only the post body itself was missing.
After a bit of poking around, I came across this post. It points out the root cause of the problem is the PHP regular expression engine (PCRE) that WordPress uses.
The easiest way to fix the problem is to ignore the advice in that post about modifying formatting.php, and instead make the fix to PHP.INI which is mentioned in the comments. I edited my copy to include the following line, which increases the backtracking limit from the default of 100000:
pcre.backtrack_limit = 1000000
After getting IIS to pick up the changes (iisreset) my missing content appeared again.
OpD2d has been downloaded about 5000 times a month for the past few years, and I’d like to take this opportunity to thank the people who’ve been generous enough to paypal me a few quid as thanks. This is much appreciated, and helps to keep me in t-shirts.