Quantcast
Viewing all articles
Browse latest Browse all 7

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.


Viewing all articles
Browse latest Browse all 7

Trending Articles