Sign in to follow this  
f001error

Which flavour of c++ for windas game dev ?

Recommended Posts

G'day I'm trying to decide which flavour of c++ is best for windows game development. I've heard the Visual Studio 2003 toolkit complier (same complier as MSVC 2003) spits out better binaries than the MSVC 6.0 complier. However, reading up on MSVC 2003 it seems to be a .net complier. From what I've heard the .net version of c++ is like using java; you lose memory control, get slowed down by garbidge collection and write to a VM, not to the hardware. I've also heard c++.net is like learning a new langauge - something I dont want to do since I know how to write c++ 6.0 code. I was hoping the MSVC 2003 complier would support good old normal c++, but couldnt find any mention of it, only .net. Is it like a hiddern feature, or something ? Given that I want to develop a windows game in c++ (not .net), which complier is better ?

Share this post


Link to post
Share on other sites
Erm. You need to do a bit more reading/browsing/whatever. There are no such things as 'flavours' or 'versions' of C++. It's a language. What there are, are different compilers that will produce machine readable output from C++ source code. There is no such thing as a compiler that makes .NET code from C++. .Net is a platform for C#, and has little to nothing to do with C++, IIRC. All MSVC versions (well, I haven't tried < 6, but they should as well) compile C++ and have built-in support for it. The MSVC 2003 compiler makes better machine code because it is more standards compliant, has a better optimizer, etc. For a good compiler, just go with whatever the latest offer is from microsoft, you can't go wrong with them, MSVC 6 aside [grin]

Share this post


Link to post
Share on other sites
Quote:
Original post by SirLuthor
.Net is a platform for C#, and has little to nothing to do with C++


.Net is a platform for all languages Microsoft currently makes compilers for. Managed C++, C#, Visual Basic, J#...

To make .Net code with C++ you have to learn the managed extensions (which, compared to the entirety of C++, are relatively little to learn, yet still fills books...), and turn on the CLR compiling (If you use managed extensions and don't have CLR turned on, the compiler will tell you what you need to do). However, even if you have CLR turned on you can write native code where you get complete control of memory within that code, you can insert asm, etc. It will still write to the Virtual Machine, though.

However, if you leave CLR off you will get your native machine code binaries.


You can get the Visual C++ 2005 Express Beta for free, and I personally don't see a need to get 2003 since 2005 is coming out eventually (Sometime in 2005 please?)

Share this post


Link to post
Share on other sites
Quote:
Original post by SirLuthor
Erm. You need to do a bit more reading/browsing/whatever. There are no such things as 'flavours' or 'versions' of C++.


Unless you count prestandard, standard, and managed.

Prestandard is to be avoided, managed... well, let's just say there's better GCed languages... and standard, well, standard has it's advantages and disadvantages just like anything else :-).

Microsoft's .NET compilers should be able to compile both managed and unmanaged code just fine, no need to pick between the two.

Share this post


Link to post
Share on other sites
I've tried codeblocks and dev-c++ and couldnt get them to work properly. dev-c++ was buggy. Code::blocks was nice, although when i used the M/S toolkit complier i got stupid warnnings, and sometimes it wouldnt even complie code that worked on MSVC 6.

Share this post


Link to post
Share on other sites
Quote:
Original post by zedzeek
Quote:
You can get the Visual C++ 2005 Express Beta for free

does it come with a debugger?


Yes. The complete IDE and build environment is included. I don't think you could really do anything of any complexity without a debugger. The only differance I've noticed between standard and express (comparing standard 2k3 and express 2k5) are that there are far fewer project wizards and no external tools. There are 2 wizards that I miss: DLLs and Native Windows. You can still do both easily enough; you just go into project settings. It's just an extra step.

Just keep in mind it's a beta.

Share this post


Link to post
Share on other sites
Quote:
Original post by f001error
I've tried codeblocks and dev-c++ and couldnt get them to work properly. dev-c++ was buggy. Code::blocks was nice, although when i used the M/S toolkit complier i got stupid warnnings, and sometimes it wouldnt even complie code that worked on MSVC 6.


Code does not "work" on MSVC6.

The VC++6 compiler was made before the C++ standard, so it compiles a language that's not C++. It has weak template support, a terrible std library, and doesn't even put its functions in the right namespace.

Also, warning are very rarely "stupid." If even the compiler can tell you there's something wrong, it's usually right. One of the points in _C++_Coding_Standards_ is that you should have your code compile cleanly--no warnings at all--at the highest warning level your compiler has.

Share this post


Link to post
Share on other sites
Quote:
Original post by snk_kid
VS 2k5 .NET was released last week for MSDN subscribers, it's been released else where from today in San Francisco.

Really? Cool. That means the beta's going to die pretty quickly and we'll have to actually get the full version. But I can't find it at any commercial websites, except Amazon says it'll be released on the 28th.

Share this post


Link to post
Share on other sites
Quote:
Original post by Erzengeldeslichtes
However, even if you have CLR turned on you can write native code where you get complete control of memory within that code, you can insert asm, etc. It will still write to the Virtual Machine, though.

However, if you leave CLR off you will get your native machine code binaries.


So how much does that virtual machine impact things? Do I lose a level of control with managed C++ if I am used to programming with C++. I also will occassionally insert some asm here and there. Does managed C++ abstract to a higher level than C++ or does it just add some functionality on top of regular C++ along with the VM, garbage collection ,etc.?

Share this post


Link to post
Share on other sites
Quote:
Code::blocks was nice, although when i used the M/S toolkit complier i got stupid warnnings, and sometimes it wouldnt even complie code that worked on MSVC 6.
That sounds like an issue with MS's compiler. You can expect modern compilers to reject code that worked with MSVC 6.

Quote:

So how much does that virtual machine impact things? Do I lose a level of control with managed C++ if I am used to programming with C++. I also will occassionally insert some asm here and there. Does managed C++ abstract to a higher level than C++ or does it just add some functionality on top of regular C++ along with the VM, garbage collection ,etc.?

You don't lose any control with MC++. Classes and arrays aren't managed unless you declare them to be. MC++ is compiled into a mix of bytecode and x86 native. Getting data to and from managed sections can be a pain, though.

[Edited by - igni ferroque on November 7, 2005 9:51:35 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Ned_K
Quote:
Original post by Erzengeldeslichtes
However, even if you have CLR turned on you can write native code where you get complete control of memory within that code, you can insert asm, etc. It will still write to the Virtual Machine, though.

However, if you leave CLR off you will get your native machine code binaries.


So how much does that virtual machine impact things? Do I lose a level of control with managed C++ if I am used to programming with C++. I also will occassionally insert some asm here and there. Does managed C++ abstract to a higher level than C++ or does it just add some functionality on top of regular C++ along with the VM, garbage collection ,etc.?


Microsoft has taken great pains to ensure that "It Just Works". assembly code, unmanaged varargs (ellipses), and a couple other machine code specific features will compile the function that uses the machine code in x86 machine code. All other code becomes the equivelent MSIL. (So you should consider putting assembly code into its own, seperate function to take advantage of MSIL and JIT of the rest of the function) The only difference you'll see in the native code is that it has to be JIT compiled. Otherwise it works exactly as expected.

Again, this is only if you have CLR enabled.

If you compile to native code, you won't have to worry about that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Erzengeldeslichtes
Really? Cool. That means the beta's going to die pretty quickly and we'll have to actually get the full version.


Ah well there are the express editions (are NON betas now), free for 1 year and then cost ~$49.99.

Quote:
Original post by Erzengeldeslichtes
But I can't find it at any commercial websites, except Amazon says it'll be released on the 28th.


i don't know about the full details, you can check here to find out more.

Share this post


Link to post
Share on other sites
Quote:
Original post by snk_kid
Ah well there are the express editions (they are NON Betas now), free for 1 year and then cost ~$49.99.
Actually, they're to be free to download and license for one year (after which new users will have to pay), but once licensed you can use them freely forever.

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