Adding async/await to CocosSharp actions

UPDATE: The CocosSharp team has decided to integrate my ideas directly into their source! 🙂

Are you a C# programmer? Using Xamarin? Are you interested in making great games that run…

  • cross platform,
  • from one code base
  • and are powered by Cocos2D and XNA?

If yes, then you should check out CocosSharp!

I used Cocos2D in the past (the “good” old days of ObjectiveC…) and liked it a lot. Seeing all this translated to C# just freaks me out! 🙂

However there has been one thing that bugged me: chaining actions and running actions simultaneously.

Say, you want your character to scale, then increase some score counter, afterwards make the character jump and then reset the animation phase to the default frame. You would use something like:

var scale = new CCScaleBy (1f, 1.5f);
var jump = new CCJumpBy (1f, new CCPoint (100, 100), 50, 2);

this.RunActions (scale, new CCCallFunc (() => this.UpdateScore ()), jump, new CCCallFunc(() => this.SpriteFrame = this.defaultFrame));

Works, but with the power of C# we can do better!

Continue reading

My Personal Digital Treasure Chest – how Dosbox keeps Memories alive

I don’t know if this is only happening to me. But from time to time I find myself digging in my archived digital life. I have a folder on my hard drive called “Old Stuff” which resides under “Development”.

It usually starts with meeting an old friend from back in the 1990s, or by seeing an old 2D game with pixels the size of bricks. This makes me nostalgic.

Recently, I read a blogpost by Scott Hanselman about how to run old games on modern computers in Dosbox. And I started to think:

Wasn’t everything better back then? Well, not everything, but everything related to computers, programming and gaming at least? In my memories it was better – but it’s probably a good thing that we cannot bring back the past. Memories usually are better than reality really was. But then again…we had Turbo Pascal in the last century!


Continue reading