Sign in to follow this  
Laurence Hunter

Game Programming Language

Recommended Posts

I am currently writing a game when a friend of mine asked if he could run (test) my game on his computer (Macbook Pro). Since I'm writing the game using the XNA game studio so told him that answer is most likely no. To be honest, it's my first game and is still really rough around the edges so His question also got me thinking. Is there a common language that I can use to write a game compile it and then run it on Windows, Max OSX or Unix / Linux?

Share this post


Link to post
Share on other sites
C, C++, Python, pretty much any language actually...

Your problem isn't the language, but the library that you're using. The XNA library is Microsoft-only. If you were using C# but different libraries you could make your game work on other OSs.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
C, C++, Python, pretty much any language actually...

Your problem isn't the language, but the library that you're using. The XNA library is Microsoft-only. If you were using C# but different libraries you could make your game work on other OSs.


Pretty much this.

Honestly though, if this is your first game, i'd stick with XNA a while longer if you've gotten used to it. It's really easy to do the actual 'game' programming with XNA instead of fighting concepts like pointers that people struggle with.

Share this post


Link to post
Share on other sites
One possible workaround exists. I've tried it on a test game and got it to work:

Use SilverSprite. To quote from the page:
Quote:
Run XNA games without code changes in Silverlight 3. SpriteBatch based graphics only, no 3D. Since the game compiles into straight Silverlight code, it will run anywhere that Silverlight can.


And Macs can run Silverlight: see here. Some tweaking may be needed, but this can allow your XNA game to run on a Mac.

Share this post


Link to post
Share on other sites
Java and python are languages that can run on all platforms out-of-the-box so to speak. C# can also do that if not using XNA/DirectX.
With C/C++ you gotta make sure you're using all portable libraries (like SDL) and not use any platform specific code.

Share this post


Link to post
Share on other sites
There are probably tons of solutions out there depending on your needs, but if you're planning on writing native code and using OpenGL then your best bet is probably using c/c++ in conjunction with a cross-platform windowing library like SDL or GLUT.

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