Jump to content
  • Advertisement
Sign in to follow this  
Laurence Hunter

Game Programming Language

This topic is 3028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!