Sign in to follow this  
OrangyTang

Massivly cross-platform - Win32, 360 and Mac in one?

Recommended Posts

Over time I've built up quite a nice library of code which means I can write quite high-level Java code and have it work seamlessly across Win32, Linux and Mac. Distribution is a snap - windows users get a nice familiar .exe wrapper, and Mac and Linux people get a one-click launch via webstart. The only requirement is a 1.4 Java vm installed, which practically everyone has these days. However I've been eying up XNA for a while now because being able to write games people can play on the 360 is really neat. With MS removing the limitation of needing a creator's club license to play other people's games it's getting very appealing. However I currently get a lot of people playing my games on Mac, switching to XNA would mean ditching Mac support in exchange for 360 people which I'm not really keen to do. So I'm wondering if it would be possible to somehow write platform independent code which would work for all these platforms. Current ideas are: - Somehow get C# running acceptably on Macs (using Mono?) and write a library to work with either XNA or OpenGL based on platform. - Some kind of crazy bytecode converter to generate XNA binaries from Java code to run on 360, and stick with Java for all other platforms. - Some other option I've not thought of. For now we'll ignore linux support since I've had hardly anyone play my games on it. And we'll assume we can rewrite everything from scratch (ie. no legacy code to deal with). The other possible snag is that from what I've seen XNA on windows is pretty bad from a redistribution point of view. Maybe it would be better to stick with XNA only for 360 and use DirectX directly on windows? Anyone any suggestions?

Share this post


Link to post
Share on other sites
There was a Mono.XNA project, though I'm not sure how complete that was.

Hopefully Microsoft's increased XNA drive will make it a more popular platform all around and more likely to be implemented on non-MS platforms.

I've had great success running my apps on Linux using Mono, though they've mainly been command-line driven.

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
- Somehow get C# running acceptably on Macs (using Mono?) and write a library to work with either XNA or OpenGL based on platform.

I think that be best way to keep Mac OS X support. Keep all your code abstracted away from the API. Also, C# works very well on Mac OS X, so you don't need to worry about it. You can use macpack to make double-click application packages. Just make sure the user has Mono framework (either installed locally on there computer, or distributed within your game package).

Share this post


Link to post
Share on other sites
Yes, using C# on all platforms and using Mono for Mac does seem like the most practical (assuming Mono is up to it, performance wise). Since I'd expect to be sticking to the core libs I'd hope everything would be implemented now but it's something to look into.

Mono.XNA looks interesting, but I'd be worried that it would mean a lowest-common-denominator approach and Mac would end up getting a somewhat inferior version. And you've still got XNA's poor redistribution situation on windows.

Alternatively I'm wondering whether it would be better to use C# + OpenGL as the core platform across Win32 and Mac, then only use an XNA backend for 360 builds. It'd mean writing shaders twice (once in GLSL and once in HLSL), but that's really not too much work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this