Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


[java] Java overtaking C in game development?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
38 replies to this topic

#1 menyo   Members   -  Reputation: 500

Like
0Likes
Like

Posted 23 November 2010 - 08:53 PM

Hi,

I am a self thought web developer that wants to learn a language to make applications or even games with. I am still wondering what language to choose but i guess it's java vs C. Now i have been doing some research and it seems C is still ruling the market. But i have read in some places that java is starting to get bigger and in a lot of cases makes life easier on bigger applications.

Now i am leaning towards java because of future prospects. But i have also been looking into university classes and certificates and it seems here in holland they offer way more java then C classes.

So is there anything i need to know choosing java over C?

Sponsor:

#2 Madhed   Crossbones+   -  Reputation: 3137

Like
1Likes
Like

Posted 23 November 2010 - 09:31 PM

I don't know if C is used in game development that often anymore.
Maybe you mean C++ or C#?

C is pretty low-level and most often used in device drivers, embedded systems and OS kernels.

I'd suggest java, C# or C++.
It's perfectly possible to write games in java.

#3 _swx_   Members   -  Reputation: 995

Like
0Likes
Like

Posted 23 November 2010 - 09:37 PM

Java has never been very popular for client side applications and the current-gen consoles don't even support it. Also, the future dont look very good for Java since it's now owned by Oracle...

#4 Madhed   Crossbones+   -  Reputation: 3137

Like
1Likes
Like

Posted 23 November 2010 - 09:47 PM

If you count android (and other) phones as (gaming) consoles then, yes, consoles support it.

For getting into games programming consider C# with XNA. It even allows you to get your games on XBOX Live Arcade.

#5 _swx_   Members   -  Reputation: 995

Like
0Likes
Like

Posted 23 November 2010 - 09:50 PM

AFAIK Android doesn't really use Java, it uses Dalvik. This is the reason Google was sued by Oracle.

#6 rip-off   Moderators   -  Reputation: 8762

Like
2Likes
Like

Posted 23 November 2010 - 09:53 PM

Java is a modern, nice language. You'll get more done in it, and in less time.

C is an old language, it is totally unforgiving. It will take longer to learn. Its design motto is "The programmer knows what they are doing", which is rarely true in general and never true for beginners.

Expertly optimised C code will generally outperform code written in other languages. Naive and reasonably optimised implementations will usually run faster in Java, for most "typical" applications. Beware of benchmarks that say differently, they are often artificial in nature and do not represent true, full-application performance tests.

In the games industry, C and C++ are still the standard. Outside the games industry, you are more likely to run into Java or C#. C isn't really ruling the market, there are few new projects written in C relative to modern languages, most of the jobs are maintenance or niche.

At the end of the day a programmer rarely learns just one language (those who do are usually the weakest developers). You're not choosing which language not to learn, you are just picking one to learn first. Between Java and C I would recommend starting with Java until you have written a few games. Then you might want to do some research on the next language to learn.

I normally recommend Python or C# though, they are also nice languages with some rather nice game oriented libraries. Pretty much everything I said above about Java applies to C#.

#7 Madhed   Crossbones+   -  Reputation: 3137

Like
3Likes
Like

Posted 23 November 2010 - 09:58 PM

@_swx_ Dalvik is Android's Java Virtual Machine. Android apps are written in java.

#8 _swx_   Members   -  Reputation: 995

Like
0Likes
Like

Posted 23 November 2010 - 10:02 PM

It depends on what definition of Java is used ;) It uses the java language, but does not have the same standard library AFAIK.

#9 lindenr   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 November 2010 - 10:31 PM

I doubt it, java the language, misses a number of key aspects which will make game development difficult.
You will lack low level controll, will not have access to proper closures and monadic structures. This will make component oriented entity systems rather bothersome.
Speed executionwise should not matter too much though. (apart from very low level optimizations).

On another note ... java is a too high a level language. Most of the developers are not aware of the nitty gritty hands on approaches to deal with many kinds of problems. The higher level, code and footprint heavy, tools will be used instead. But its my opinion that having even the slightest experience with a language that does not have all these conveniences will dramatically extend the toolkit a developer has.


