On Converting

Yes, I have made a conclusion. I am switching over to Unity for good.

So far it’s been incredibly smooth sailing converting the Swift code into Unity’s C#, since the two languages have – to my initial surprise – much in common. Mostly it is just a matter of replacing keywords and adding brackets and semicolons.

And let me tell you something about parsing XML. While in Swift I’ve struggled with 3rd party libraries to read XML and turn it manually into game objects, in C# it is almost automatic. I’ve already got a couple of objects set up by parsing the original XML files and it took me what, an hour together with figuring out how to do it. What a time saver, especially if I decide to rename or add a field in the XML, I don’t have to modify the parser, since there is none.

Most of the hard work ahead of me is converting all the SpriteKit and GameplayKit-specific calls into whatever Unity’s got, but I figure it is going to be fun, since learning is fun.

On the other side I’ve managed to crash Unity a couple of times, but that was me initializing objects at incorrect places. Still I’d love Unity to catch such occurrences and report them to me, instead of crashing with no error message to refer to. Also Monodevelop has been crashing from time to time with no apparent reason. I’ve read people switching to other code editors, but this one has a built-in debugger, so I may stick with its shortcomings.


I have enough of you Apple.

It’s been a while now that I’ve been struggling to see solutions to mundane development issues with Swift/SpriteKit. On top of a constantly changing (but wonderful) Swift language requiring me to rewrite large portions of my source code every couple of months, I kept hitting bugs in the compiler and frameworks, and encountering issues with stuff that should just work in the first place.

A couple of days ago, I’ve decided to take another look at Unity and what has changed since the last time I’ve played with it a couple of years ago. It turns out, a whole lot! The support for 2D is amazing, the GUI system looks simple and powerful and none of the issues on the Apple platform seem to exist here. And although I really love Swift, I don’t see any problems switching over to C#…especially when it comes equipped with so many powerful libraries.

I am also looking forward to the prospect of having CoS run on pretty much any platform I want, and not just OS X and iOS. I know many of my friends will be glad for it.

I will spend a couple more days/weeks making sure that Unity has what it takes to suit the particularies of Call of Saregnar, then I will most probably jump on that bandwagon and hopefully, never look back.