View Full Version : .NET vs Java (game) development
Armor Nick
04-18-2007, 06:05 AM
Greetings everyone,
This is my first post here, so go easy on me ;) .
Anyway, I was wondering what your views are on .NET and Java development. I've read somewhere on this site that Java cannot be used for serious game development, but I've already found some really good Java games, and I learned Java because it's the only real way to make cross-platform programs (without recompiling on multiple computers).
I also like the .NET/Mono platform, however, because it can be used with many languages, among which C#. (On a side-note, C# was the second real language I ever learned. The first was Ruby, but I don't like that one very much.) Mono seems to have made the .NET platform cross-platform, and the Tao Framework has also made some good programming libraries for it.
So, what says ye, fellow (but more experienced) programmers?
How important is it that the actual binaries work on any platform?
I would be happy enough to write cross-platform code. That's one of the reasons I like SDL and wxWidgets.
TheNut
04-19-2007, 04:44 AM
Just a word of caution you might want to be careful with Mono. Not everything is the same so I wouldn't interchange between using .NET or Mono. If you use Mono, stick with it.
As for language, use what you like. Since you seem more familiar with Java, I would suggest you stick with it. In my opinion Mono and MS are screwing everything up with .NET. I personally wouldn't want to put myself in a rocky boat like that.
karligula
04-19-2007, 09:29 AM
The Nut...
Just curious, I have no opinion on the matter personally, but in what ways do you think Mono and Microsoft are screwing up .NET?
SamuraiCrow
04-19-2007, 01:44 PM
Python (http://python.org) and PyGame (http://pygame.org) will allow you to run cross-platform games as well. I prefer Python since it runs on more platforms than Java. You may also need PyOpenGL (http://pyopengl.sourceforge.net/) to do the 3d stuff with. Currently Python's a bit slower than Java so Java would be my second choice.
If you do go with .NET and Mono, please please PLEASE don't use DirectX. It isn't portable to anything other than Windows PCs and XBox series.
Anyway, I was wondering what your views are on .NET and Java development. I've read somewhere on this site that Java cannot be used for serious game development...
It really depends on what you'd call 'serious' game development. Pretty much every game that is somewhat performance critical is written in C or C++. But for tons of 'serious' casual games Java is really fine.
...and I learned Java because it's the only real way to make cross-platform programs (without recompiling on multiple computers).
Cross-platform doesn't strictly have anything to do with requiring a recompile or not. In fact, it means you can recompile the same code for different platforms. Java just offers you cross-platform without a recompile - or rather, it recompiles automatically at run time.
Anyway, why would it be any problem to recompile? You could just write cross-platform C/C++ code and offer multiple executable formats.
If you do go with .NET and Mono, please please PLEASE don't use DirectX. It isn't portable to anything other than Windows PCs and XBox series.
That's exaggerated (http://www.transgaming.com). ;)
dave_
04-19-2007, 03:17 PM
Nice self promotion ;)
juhnu
04-19-2007, 11:19 PM
Python (http://python.org)
If you do go with .NET and Mono, please please PLEASE don't use DirectX. It isn't portable to anything other than Windows PCs and XBox series.
Why should the low level graphics code be portable in the first place? Every platform has different feature set thus making it very unlikely one could use the same low level graphics code across different systems anyway - no matter which API you used. It's naivee to think that the graphics code would work directly, without any platform and vendor specific code in place. I can see it working in some simple demo, putting a gouraud-shaded cube on screen, but if you tried anything more interesting it wouldn't be that easy.
Therefore I don't see why one shouldn't use Direct3D when in real-world situations one should make a separate implementation for every platform anyway. It's not really a coincidence that most game developers are opting for D3D when developing software for Windows.
Armor Nick
04-20-2007, 12:26 AM
It really depends on what you'd call 'serious' game development. Pretty much every game that is somewhat performance critical is written in C or C++. But for tons of 'serious' casual games Java is really fine.
I take it you mean 3D? I don't write 3D, seeing as I've only just started programming. (And I find it stupid that people always want to make realistic 3D games. Games aren't supposed to be realistic.)
Cross-platform doesn't strictly have anything to do with requiring a recompile or not. In fact, it means you can recompile the same code for different platforms. Java just offers you cross-platform without a recompile - or rather, it recompiles automatically at run time.
I see your point. Recompiling offers you a way to make the program optimized for different platforms. But there is als the problem that DX9 and DX10 are not compatible. MS can be a real bitch at times. But I think I've got a few game engines (Blitz3D, yay!) who use DX7, which has proven to work on Vista.
Anyway, why would it be any problem to recompile? You could just write cross-platform C/C++ code and offer multiple executable formats.
I've read about that, but it involves using the commandline, and I don't know how to use the infamous DOS screen.
I've read about that, but it involves using the commandline, and I don't know how to use the infamous DOS screen.
You don't necessarily have to use the command line. Every platform has popular C/C++ compilers with graphical development environments.
But I don't think you should worry too much about cross-platform yet. If you're comfortable in Windows, just use the Visual Studio Express Edition for C++ or C#. Once you're ready for real commercial games you can broaden your horizon to other platforms. While still learning, sticking to one platform doesn't really hurt. Staying aware of cross-platform issues is a plus though.
Actually the language doesn't matter much either. Whatever works for you that is comfortable to work with should be fine. Remember to keep programming fun!
TheNut
04-20-2007, 04:43 AM
Just curious, I have no opinion on the matter personally, but in what ways do you think Mono and Microsoft are screwing up .NET?
Mono is supposed to shadow Microsoft's .NET architecture and implementation. Since Microsoft is continuously pouring more research and development into .NET, Mono has to quickly play catchup. Unfortunately they take shortcuts and things come out differently. The returned results are different, exceptions not being thrown in .NET are being thrown in Mono, code developed and compiled in Mono cannot be used in .NET and there's a high probability it won't compile in .NET either.
The .NET initiative was supposed to simplify things. Now we have the same problem web developers have with supporting multiple browsers. It's just an unnecessary mess. Microsoft is equally to blame for this because they should be working with Mono given their popularity (subcontract them) to ensure consistency with their .NET infrastructure.
SamuraiCrow
04-20-2007, 10:02 AM
@Armor Nick
I take it from your later post that you interpret cross-platform as meaning "able to run on different Windows versions" rather than "able to run on all operating systems". If you're doing Windows software then just say so. I am running Windows XP on my laptop but frown on anything that doesn't run properly on MacOSX, Linux, and other operating systems being called "cross-platform" when it isn't even close to being portable outside the Windows environment.
Why should the low level graphics code be portable in the first place?
I trust you are either joking, or never heard of OpenGL? it may not be 100% cross-platform, but 90% can go a long way. On PC you have a huge range of graphics cards to support anyway, and D3D will not prevent card-specific code from showing up.
juhnu
04-20-2007, 09:29 PM
I trust you are either joking, or never heard of OpenGL? it may not be 100% cross-platform, but 90% can go a long way. On PC you have a huge range of graphics cards to support anyway, and D3D will not prevent card-specific code from showing up.
If you read my post, I actually mention OpenGL there, don't I? :)
Anyway, if you wrote an OpenGL application on Windows, using let's say shadow buffers etc. and would try to run that on SGI, the changes are it wouldn't work - and nor would it work vice versa either. My point is that because of various extensions, different hardware features and not 100% perfect driver support, it's pretty hard to write truly cross-platform OpenGL code. Therefore I think one should design an engine so that the actual low level graphics implementation is totally hidden from the public API and implemented separately for each platform. In that case it wouldn't be so bad idea to use Direct3D on Windows.
If you read my post, I actually mention OpenGL there, don't I? :)
No you don't. :)
My point is that because of various extensions, different hardware features and not 100% perfect driver support, it's pretty hard to write truly cross-platform OpenGL code.
Hence my point about 90%. The percentage itself is meaningless, but all the code you don't rewrite is effort you can spend in other areas. Depending on your project and your requirements, this can be irrelevant, or a very significant benefit.
To rephrase my answer: it doesn't HAVE to be cross-platform, but it CAN be very useful if it is. OpenGL has survived against all odds precisely because of that.
Armor Nick
04-21-2007, 02:25 AM
You don't necessarily have to use the command line. Every platform has popular C/C++ compilers with graphical development environments.
Yes, I know, but I meant compiling a Linux binary on a windows computer.
But I don't think you should worry too much about cross-platform yet. If you're comfortable in Windows, just use the Visual Studio Express Edition for C++ or C#. Once you're ready for real commercial games you can broaden your horizon to other platforms. While still learning, sticking to one platform doesn't really hurt. Staying aware of cross-platform issues is a plus though.
Lol, I'm sticking to the Java platform then ;) .
Btw, I'm never going to make a commercial game, because I don't like paying for software either. I'm also a proud member of the Free Software Foundation.
@Armor Nick: I take it from your later post that you interpret cross-platform as meaning "able to run on different Windows versions" rather than "able to run on all operating systems". If you're doing Windows software then just say so. I am running Windows XP on my laptop but frown on anything that doesn't run properly on MacOSX, Linux, and other operating systems being called "cross-platform" when it isn't even close to being portable outside the Windows environment.
No, by cross-platform I meant different OS'es, not versions of Windows (although that also counts). I'm also running Windows XP, but I'd rather run Ubuntu. But my father doesn't want me to install it :( .
Btw, I've found a very good Java game engine that I'm going to use: http://www.g-java.com/ . It's not finished yet, though, so I'll have to wait for a while before I can start programming my game. Oh well, gives me some time to get better at Java.
SamuraiCrow
04-21-2007, 10:03 AM
Lol, I'm sticking to the Java platform then ;) .
Btw, I'm never going to make a commercial game, because I don't like paying for software either. I'm also a proud member of the Free Software Foundation.
Actually the Free Software Foundation doesn't prevent people/companies from charging for the service of writing software, it only means the source-code must be available to other developers.
No, by cross-platform I meant different OS'es, not versions of Windows (although that also counts). I'm also running Windows XP, but I'd rather run Ubuntu. But my father doesn't want me to install it :( .
Btw, I've found a very good Java game engine that I'm going to use: http://www.g-java.com/ . It's not finished yet, though, so I'll have to wait for a while before I can start programming my game. Oh well, gives me some time to get better at Java.
My laptop and desktop at home are running XP but I'm hoping to get back to AmigaOS 4 on my MicroA1-c soon. It's a lightweight PowerPC-based operating system, but, unfortunately, it has no Java runtime environment.
It does run Python, however. Also, Python is easier to learn than Java. It's been open-source longer than Java also. It also has a converter called Jython that will make it run on a Java Virtual Machine if you must do so to get that last ounce of performance out of the host system. If you want a cross-platform engine that will run Python, see the Panda3D website (http://panda3d.org).
juhnu
04-22-2007, 03:05 AM
No you don't. :)
Oh , You are right - It seems I generalized the sentence where it could have been mentioned :)
Hence my point about 90%. The percentage itself is meaningless, but all the code you don't rewrite is effort you can spend in other areas. Depending on your project and your requirements, this can be irrelevant, or a very significant benefit.
To rephrase my answer: it doesn't HAVE to be cross-platform, but it CAN be very useful if it is. OpenGL has survived against all odds precisely because of that.
It might also be a disadvantage to use OpenGL over a platform specific API so I guess there's no one single correct answer to that. It just depends how you weight pros and cons. The original comment I replied to, over-simplified the situation.
The original comment I replied to, over-simplified the situation.
That post was specifically about easy options for cross-platform development. If you are going with Python or Mono (as opposed to C++ or Visual Studio C#/.NET) then it's very likely that OpenGL will also work for you.
irrdev
05-04-2007, 08:52 AM
Mono is fairly good, but it has a ways to go. If it was finished, 100%, then I would say that .NET is generally a better platform than Java. The biggest problem with Mono is that currently 1.1 is almost finished while 2.0 is still underway. Meanwhile, Microsoft has already released .NET 3.0. I think that the Mono development team should stop work on 1.1 and 2.0 and now work on just 3.0. Why? Well, .NET 3.0 can run .NET 2.0 apps, with a lot of extra features, too. The biggest missing feature in Mono is currently in System.Windows.Forms. The listbox, textbox, toolbar, and menustrip controls are only partially completed. Overall, Mono isn't really ready for big development yet. I'd give 2-3 years and then I'd reconsider. :wink:
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.