#10 lindenr   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 November 2010 - 10:39 PM

Quote:
Original post by rip-off
Java is a modern, nice language. You'll get more done in it, and in less time.

C is an old language, it is totally unforgiving. It will take longer to learn. Its design motto is "The programmer knows what they are doing", which is rarely true in general and never true for beginners.

Expertly optimised C code will generally outperform code written in other languages. Naive and reasonably optimised implementations will usually run faster in Java, for most "typical" applications. Beware of benchmarks that say differently, they are often artificial in nature and do not represent true, full-application performance tests.

In the games industry, C and C++ are still the standard. Outside the games industry, you are more likely to run into Java or C#. C isn't really ruling the market, there are few new projects written in C relative to modern languages, most of the jobs are maintenance or niche.

At the end of the day a programmer rarely learns just one language (those who do are usually the weakest developers). You're not choosing which language not to learn, you are just picking one to learn first. Between Java and C I would recommend starting with Java until you have written a few games. Then you might want to do some research on the next language to learn.

I normally recommend Python or C# though, they are also nice languages with some rather nice game oriented libraries. Pretty much everything I said above about Java applies to C#.


Agreed with most. C# is indeed a very nice language as it is basically a functional language (yes, functional programming language). In bases all the essential ingredients are present to fluently express proper code execution workflows. Having access to closures and monadic structures will dramatically reduce the amount of redundant code which would otherwise result from an imperative language attempting to deal with problems for which it is not suited.

Currently my main goal (for iphone development) is getting things done in C# over cpp or java. Extension methods, funcs and predicates really lower development time needed to set up workflow and querylike related tasks.
Building a component oriented entity system in java would be alot harder to do in java.
C# has proper generic, proper type reification, extension methods (which are sooo good for entity systems), methods are first class members which really clean up closure and delegation based code.



#11 SillyCow   Members   -  Reputation: 899

Like
0Likes
Like

Posted 23 November 2010 - 10:43 PM

It all depends on the kind of games you want to make:

C/C++:
- High performance top of the line Games:C/C++
- Games that use the latest top of the line 3rd party engines: C/C++
- Compiles for every platform (as long as you don't use directX).

Java:
Anything a little below the latest top performing games. You can even build a decent FPS i JAVA.
The big advantages of writing in Java are:
1) Debugging
2) Easy automatic refractoring (Saves a heap of time in the long run)
3) Web applets (for running in browsers like FLASH)

C#:
Same as Java with the following differences:
1) Deploy on XBOX
2) XNA is very tight
3) Limited to microsoft platforms.

J2ME:
For mobile phones. Notice that J2ME is not exactly JAVA. It lacks a great deal of what Java offers. But, it does offer an AMAZING simulator + debugger.


So, the questions are really:
1) What kind of games do you want to make (High performance/Medium performance)?
2) What kind of technology do you want to learn?

As for future prospects, Java does not look any better than C. The run everywhere of Java is rivaled by the compile everywhere C. (Seen many Java games on a Playstation? )



#12 Hodgman   Moderators   -  Reputation: 31938

Like
1Likes
Like

Posted 23 November 2010 - 11:00 PM

In my professional experience:
Console games: C++ (or maaaaybe C) extended with Lua/Python/Angel/Squirrel/etc
Web games: Java, or Flash+ActionScript, or javascript+HTML with PHP/Ruby/etc
Mobile games: Java, or C++ (or maaaaybe C)

In my hobby experience:
Use whatever language you're comfortable with!

#13 Plasmana   Members   -  Reputation: 151

Like
0Likes
Like

Posted 24 November 2010 - 12:44 AM

Quote:
Original post by SillyCow
C#:
Same as Java with the following differences:
3) Limited to microsoft platforms.


Actually, you can write Wii, iPhone, Mac and Linux apps in C#.

#14 VildNinja   Members   -  Reputation: 464

Like
0Likes
Like

Posted 24 November 2010 - 01:01 AM

