News for hackers. Stuff that matters.
Re:“C#, it’s just not portable” by eropple on Thursday September 15, 2011 @04:55PM (#3002094)
Welp, here's an example. My project Flatland[1] is intended to be a 2D games library, providing graphics, audio, input, content loading, and a few other bits. My target platforms are Windows, Mac, Linux, iOS, Android, and WP7.

With a properly architected solution (and I like to think mine comes close) with sufficient abstraction, I literally can write a game once--with allowances for fundamental platform differences, i.e. "is this a touch device? then show on-screen controls, but wire them to the same backend logic"--and deploy it everywhere. I can't do that with a Java engine on Android and an Obj-C (ugh) engine on iOS, because there is no reasonable lingua franca. C#, on the other hand, works fairly well everywhere. The platform-specific bits are small, clearly delineated, and shouldn't take long to do (it's Windows-only for now).

[1] - http://bitbucket.org/eropple/flatland

Re:“C#, it’s just not portable” by evilduck on Thursday September 15, 2011 @05:05PM (#3002135)
You also get the luxury of ignoring many of the native UI paradigms with games.
Re:“C#, it’s just not portable” by eropple on Thursday September 15, 2011 @05:53PM (#3002273)
That's true. I don't have to deal with native UI libraries. Instead, I also have to deal with disparate interfaces to graphics, audio, sound, the file system (if it's accessible at all), the content loading paradigm for the platform (relevant esp. for Windows Phone 7), timing differences between the platforms, and a number of other issues. I have to develop and code to lowest-common-denominator interfaces that contain a lot of hidden gotchas and limitations, and make the presented interface work identically on all platforms.

I'd take re-coding my UI layer over having to write near-identical code for XNA and OpenGL, then writing near-identical code for OpenAL, XNA, and Core Audio, then writing widely divergent input code for XNA and whatever not-well-standardized gamepad layers I can repurpose or build for Linux and OS X and the different touch frameworks...

Having to write all of this stuff is arguably on par, if not more complex and difficult, than reimplementing a UI layer. It's not a "luxury" at all.