• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
menyo

[java] Java overtaking C in game development?

38 posts in this topic

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?
0

Share this post


Link to post
Share on other sites
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...
0

Share this post


Link to post
Share on other sites
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.
1

Share this post


Link to post
Share on other sites
AFAIK Android doesn't really use Java, it uses Dalvik. This is the reason Google was sued by Oracle.
0

Share this post


Link to post
Share on other sites
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#.
2

Share this post


Link to post
Share on other sites
It depends on what definition of Java is used ;) It uses the java language, but does not have the same standard library AFAIK.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites
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? )

0

Share this post


Link to post
Share on other sites
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!
1

Share this post


Link to post
Share on other sites
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#.
0

Share this post


Link to post
Share on other sites
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 :)
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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)
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
1

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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]
0

Share this post


Link to post
Share on other sites
Lol,

I just started to understand java, had my first experience with running static animations fullscreen. Didn't took me that long to understand though :D.

Anyway, i will download visual studio express and XNA and start on C. Are there any recommended video tutorials on this? I like vid tutorials to get familiar with the language and you MUST rewrite the code instead of copy/paste. I can look for them myself but i'm at work and most sites are blocked (surprised this one works :D). And there must be a favorite tutorial series right? Any books you guys recommand?
0

Share this post


Link to post
Share on other sites
Quote:

With the C language i ment C in general, i did't know they where that different from eachother.

They are considerably different from each other, but they share their syntactic roots in C. An analogy might be how the different European languages are based on Latin. To say "C in general" doesn't really have meaning in the context of these languages.

C# + XNA does not cost money - unless you want to deploy on the XBox. You are free to develop using a PC.

Other than that I would say that your attitude seems good, that will count for more than your choice of language.

Quote:

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.

Its perfectly legal. Microsoft want developers to write cool programs for their platforms. The professional edition just has more features, really.
0

Share this post


Link to post
Share on other sites
Downloading VS express and XNA now... i guess this threat isn't in the relative topic anymore. I'll just let it die and create a new one as soon as i am in need of more guidence by you guys.

Thanks a lot for sending me on the right path. And i actually do like the feeling of knowing the basics of Java!
0

Share this post


Link to post
Share on other sites
Quote:
Original post by menyo
Downloading VS express and XNA now... i guess this threat isn't in the relative topic anymore. I'll just let it die and create a new one as soon as i am in need of more guidence by you guys.

Thanks a lot for sending me on the right path. And i actually do like the feeling of knowing the basics of Java!


As well you should. Starting off it's actually a pretty good idea to see what a lot of the major choices in languages have in common with eachother. It helps with learning general programming theory. Just make sure that while you're learning you really try to learn each tool you use as in depth as you possibly can. Try to look at ways to solve the same problem programatically from many different angles, also.

Good luck again!
0

Share this post


Link to post
Share on other sites
Most of mobile phones that is made todays , are equiped with Java ME . If you learn Java , you can sold your Java games to about 4 milliard mobile phone users . It is a very good market . There are many books that teaches Java . But if you are a self thouth programmer , I suggest Deitel book .
Java How to Program by Deitel from Prentice Hall

But if you want to develop games for PCs and consoles , I suggest C++

C is old and is good for virus programming and compiler and OS programming
C# is a very bad choice and only has a very huge prpaganda from Microsoft .
0

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  
Followers 0