Quote:
Original post by Plasmana
Quote:
Original post by SillyCow
C#:
Same as Java with the following differences:
3) Limited to microsoft platforms.


Actually, you can write Wii, iPhone, Mac and Linux apps in C#.


But then you want be able to use xna, since it is DirectX based.

The reason why there is alot of java classes, and only a few C classes, is because it is a easy-to-learn-language. And as have allready been said, only very few programmers only know one language. And Java is deffinately a good starting point. With Light Weight Java Game Library you can get access to OpenGL, and make games like Runescape, Minecrat or Tribal Trouble.

But once you know one language well, you can easily switch :)

#15 Plasmana   Members   -  Reputation: 151

Like
0Likes
Like

Posted 24 November 2010 - 02:15 AM

Quote:
Original post by VildNinja
Quote:
Original post by Plasmana
Quote:
Original post by SillyCow
C#:
Same as Java with the following differences:
3) Limited to microsoft platforms.


Actually, you can write Wii, iPhone, Mac and Linux apps in C#.


But then you want be able to use xna, since it is DirectX based.

The reason why there is alot of java classes, and only a few C classes, is because it is a easy-to-learn-language. And as have allready been said, only very few programmers only know one language. And Java is deffinately a good starting point. With Light Weight Java Game Library you can get access to OpenGL, and make games like Runescape, Minecrat or Tribal Trouble.

But once you know one language well, you can easily switch :)


True, however the topic was a question of languages not frameworks. Unity w/C# on Wii, Mac or iPhone are valid options if one chooses C#. Don't know much about Mono.XNA (uses OpenGL) but that's possibly an option too.

#16 SuperRad   Members   -  Reputation: 163

Like
0Likes
Like

Posted 24 November 2010 - 02:21 AM

Java's not too bad (definitely not deserving of the flack it gets).
The JVM itself is a pretty wonderful piece of tech, that with the new G1 garbage collection system makes it quite a bit more suitable for games.
Java the language isn't bad, but it's a bit warty and definitely has signs of being designed by a committee.
Its really quite verbose (for not much reason that I can see), is missing a few features (operator overloading), and some other conventions like equivalency operator checking not if the objects are the same value/equivalent but if they are the same object in memory, one class per file, and really strict adherence to the oo paradigm.
That and the speed at which fairly new features get included into the language has been a bit disappointing, however it seems that closures might actually be coming in Java7.
These reasons have made it a bit hard for me to really get comfortable with the language.

I think the fact JNI isn't the best or at least not encouraged is one of the reasons game developement hasn't taken off as much in Java (to take advantage of all the previous work provided through c libraries)

#17 menyo   Members   -  Reputation: 500

Like
0Likes
Like

Posted 26 November 2010 - 12:10 AM

Wow, lotsa comments.

I have been running trough the java tutorials from thenewboston (a guy from youtube). So as i have read it's wise to continue learning java as i can always learn C, C++ or C# afterwards. With the C language i ment C in general, i did't know they where that different from eachother.

What kind of game you ask? Well obviously the uber game you all gonna be playing next year :D. Well no, i'm just an amateur who loves the idea of making games or programs that are functional to me. I would love to create a trade card game or mmo but those are hard to make alone.

I was working on a php/js, browser based mmo (currently still doing another browser based game), but since i ran into certain gameplay problems due to the browser limitations i'd like to start it up from scratch in another language. But first i want to learn a language suitable for that, then try to get some prototypes of the ground so i know i can pull it off and then i will start again. I'm really nor looking for good graphics (but they are always welcome). I'm really gonna focus on gameplay elements and i have some great ideas.

My game,

- Just for PC, console gamers won't even like it becaus you need to think to play my games.
- No need of eyecandy, but always good if i can implement some great models later.

C sharp + XNA, sounds very nice but costs money. I'm willing to pay money for a good package but i'd like to orientate some more before i use my money.

I think the best thing to do is stay a while with java, then decide if it will work for me. If not, no harm done and i will learn something else.

