View Full Version : Three C++'s?
Please help me clarify here.
As far as I can tell, there are 3 flavours of C++?
1.Pure C++
2.Managed C++
3.C++/CLI
Can someone clarify between 2 and 3 for me? Which one should I be focussing on? Or are they both simply not the best for managed GameDev when one could just use C# in their place?
Evolution
31-10-2009, 11:41 PM
1. This is the pure c++ standard in it's raw form. This needs to be compiled into machine specific code. Which means it will only run on the platform it's compiled for. There will be a new standard in place when the next visual studios gets released in March which will improved performance and add extra syntax.
2. This is code that is executed under a virtual machine that translates the code for the target machine allowing for a program to run on more than one platform. eg. .Net Framework
3. This is the foundation for the .Net Framework and has different syntax to pure c++. Libraries built with this type of code will work with other CLI languages like C#.
Pure C++ is the slowest to develop with but requires very little software to be installed on the target platform for the program to run.
C++/CLI is for RAD(rapid application development) and requires the .Net Framework(50mb-100mb) to be install on the target platform to run.
Without a doubt C# with XNA is quicker to develop a game with, but the software required to run a program with these are large and is not guaranteed to be on the persons computer. C++/CLI(managed code) will require the same amount of extra software to be installed, but is a bit slower to develop with than the C# & XNA combo. I develop games with pure c++ which requires libraries to be built to make development easier, also you don't have access to the .Net Framework meaning you have to write a class that handles the dialog box and basically you have to do everything manually, the software required to run one of my games is 2.5mb compressed and can easily be packaged with my game, but building the libraries and tools to help development takes more than a month to set up.
Managed code runs at almost the same speed as pure code, and a big framework is available making development easy, but you have to decided if you cool with your program requiring the massive frameworks to run. Allot of commercial games are using the .Net Framework because 100mb frameworks can easily fit on the 8.5gb dual layer dvd the games ship on.
Pure C++ will not run managed code, and is only suggested if you plan to work for a big shot company, or if you want to learn what's going on under the framework.
What ever you choose just PM me and I can give you a head start in any route you choose.
dislekcia
02-11-2009, 03:27 PM
It all depends on your goal:
If you want to make games and get into that part quickly without a long setup period where you're not really doing anything of importance for the GAME itself, C# and XNA.
If you have something to prove and want to tell people how hard you worked to get that triangle on screen, C++. (I gigglesnorted at the "pure" there, heh) Managed and/or CLI C++ variants are supposed to help the hardcore C++ people into the century of the fruitbat.
If you've already made a game before and released it for people to play, you can do whatever you like because you know what you're getting into.
Evolution
02-11-2009, 09:09 PM
Yeah the proper name is native C++, because it's compiled into machine code native to a specific machine.
Why are you so bent up at trying to prove how great RAD tools are? You need to understand I'm not taking sides over which tools is best for the job. I have experience with GML / XNA / AS(flash) / C++ / Java and each one has their own strengths and weaknesses, but I enjoy using anyone of them.
As John Carmack says, "you need to build a game from scratch to have a deep appreciation for the game, by processing the input, game logic, and output, and learning what makes it tick". I'm not saying that you should always start from scratch, but it's always good to have that skill.
You don't have to write the same code twice, once you have a library you can build your game in C++ just as fast as you would with XNA. I only write 2 lines of code and I have my game window, and I can load a resource or add a game components in one line, the rest is handled by scene, resource, input, audio, and component managers.
C++ is also a very flexible language that can make development quicker in the right hands, but can blow up into tiny fragments in the wrong hands.
I don't like C++ game programming because it's hardcore like many people believe, I enjoy using it because it's flexible and powerful. If people run away from everything that requires a little bit of effort on their part, then they won't learn anything.
If you have something to prove and want to tell people how hard you worked to get that triangle on screen, C++.
You always yapping about how awful C++ is when you suppose to give advice that is non bias. You supposed to tell people the ins and outs, not chase them away from a language because you prefer not to use it. Everything in your post is biased, and is a reflection of what you think game development is supposed to be.
It all depends on your goal:
All the goals that you stated all point to the same thing???? go with XNA
option 1:
If you want to build the GAME take C# / XNA.
option 2:
If you want to brag learn C++.
option 3:
If your game is done and you want to rewrite it in C++ you know that you in for a hard time.
You not really giving xcal a choice, you extinguishing all hope of learning C++.
Without a doubt C# with XNA is quicker to develop a game with, but the software required to run a program with these are large and is not guaranteed to be on the persons computer.
Native C++ is the slowest to develop with but requires very little software to be installed on the target platform for the program to run.
This is how you supposed to give advice, and the reason I give more advice about C++ is because no one on the forum does.
Don't take this as an attack on you, but take it as advice for the next time you try offering people advice on which language / tool to learn.
dislekcia
02-11-2009, 09:34 PM
option 3:
If your game is done and you want to rewrite it in C++ you know that you in for a hard time.
Wat?
Where did you get that from? The third case I gave was this: If you have made another game and people have played it, you can pretty much do whatever you want because you have the experience and (hopefully) foresight to know what it is you're starting and what you're in for depending on your choices.
This is how you supposed to give advice, and the reason I give more advice about C++ is because no one on the forum does.
Don't take this as an attack on you, but take it as advice for the next time you try offering people advice on which language / tool to learn.
I didn't realise you and C++ were going out. Sorry dude, but an uggo's and uggo.
Why should I be unbiased? I fail to see how making a living writing games means I totally have to be fair to every tool I could ever think of... In fact, quite the other way around, really: I eat because I like RAD tools; Game.Dev exists because RAD tools are less discouraging than diving straight into C++.
Why do I have to like it again? You can dispense whatever advice you feel like dispensing, but until you build yourself a reputation by, y'know, releasing stuff, you look just like every other university kid with a hardon for ANSI C++. The difference is that I've never called you one until you decided to play an odd little equivalence fallacy here.
Next you'll tell me Linux is awesome and we should all give up everything to start developing for iPhone...
Evolution
02-11-2009, 11:26 PM
This is really becoming the norm between us, and I know I should stop this because it's pointless, but I won't.
I eat because I like RAD tools
I work for a game development company programming games not written in C++, but you don't hear me blabbering that RAD is the best thing under the sun. You have to keep an open mind. If someone has the motivation to learn game programming in C++ give them a chance, they can always fall back on another language if they don't like it. I'm not saying that C++ is awesome, I'm just saying you shouldn't discourage ppl if they want to learn it. I fell back to XNA, built a 3d game engine and then went back to C++. C++ just takes longer to get started with the actual GAME.
until you build yourself a reputation by, y'know, releasing stuff
The games that I make don't technically belong to me and I can't go about putting it on forums because of NDA, and I have very little time to complete my side projects of my own.
you look just like every other university kid with a hardon for ANSI C++
hahaha. I have no tertiary education what so ever. All my knowledge I've gained is by writing games with different languages. I've posted GM, XNA, C++ stuff on this forum so I don't know why you think I'm a hardon C++ programmer. It's difficult to find other C++ game programmers so most of my work is in other languages.
Next you'll tell me Linux is awesome and we should all give up everything to start developing for iPhone...
While I was working in a web development company almost a year back there was this guy that was always saying that developers that only program for the Windows OS is selfish. What I've realized is that the language that he uses to develop sites with is php, which runs on many operating systems, which means he does not have to do any extra work to make it run on the different OS. The point I'm getting to is that people are very biased in general and they will tell you something that works for them, and might not always work for the next person. You also get people that only work with one game development tool because they so used to using it and they won't change.
At the end it all boils down to what works for you. Windows works for me because I program with the DX9 API. But it may not work for a 3d / 2d artist or a web designer. So I can't go blabbering about how great windows is if I don't point out what's the other OS are good for. Do you understand what I'm saying at all?
If people are more open to learning new things it will be easier to collaborate with other programmers. I will learn a new language just so that I can work on a project, I won't restrict myself to a set piece of tools / language.
If you new to the whole game development thing I would suggest going with XNA so that you can get a feel for game flow. If you jump straight into C++ / DX API you might find it more challenging to learn the DX API and game structure / flow. Having previous game development knowledge helped me allot with C++ game dev.
dislekcia
03-11-2009, 12:01 AM
I work for a game development company programming games not written in C++
Proof pls. No offense, but it's pretty easy to SAY you work on games, I am - after all - king of the moon on alternate thursdays!
If you new to the whole game development thing I would suggest going with XNA so that you can get a feel for game flow. If you jump straight into C++ / DX API you might find it more challenging to learn the DX API and game structure / flow. Having previous game development knowledge helped me allot with C++ game dev.
There you go. That's exactly my point :)
Any perceived hostility towards C++ is your own beef. All I do is point people's enthusiasm in other directions that will reward them faster when they first come here, the "you have to start by learning C++" myth needs to be clipped in the bud.
Apparently that's a sin or something...
Squid
03-11-2009, 12:02 AM
I have very little time to complete my side projects of my own.
Nobody does. That's why we use GM.
Miktar
03-11-2009, 12:22 AM
Nobody does. That's why we use GM.
http://clip2net.com/clip/m6496/1257200519-clip-2kb.png
Powered by vBulletin® Version 4.2.4 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.