Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  Programming language decisions  (Read 6103 times)
0 Members and 1 Guest are viewing this topic.
Offline tackman

Senior Newbie





« Posted 2012-01-11 18:32:21 »

Hello citizens of JGO!

I know it might be a rather odd question on a Java Gaming Forum, but please bear with me.

I'm in the process of trying to decide which language to use to create games. The candidates are Java, C++ and C#. Why these? Well...

To me, Java is an all-rounder, a WORA (Write Once Run Anywhere) type of language, which makes you, the programmer, able to write a single source code and just take it to windows, linux, osx, android, iphone, and so on.

To me, C++ is the standard when it comes to programming. Even though my knowledge in C++ is the worst of the three mentioned.

To me, C# is a mix of Java and C++, bringing best of both worlds together. However, you can only write code on Windows, which is kind of a let down.

What pros / cons can you list to these? Why would you use them or not use them? Bear in mind, my goal is to build a game (finally start to build one, at least), and more often than not do that on a linux. (I know, this sort of rules out C#, but I would use windows only for that..)

Comments?
Offline pitbuller
« Reply #1 - Posted 2012-01-11 18:49:07 »

C++ is most demanding and you have least knowledge of it. So that rule it out.

Many have said that C# bindings to openGL is 20% slower than Java have(lwjgl/jogl) but maybe that does not matter much.

So it's about flawor more than anything else. If you want use Unity then C# have some edge but otherwise I would prefer Java becouse of tools.
Offline theagentd
« Reply #2 - Posted 2012-01-11 18:51:01 »

 - Performance doesn't matter. If anything, the (marginally?) better performance of C++ just allows you to get away with worse code and algorithms. I once had a C++ teacher who told me that a slow O(n^2) sorting algorithm was okay in C++ because the language was so fast. He was an idiot.
 - In my opinion C++ is too  low-level for games. Any decently programmed (advanced 3D) game should be GPU-limited anyway, and you can use the exact same graphics library from all 3 languages (OpenGL). In C++ you end up doing lots of non-gamey stuff like memory management, e.t.c and have a harder time debugging pointers e.t.c. Also, C++ coders all have broken Caps Lock buttons.
 - Can't say much about C# other than that it only runs on Windows. There's no argument for it, but also not much argument against it. Well, XNA is having development problems if I remember correctly, but I don't follow those news very closely...

In the end, I'd say Java. I wouldn't be on this forum if I didn't say Java, but in the end the language you choose matters very little to how you improve as a programmer (assuming that is your goal).

Myomyomyo.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline R.D.

Senior Member


Medals: 2
Projects: 1


"For the last time, Hats ARE Awesome"


« Reply #3 - Posted 2012-01-11 18:54:06 »

I go with theagentd xD I mean... Of course most of us will say Java. Go to a C++ Forum and most people will say c++ of course (can't understand those people, but whatever [even a friend which is highly skilled in c++, says that he hates the language xD])
Offline kevglass

JGO Kernel


Medals: 164
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #4 - Posted 2012-01-11 18:57:33 »

Java doesn't go to the iPhone, infact it doesn't go anywhere apart from the desktop without issues - and even there it can be a bit irritating.

C++ isn't really the standard. C is the standard. If you check out the programming language statistics (http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html) you'll see Java is actually the most used and most "standard".

C# goes to XBox which is a big win. With Mono it goes to Linux, OSX and iPhone. It's a good language but will always be trying to be Java. Which it's not.

On this forum you're generally get told to use Java. However, there isn't really a massive difference between them all. Pick one you like and focus on writing the games.

Cheers,

Kev

Online Cero
« Reply #5 - Posted 2012-01-11 19:23:13 »

I can only tell you my reasons for choosing Java.

I have the most skills and experience in java - biggest factor
C++ is quite old, full of shit and convoluted to say the least
C# is a microsoft standard - I might as well program games that only work on microsoft silverlight

also java games work without as much effort on at least 3 platforms

and performance, well, Server JVM is, once started, in many cases faster than C++

XNA is interesting, because its the easiest way of getting your game to a console - but I would only go so far as to port it, not write it exclusively for it

the only reason C++ is still so big, is that old established standards die slowly, just like Windows

Offline tackman

Senior Newbie





« Reply #6 - Posted 2012-01-11 19:57:29 »

Thanks for all of your views!

Don't get me wrong, I knew that many (if not all) of you will reccommend java, but you took the time and explained your thoughts on all the three languages I asked you about, which is a great help in itself.

It helps me, someone who doesn't fully understand either of them to get some info from experienced programmers and root out the misinformations I might have about them.

I think I will stay with java. The amount of (unreadable) code it takes to just create a window with C++ is making me want to never sit in front of a computer ever again, and C# is too constricted (to Windows, xbox and windows phone) for my taste.

This goes out to all of you.


Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #7 - Posted 2012-01-11 22:15:11 »

At the start, for your first game. I would stick with what you know best. You will get more done faster and not be bogged down with learning new details. Your biggest enemy is not finishing anyway.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2012-01-11 22:55:46 »

Awww my hand was bigger than that hand! Cry

Java all the way. I'm using C# at school and it sucks. The API is pathetic and XNA sucks. The only good thing about it is the "properties" syntax and the option to pass by reference.

Offline PaulCunningham

Junior Member


Medals: 2



« Reply #9 - Posted 2012-01-12 09:42:59 »

The tools are free for them all so download them and have a play with each one. Don't get caught in the trap of being a one language guy / language evangelist.  There's good and bad in all of them no matter what anybody tells you.

As per Kev's reply, the days of C# being Windows only are long gone. And XNA, most definitely, doesn't suck.

There's also game maker applications / frameworks (GameMaker, Unity, etc) that may be a better option if you just want to get games finished.

What sort of stuff do you want to write and what devices do you want to target? Answering that may help you decide which option to go for - at least initially anyway.


Oh, and Hi - first post :-)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2012-01-12 09:45:42 »

Hi Paul Cheesy I wondered when you were going to turn up!

Paul is being assimilated into Puppygames, though he doesn't realise it yet. Resistance is futile!

Cas Smiley

Offline PaulCunningham

Junior Member


Medals: 2



« Reply #11 - Posted 2012-01-12 10:01:16 »

 Grin

I'm not resisting very hard though am I!
Offline gouessej
« Reply #12 - Posted 2012-01-12 10:15:56 »

C# goes to XBox which is a big win. With Mono it goes to Linux, OSX and iPhone. It's a good language but will always be trying to be Java. Which it's not.
Mono .NET implementation differs from Microsoft .NET implementation. Mono is reliable but don't expect something comparable with Java, look at this:
http://codebetter.com/patricksmacchia/2009/01/19/mono-vs-net-framework-public-api-compatibility/

@pitbuller you're too kind with OpenTk and Tao Framework, their performances are even worse than that  Grin

The best compromise is Java except if you really want to use ios. Has someone tested in-the-box and ispectrum open?

Offline PaulCunningham

Junior Member


Medals: 2



« Reply #13 - Posted 2012-01-12 10:29:42 »

Mono .NET implementation differs from Microsoft .NET implementation. Mono is reliable but don't expect something comparable with Java, look at this:
http://codebetter.com/patricksmacchia/2009/01/19/mono-vs-net-framework-public-api-compatibility/

"Posted by Patrick Smacchia on January 19, 2009". Used an older version of Mono too.

There's also the MoMA tool: http://www.mono-project.com/Moma

In Java land, I've had a few folks recommend Slick as a decent framework.

 
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #14 - Posted 2012-01-12 10:33:40 »

C# is also the basic language for Unity is it not?

My 2p on the whole matter:

Java: great - really great - for desktop development, and Android development too. There's precious little money in Android though, and desktop money is extraordinarily hard to come by. Android performance lame.
C#: great for XBox tinkering (only tinkering though - XBLIG is basically a cesspit of dross and zero marketing effort, and your chances or making money here are next-to-zero). XNA was good once upon a time but according to various sources is now not-so-good and anyway really only achieves what various other frameworks achieve, no great shakes. Performance often severely lacking compared to Java. C# on Mono stretches deployment to various other targets but again performance is lame.
C++: run anywhere at high speed, with a reasonable amount of hair loss. Rest assured you can do it, but it takes a fair bit longer to get stuff working.

Cas Smiley

Offline PaulCunningham

Junior Member


Medals: 2



« Reply #15 - Posted 2012-01-12 11:15:09 »

C# is also the basic language for Unity is it not?

C#, Boo, Javascript - core engine is C++ I believe.

Java: great - really great - for desktop development, and Android development too. There's precious little money in Android though, and desktop money is extraordinarily hard to come by. Android performance lame.

Well, you've constantly proved that you can write great games using Java :-)

C#: great for XBox tinkering (only tinkering though - XBLIG is basically a cesspit of dross and zero marketing effort, and your chances or making money here are next-to-zero). XNA was good once upon a time but according to various sources is now not-so-good and anyway really only achieves what various other frameworks achieve, no great shakes.

Agree 100% - Microsoft really, really dropped the ball with Xbox Live Indie Games. Use for fun / hobby projects. Still, it's awesome to see your games running on your Xbox. Big smiles there. And you never know, you could get lucky (Fortress Craft or the Dishwasher guy). Only way for most devs to write code for it though unless you miraculously manage to get on XBLA (although would you really want to do XBLA certification *shudder*)

XNA 4.0 is brill - they did a great job of tidying up all the crud. Not sure why people think they broke it - Well, actually I do. Most folks don't realise there are 2 profiles in XNA; Reach and HiDef. And as Reach is the default they assume all the fancy shadery goodness has been nerfed so they could target the Phone. They didn't. They made the reach profile robust enough to hit a wide range of hardware and fix up all various driver problems.

Desktop deployment is sucky though.

Performance often severely lacking compared to Java. C# on Mono stretches deployment to various other targets but again performance is lame.

But Java isn't available on the Xbox so no worthwhile comparison can be made. It's the cheap ass Compact Framework they used that is the reason for 95% of the performance problems. If they have built a framework specifically for the console it would fly. And the in order CPUs don't like the branch heavy code the CF jitter produces.

C++: run anywhere at high speed, with a reasonable amount of hair loss. Rest assured you can do it, but it takes a fair bit longer to get stuff working.

C++11 may take away a lot of the 'pain' of traditional C++ but having not used I couldn't really comment.


Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #16 - Posted 2012-01-12 11:44:50 »

I am watching C++11 with great interest.

Could it really be the case they've made C++.... good?

Cas Smiley

Offline thaaks

Junior Member


Medals: 1
Projects: 1



« Reply #17 - Posted 2012-01-12 12:19:02 »

Could it really be the case they've made C++.... good?
As long as source code is separated in header and source files it simply can't be good  Grin

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #18 - Posted 2012-01-12 12:26:19 »

I am watching C++11 with great interest.

Could it really be the case they've made C++.... good?

Cas Smiley

No, they've made a kracken by nailing legs to an octopus.

More seriously, no because they've failed to address any of the core problems that make it such a pain to work with. Largely because they're sticking with being backwards compatible so they've *still* got a very hairy and hard to parse syntax that's ambiguous unless you take the *whole* program into account. And then they've bolted on a bunch of extra syntax and overloaded existing keywords so they do completely different things based on new context.

The compile model will still be the same, so compile times will still suck. Unless you're really careful with how you structure *all* of your code, your compile times will still really suck.

The additions to the standard library are much better, but then that's because they're all really basic things that either should have been in in the first place (smart pointers) or should have been added ages ago (threading). And by now everyone has already rolled their own or uses Boost.

Oh, and it'll take a couple of years before gcc and MS have actually implemented it properly, and a few years after that that we can actually call it widespread enough to be actually used and drop support for pre-C++0x compilers.

So frankly I don't think it's going to set the world on fire.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline tackman

Senior Newbie





« Reply #19 - Posted 2012-01-12 12:40:09 »

Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;

Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?

edit: or avoid completely?
Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #20 - Posted 2012-01-12 12:52:03 »

Make sure you learn how to create applets as you will get a ton more feedback from the community if you provide your game like that.

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #21 - Posted 2012-01-12 12:56:25 »

And i would say, forget getting applets to work... they sux! Cheesy

I have no special talents. I am only passionately curious.--Albert Einstein
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 798
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #22 - Posted 2012-01-12 13:18:07 »

Applets are great to share your works with developers.

Applets are horrible to commercially depend upon => ship your own JRE as part of your standalone application.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Grunnt

JGO Wizard


Medals: 68
Projects: 8
Exp: 5 years


Complex != complicated


« Reply #23 - Posted 2012-01-12 13:26:43 »

Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;

Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?

edit: or avoid completely?

Classpaths can be a real pain with Java... So figuring out how classpaths exactly work will prove extremely useful in the long term.

On the topic of choosing a programming language: I can program in assembly, C, C++, functional languages, C#, Python, Java, and some other languages that I forgot, and I tried to make games in some of these (most notably C, C# and Java), but Java is the first language I actually finished programming a game in. I think that's by far the most important selection criterium when you're starting out: choose a language that you will actually finish a game in. That rules out C/C++ as far as I'm concerned, since it simply takes much, much longer to get things done (unless you're a real pro at the language I guess, but even then). C# is quite possible, but you must like Microsoft / .NET and their approach to doing things. Also, once you have experience in game development I guess it's not that hard to switch to a different language..

Offline Mike

JGO Wizard


Medals: 76
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #24 - Posted 2012-01-12 13:50:33 »

Applets are great to share your works with developers.

Applets are horrible to commercially depend upon => ship your own JRE as part of your standalone application.

This.

Applets are causing lots of issues if you are going to try to make money on the project, but you get at least ten times as much comments if you put an applet up for us (or any other forum) to test instead of giving a download link.

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline gouessej
« Reply #25 - Posted 2012-01-12 14:04:36 »

Mono .NET implementation differs from Microsoft .NET implementation. Mono is reliable but don't expect something comparable with Java, look at this:
http://codebetter.com/patricksmacchia/2009/01/19/mono-vs-net-framework-public-api-compatibility/

"Posted by Patrick Smacchia on January 19, 2009". Used an older version of Mono too.

There's also the MoMA tool: http://www.mono-project.com/Moma
There is no need of an equivalent of MoMa with Java, do you see the difference?

Offline gouessej
« Reply #26 - Posted 2012-01-12 14:12:23 »

Again, I thank you all for your comments. I have one more question to ask you, just to derail a little;

Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?

edit: or avoid completely?
I advise you to avoid autoboxing because it is quite easy to create very buggy things with them, particularily when you use them with ternary operators. Use applets with care as some browsers have a real poor support of them.

Offline sproingie

JGO Kernel


Medals: 202



« Reply #27 - Posted 2012-01-12 15:37:14 »

Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?

Oh how I could go on, but I think my primary gripe is an overall lack of expressiveness combined with a marketing effort that successfully convinced the larger community that this was a great feature and how none of us were worthy of wielding actual power in our language constructs.  Java as a platform, I love.  Java the language is the C of the JVM.

Ok, as for features you should avoid?  downcasting, unless it's absolutely positively necessary.  That goes double for instanceof.  Reflection, if it's used to "get around" static typing when a better design would suffice.    Manual use of threads and locks (use java.util.concurrent and concurrent collections instead).  RMI.  Use of serialization as a wire protocol or storage format (except for caches).   Using inheritance when composition will do.  Array covariance.  
Online Cero
« Reply #28 - Posted 2012-01-12 15:49:01 »

Is there something in java that you personally don't like, or hate, for that matter? Something I should be vary of, invest learning in the beginning, and so on?

actually you know what I like more in C++. You can say: ok this is a pointer String*
you are always sure in C++ what is a pointer and what not, while in java technically everything is a pointer and it can get hard to keep up in situations - of course this only depends on how you implements stuff

java puzzlers is a nice showcase of what to avoid

Offline sproingie

JGO Kernel


Medals: 202



« Reply #29 - Posted 2012-01-12 15:55:59 »

you are always sure in C++ what is a pointer and what not,

The proliferation of "smart pointer" classes in C++ has led me to the complete opposite conclusion.  To say nothing of references, which have pointer semantics sometimes, value semantics other times, and act like plain old aliased names yet other times.
Pages: [1] 2 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (78 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (58 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (35 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!