#18 MichelPaulissen   Members   -  Reputation: 102

Like
1Likes
Like

Posted 26 November 2010 - 12:28 AM

If I may I'd like to disrecommend you from learning Java as a first programming language.
I always recommend C# as a first language since it's relatively new thus supporting all popular programming concepts, which makes you in my opinion a better programmer and enables you to more fluently learn other languages in the long run.
Java, on the other hand, is a great tool if you want to support a wide range of platforms, and in my experience that's where most of its expertise stops. It is generally more flawed than modern langauges.

But ofcourse, programming languages are still just a tool. Also, don't hesitate trying out several languages before making your final choice on which to concentrate.

#19 Deranged   Members   -  Reputation: 606

Like
0Likes
Like

Posted 26 November 2010 - 12:42 AM

Quote:
Original post by menyo
C sharp + XNA, sounds very nice but costs money. I'm willing to pay money for a good package but i'd like to orientate some more before i use my money.

I think the best thing to do is stay a while with java, then decide if it will work for me. If not, no harm done and i will learn something else.


*Shoots a sideways glance at his C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0 folder* I'm not sure what has led you to that belief, but as far as I know, XNA is completely free to distribute commercial games with on the PC (so long as you don't make use of the live functionality?); At least, this is how it was in the past.

Furthermore, I believe the latest version of Visual Studio (2010) still has an express edition available for free download. I'm not sure about the legality of releasing commercial works compiled with the express edition of VS, but in any case you don't generally go from not knowing how to program at all to releasing the next MW2 so quickly that at some point in time you couldn't afford to upgrade to professional edition somewhere in between.

Now, when I first started learning to program over a decade ago, I had the same notion that I would be able to pick it up instantly and release a commercial masterpiece within a couple years. Little did I know, that with everything else in life it's a baby-stepped process. In the same field of logic, you don't go from not knowing how to walk to sprinting, you have to learn to: crawl, balance, walk, run, and then eventually you can do a full sprint. I'm 20 now, I work full time as a programmer (mostly C#), and I have yet to release the commercial masterpiece I always wanted :P. In any case, the persistent programmer never ceases to learn new ways of doing things. Technology is ever changing, and there is simply always something to learn about. That's the beauty of it (anyone remember when C# 3.0 came out with LINQ and anonymous types? Drool).. Anyways didn't mean to get off on a tangent there. I tend to do that.

I'm certainly not trying to discourage you though! I just don't want you to discount what I would consider the adequate choice in your case for the wrong reasons.

Casting my vote for C#, and I certainly hope you put a lot of research into what you're doing before you send yourself on a path that might negatively affect the course of your learning (not that Java would by any means, it's a perfectly fine language as well. No matter how I may feel about the current situation under Oracle's management).

Good luck!

EDIT: Updated with links.
Free XNA Game Studio 4.0 Download
Free Visual C# Express 2010 Download
Regards,
Sheridan Bulger
-Day Job | Software Developer | Deacom, Inc.
-Moonlighting | President (lead) | Nonpareil Studios, LLC.

#20 Beyond_Repair   Members   -  Reputation: 116

Like
0Likes
Like

Posted 26 November 2010 - 01:02 AM

Uh, depends who you are going to work for. C/C++ code bases are significant. Especially a factor in large, slow companies that in no way are going to say: "Let's rewrite our proven reliable C/C++ engine of X million lines of code to another [for that engine] unproven language". This is probably the biggest reason that C/C++ will continue to be huge game programming languages for many more years.

Note that it means that if programming a game on your own the above is much less relevant, and then the technical details of C vs C++ vs C# vs Java become more of an actual factor to consider. Not going to elaborate on that though; there are a 1000 threads on the subject for you to look up. :-)

If you want to finish a game, I'd recommend C# or Java.

However, if you want to eventually know all four languages, I'd recommend C++ as it is the by far the most difficult of them, and with C++0x (the newest version) most programming paradigms and twists you'll see in the others are represented in C++.

[Edited by - Beyond_Repair on November 26, 2010 7:02:21 AM]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS