Jump to content
  • Advertisement
Sign in to follow this  
Deprecated

Which language to choose?

This topic is 3269 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've decided to pick up game programming on my spare time but I can't decide on the language. I'm not planning to write anything that really needs the extra speed C++ provides, so first I thought I'd use Java. I pretty much finished a basic arcade engine I can use to write simple games, but the more I write the more I dislike the restrictions of Java.. My current goal is a multiplayer isometric game that can run with atleast 50 players at the same server, so not that massive. But I'm wondering if I should go with C# instead, what would you suggest, which language is better suited for game development?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Deprecated
but the more I write the more I dislike the restrictions of Java..


What restrictions of Java is keeping you from writing a 50 player online game?If those restrictions don't exists in C# then go ahead and switch.You won't lose anything by working on something.

Share this post


Link to post
Share on other sites
Quote:

I'm not planning to write anything that really needs the extra speed C++ provides

C++, as a language, provides no "extra speed" in general. Languages lack performance; performance is only relevant in specific scenarios. Do not fall into the trap of believing that C++ will perforce make all your projects faster. Furthermore, you will be the limiting factor in terms of performance of your projects for some time to come, not the language.

Quote:

so first I thought I'd use Java. I pretty much finished a basic arcade engine I can use to write simple games, but the more I write the more I dislike the restrictions of Java..

What restrictions are those?

In general you're going to be most productive with the language you know best, which seems to be Java at the moment.

Quote:

But I'm wondering if I should go with C# instead, what would you suggest, which language is better suited for game development?

I like C#. I would recommend it -- also Python -- in the general case. However, it's entirely possible that you'll discover you have the same dislikes of C# (or Python) that you do of Java. So you should supply an answer to my prior question concerning what you dislike about Java, and I or somebody else will be able to advise you further.

Share this post


Link to post
Share on other sites
As an old (mostly) C/C++ user, I have to say the Java style often did not match my likings, and sometimes provided unclear models... various friends of mine keep telling me that C# seems to have a much better ecosystem. The most intriguing part of this ecosystem to me is the X360... I'd give C# a go.

Share this post


Link to post
Share on other sites
Quote:
Original post by Black Knight
What restrictions of Java is keeping you from writing a 50 player online game?

There's no restrictions which keeps me from writing these kinds of games, I was referring to the restrictions of Java as a language, I'm not allowed to access functions provided by the OS unless they exist within the JVM. Naturally sun can't give this kind of access as the language wouldn't be platform independent anymore. This isn't that big of an issue, but it really irritates me.

Quote:
Original post by jpetrie
C++, as a language, provides no "extra speed" in general. Languages lack performance; performance is only relevant in specific scenarios. Do not fall into the trap of believing that C++ will perforce make all your projects faster.

C++ is compiled and therefore execute alot faster than a language like python, anyhow this doesn't matter for my project, I just tried to point out that I don't want to use C++ as that seems to be the usual suggestion here.

Quote:
Original post by jpetrie
Furthermore, you will be the limiting factor in terms of performance of your projects for some time to come, not the language.

I've got about ten years of experience with programming, most of it in malware and security programming. Something I'm no longer proud of, but I've got pretty good experience with very demanding programs and applications.

Quote:
Original post by jpetrie
I like C#. I would recommend it -- also Python -- in the general case. However, it's entirely possible that you'll discover you have the same dislikes of C# (or Python) that you do of Java. So you should supply an answer to my prior question concerning what you dislike about Java, and I or somebody else will be able to advise you further.

I want a language that will let me work with the OS pretty much unrestricted. I don't want to use some click-and-play-like game engine, I don't mind support for dubbelbuffering or HW access, but that's about it. Finally I want good support for threading and networking. Unless I have to I don't want to work too much with basic networking.

Share this post


Link to post
Share on other sites
What OS functions are there you must have? I'm certainly not a Java man but it allows you to read/write files, do directory operations, use sockets, use OpenGL. ie pretty much anything and everything you would really need to do.

C# isn't going to get you any closer to the OS then Java does. To a programmer the CLR isn't really much different then JVM.

If you are worried about being close to the OS then you should stick to assembly or whatever else it was you used before.

Share this post


Link to post
Share on other sites
If you want to have a close access to OS features, then your options are highly reduced. C# will give you a better integration with the Windows enviroment, but as pointed out, .Net languages and Java work in a similar way. Both C# and Java have ways to call native code though.

Share this post


Link to post
Share on other sites
Well I would really much like to position my own components, even if it's possible to do this with Java it's not ment to be done. I should position them relative to each other and then let the LookAndFeel decide how the should be positioned. Those nifty little features causes me more trouble than joy.

The inability to communicate with applications outside the JVM, that I'm unable to create a mutex or load a library at runtime. I'm not saying that those things have any major impact the kind of game I'm talking about, but it differs alot from what I'm used to. I didn't mean to offend you or any other Java programmer, I'm sure there are lots of great things about Java if you're more open-minded than I am.

Share this post


Link to post
Share on other sites
As far as good support for threading and networking, it doesn't get much easier than Java and C#. In both of these languages, the support is built into the core language libraries themselves, so you can do tasks in fewer lines with less fuss than what it would take in other languages. You definitely won't be messing with "basic networking". It is all pretty streamlined.

If you want to make extensive use of networking and threads, I think you may need to weigh how important these OS functions are to your game development. Besides those mentioned by the poster above (file access, etc.), which are all built in to Java and .NET, I am not sure what else game development needs. The added benefits of VM threading and networking may be more than worth the loss of these OS functions which are rarely used in game development.

Share this post


Link to post
Share on other sites
Quote:

C++ is compiled and therefore execute alot faster than a language like python

Being "compiled" has about as much to do with its performance, in the general case, as being written by a fellow with a funny name. In general, making relative assertions like this is just masturbation. What matters is what you're actually doing. Furthermore, this is not the forum to be making these sorts of declarations in, as it is frequented by impressionable neophytes. If you want to instigate a discussion about performance, take it to General Programming or some such. I expect there to be no further discussion of the matter in this thread.

Quote:

I've got about ten years of experience with programming, most of it in malware and security programming. Something I'm no longer proud of, but I've got pretty good experience with very demanding programs and applications.

Okay, then you should be capable of making any suitable (non-toy) language run efficiently enough to make a good game.

Quote:

I want a language that will let me work with the OS pretty much unrestricted.

C# will let you use platform-invoke to access OS capabilities that are not directly exposed by the BCL, although you will of course be sacrificing cross-platform capability in doing so. However, mono doesn't have the greatest support for the non-core aspects of .NET anyway (such as Windows Forms), so maybe this won't be a big deal.

So it sounds like C# will work for you if you really want to abandon Java. I'd still vote for sticking with what you know best, but the transition to C# will likely be painless (if you don't know it already).

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!