Click to See Complete Forum and Search --> : C++ .NET Standard 2003 or C++ 6 Pro?
WMCoolmon
April 22nd, 2004, 09:35 PM
Recently, I lost access to the version of Visual C++ 6 I'd been using. After using 5.0 for a bit, it became obvious I couldn't use it for most of the projects I've been working on. And 6.0 has disappeared from all local stores.
One of these projects is an open-sourced game. Minor slowdowns would be acceptable, but severe ones wouldn't be. I've already heard one condemnation of .NET by a much more experienced game programmer, so I was wondering how well the optimizer would work compared to 6 Pro.
darwen
April 23rd, 2004, 10:58 PM
.NET standard (in any of its flavours) doesn't come with an optimising compiler - you need .NET professional for that.
However, if you're using Visual C++.NET then you don't have to write in managed code - i.e. .NET code. You can still write ordinary C++ (i.e. native code) without compiling up into .NET.
I really suggest you look up the differences between managed and unmanaged code since it's pretty obvious you don't know the difference. Have a look on the Microsoft site and MSDN - there are a huge amount of resources on this very subject and how .NET is compiled into an intermediate language and then interpreted.
Darwen.
TheCPUWizard
April 23rd, 2004, 11:20 PM
I am not sure that the standard edition even produces optimized un-managed code......
note: after writing this post, I noticed that the OP was specifically concerned with "gaming aspects". Most of this post relates to all environments, but was intended at general business programming tasks, so there are some points wich are not 100% valid for the high level intensity of the graphics engine, but this can (should be?) distinct from the remainder of the game as an entire application in any case.
There has been much discussion about performance in the .NET environment (mainly in the managed area). The most claims are valid: those that praise it and those that condemn it.
For those old enough to remember, there was a time when "O-O" code was considered to be significantly slower that "Structured" code. This is a very similar situation.
There are two main items that impact performance:
First the inherent abilities of the compiler. Being that .Net is currently at 1.1 while MS has had 6 (actually more) chances at producing a high perfomance C++ compiler, it is no suprise that there will be some issues at this level.
The second cause is programmers who do not implement things "properly" under the .NET environment. My experience has shown this to be quite common.
Few programmers make proper use of the available features that are either part of the CLR, OS, or Enterprise Level Services. While it is quite natural for people to code in the style they are comfortable with, it simply does not provide optimal results.
If you are going to convert a significant application into a managed .NET application, I strongly advise that the overall architecture be carefully reviewed and then re-implemented using all of the available tools [Microsoft HATES when I denegrate the ability to do "line-ny-line" conversions :D ]
WMCoolmon
April 24th, 2004, 02:00 AM
Well, I'm mostly concerned with how well it handles normal C++ (unmanaged code, yes?) rather than new .NET stuff. Though it'd be nice to have it available, I don't know if I'll ever have reason to read up on it and switch to it.
If it doesn't do any code optimizing, though...hmm...
Zaccheus
April 24th, 2004, 05:36 AM
Visual C++ 2003 (i.e. VC.net) is very very close to being a fully ISO/ANSI compliant C++ compiler, much much better than VC6 (which is nowhere near being ANSI compliant).
So if you are concerned about how it handles C++, go with the newest one.
Also, do you actually need the optimiser? What kind of code are you planning to write? In your game code, you could make sure that the code that you actually write is fairly optimised.
My only concern would be if the compiler didn't do inlining.
Finally, you could implement and debug your code using Visual C++ 2003 Standard, and then compile the time critical code into a DLL using the free Visual C++ 2003 Toolkit, which contains Visual C++ Professional 2003's optimising command line compiler.
TheCPUWizard
April 24th, 2004, 08:19 AM
Zaccheus makes a great point. The command line compile that is available from the SDK is completely optimizing. In fact I know a number of people with severely limited budgets that only use the Free SDK.
WMCoolmon
April 24th, 2004, 01:16 PM
The game code is essentially that used in Freespace 2, with some improvements. Basically, one of the employees at Volition eventually got the OK to release the game code, and since then the community's been adding on many new graphical features and bugfixes. However, it's got all the signs of being written with a time limit. It's also over 100,000 lines of code and is mainly written in C, with a bit of C++ here and there.
I'm pretty sure I read somewhere that it does inlining, at least user-defined inlining. This SDK looks like it could be what I'm looking for. :)
WMCoolmon
April 28th, 2004, 08:40 PM
With a few hundred lines of changes, I managed to get the code working (w/ the optimizing compiler) and have installed .NET.
Thanks guys! :)
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.