Originally posted by: zephyrprime
If you want to use any DirectX, you should avoid C and use C++ or some other object oriented language. Although it's possible to make programs in C for windows, Windows API's really assume that you're using something that has the OO abilities of C++.
By the way, making even a small game is not at all easy. You should look into using a game API if you're really intested in this.
Originally posted by: singh
Most game tutorials/books on the Windows platform will be for a Visual Studio user. You will have to jump through a lot of hoops to work with other compilers.
Originally posted by: Apathetic
Actually, the Win32 API wouldn't know what to do with a C++ class/object. All the APIs were written in C and assumed C (or something that can generate a C style function call) would be used.
Dave
Originally posted by: jediknight
Why anyone would program games in Java or VB is beyond comprehension.. unless you're doing a card game or something, performance is just not there.
C# may be a bit better (havn't tried), because it compiles to a native executable the first time you run the program..
I guess for small projects it's OK.. but it really doesn't scale well if you want to do anything of any signficance.Originally posted by: MrChad
That's not true at all. In fact, for a game as simple as the original poster is describing (2D, SNES-style graphics), I can't imagine why you would go through the trouble of learning MFC/Win32 API/DirectX. Swing is far more intuitive and can produce some impressive results.
Java's reputation as a slow performer is outdated. Java Virtual Machines have been performing well for years now.
As I understand it from a presentation on .NET a year or two ago I attended (maybe out of date by now..), when you compile to .NET, it generates MSIL bytecodes. When you run the program, the IL is compiled into an executable. The devil is in the details, though, and I might have missed something..C# does not compile into a native executable the first time you run it. A C# executable is actually .NET byte code that requires the .NET Framework to manage and execute it.
Originally posted by: jediknight
I guess for small projects it's OK.. but it really doesn't scale well if you want to do anything of any signficance.Originally posted by: MrChad
That's not true at all. In fact, for a game as simple as the original poster is describing (2D, SNES-style graphics), I can't imagine why you would go through the trouble of learning MFC/Win32 API/DirectX. Swing is far more intuitive and can produce some impressive results.
Java's reputation as a slow performer is outdated. Java Virtual Machines have been performing well for years now.
As I understand it from a presentation on .NET a year or two ago I attended (maybe out of date by now..), when you compile to .NET, it generates MSIL bytecodes. When you run the program, the IL is compiled into an executable. The devil is in the details, though, and I might have missed something..C# does not compile into a native executable the first time you run it. A C# executable is actually .NET byte code that requires the .NET Framework to manage and execute it.
Originally posted by: Kilrsat
Now that we have that out of the way, yes java applications can scale just fine. Just like any large project, if you actually use your brain while developing it, the end product will come out quite nice. There are some more advanced techniques to allow java applications to scale, and no, your "Learn Java in 24 Hours" book won't cover them. Things like object-pooling instead of always creating objects, thread-pooling vs. 8 billion worker threads, and understanding the swing event model all play key rolls in how your large java application behaves. Given that you don't think java scales well, I doubt you are familiar with most of these techniques.
Intelligent code will always beat sloppy code, regardless of language.
Originally posted by: Chaotic42
Originally posted by: Jeraden
There's a free C# ide called SharpDevelop:
http://www.icsharpcode.net/OpenSource/SD/
Download that, the .net SDK, and the DirectX sdk for C# and you are all set to go and doesn't cost you a thing.
So I'd have to install .net, learn C#, and then get everyone that will use the program to install .net? That sounds like a bit of work. Also, keep in mind that one person uses a 333 Celeron with Win98.
I don't know anything about DirectX, but Windows API is fine with C. If you're going to use any class library though, it would help a bit with some C++.Originally posted by: zephyrprime
If you want to use any DirectX, you should avoid C and use C++ or some other object oriented language. Although it's possible to make programs in C for windows, Windows API's really assume that you're using something that has the OO abilities of C++.
By the way, making even a small game is not at all easy. You should look into using a game API if you're really intested in this.
Originally posted by: jediknight
Originally posted by: Kilrsat
Now that we have that out of the way, yes java applications can scale just fine. Just like any large project, if you actually use your brain while developing it, the end product will come out quite nice. There are some more advanced techniques to allow java applications to scale, and no, your "Learn Java in 24 Hours" book won't cover them. Things like object-pooling instead of always creating objects, thread-pooling vs. 8 billion worker threads, and understanding the swing event model all play key rolls in how your large java application behaves. Given that you don't think java scales well, I doubt you are familiar with most of these techniques.
Intelligent code will always beat sloppy code, regardless of language.
That is, of course, very true. Personally, I'm much more into C++ programming (I find some of the "Sun knows best" features/exclusion of features in Java quite restrictive and annoying..).. So, for performance, I can only go by what I know of in terms of real world examples of significant applications.
This isn't exactly an apples-to-apples comparison (I don't even have any real hard data), so this might be questionable.. but I'll go ahead with it anyway. Let's compare a few pieces of software, written in Java vs. C++, and see the performance difference.
1) Star Office (older version of ~1-2 years ago - I don't know how well it performs now) vs. Microsoft Office
SO runs quite a bit slower than MS Office, in my experience.
2) Sun ONE Studio vs. Microsoft Visual Studio
Again, the Java program runs quite a bit slower (VERY noticable on my rather slow machine), and is more resource intensive.
This isn't really a persuasive argument, I'll admit.. but I can't go much farther without going into a lot more detail about language features, etc (of which I'm liable to make a few errors/omissions)..
Originally posted by: Kilrsat
Star Office isn't written in Java. So you're saying one C++ app is slower than another C++ app. Thanks for proving my point that intelligent code will win regardless of language.
You're on a slippery slope when you make such blanket generalizations.Originally posted by: jediknight
Originally posted by: Kilrsat
Star Office isn't written in Java. So you're saying one C++ app is slower than another C++ app. Thanks for proving my point that intelligent code will win regardless of language.
Hmm. I guess you're right on that one. I could have sworn SO was written in Java at some point in time, which was why Sun bought it.
I was never trying to say that well written, intelligent code will lose.. my point was, C/C++ gives more flexibility to the programmer to optimize their code than Java does.. and hence, well written, optimized C++ code will probably run faster than well written, optimized Java code.
By the way, making even a small game is not at all easy.
I think we're talking about greater performance gains than just 10%, in certain areas. And yes, there is a tradeoff between robustness and efficiency of code.. but in C++ you have the choice, while in Java, oftentimes you do not. That doesn't mean you optimize the whole program, and to hell with robustness.. you profile, and optimize the 20% of the code that gets executed 80% of the time (the 80-20 rule).Originally posted by: manly
Also, if high-quality C++ code is only 10% faster than high quality Java code, what really is your point? Most people believe that writing high-quality, robust C++ code isn't easy to achieve.