|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic Page: 1 2 3 4 5 6 7 8 9 10 11 »» |
Last Thread Next Thread ![]() |
| why is C++ still being over-used? |
|
![]() graveyard filla Member since: 1/11/2004 From: NJ |
||||
|
|
||||
| Just a bit of a rant here... I've been out of the GD thing for a few years now, and (once again) getting the itch to get back into it. So I'm working on porting over (actually completely re building but that just makes me feel better that i didnt waste my time) my old C++ 2D MMO engine to XNA / .NET... One thing I still see rampant on these boards, is that everyone is still (over) using C++. I really don't see how C++ is at all the right language to use to do any kind of indy / amateur game development... and yet, I still see everyone on these forums using them. Newbie game programming asking low level C++ questions.... etc, etc.. and hardly ever do I see the answer being 'stop using C++!'... Why are we still using it so much? Why are we not reiterating the advantages of using higher level languages to these young and ambitious game dev newbies? For the years I have been here I can say we are probably the smartest group of developers I have ever seen on any community... we beat into newbies brains the fundamental programming concepts. Don't optimize first, use a profiler. Don't make an MMO first, make pong... etc etc (yes i know not the best examples but you get what i mean)... so why am I not seeing people beat into newbies brains they should be using .NET or some other higher level platform to do game development??? Think of how much more could be getting accomplished, how much more people will learn a bout (practical) concepts.... how many new API's we might have or even cool new games we could be playing... There's only one reason I can say to someone to use C++ for a game... that would be that your main goal in life is to become a professional game developer or otherwise professional C++ programmer. If that's not the case, stop wasting your time and start using the right tools for the job!!!!! It's 2008 guys!!! <end rant> sorry ![]() |
||||
|
||||
![]() DevFred Member since: 2/17/2007 From: Hamburg, Germany |
||||
|
|
||||
Quote: Really? I see these kinds of posts quite often. |
||||
|
||||
![]() chapinch Member since: 9/27/2008 From: southend-on-sea, United Kingdom |
||||
|
|
||||
| I think initially people use the language they are most comfortable with which tends to be c++ as this is one of the most widely used in programming, and develope from there. I have been learning c++ for a year and would like to make some small games what advise would you give to me? |
||||
|
||||
![]() KulSeran Member since: 12/9/2003 |
||||
|
|
||||
| Well I think your last point hit the nail on the head. The implied or otherwise intent of many of the posters is "I wanna make games for a living". There are sections of the industry that have moved on to other languages. But many times company base code is all C code, not even C++. And for one bad reason or another, they won't upgrade any of their code/design methodologies from C. But one good reason they all stay in C/Asm is that you are given what you are given for console development, and that usually means a C compiler, or if you are lucky a working C++ compiler. |
||||
|
||||
![]() knivil Member since: 9/14/2007 From: Potsdam, Germany |
||||
|
|
||||
Quote: That was my dream and reason to start programming. C++ is easy to learn and hard to master. And if it takes 5 years of practice to reach moderate level, start early. And after that time you realize that C++ is the greatest language out there. Ok not for all problems. If i need a VM, then i take Java (script -> lua, planning -> prolog, ...). |
||||
|
||||
![]() janta Member since: 2/7/2006 |
||||
|
|
||||
| Do you only know what you've just started here? ;) Let me get some popcorn. |
||||
|
||||
![]() Promit Moderator - Graphics Programming and Theory Member since: 7/29/2001 From: Baltimore, MD, United States |
||||
|
|
||||
| I tend to think that there's a substantial subset of members here who are interested in going into professional development, for which C++ experience is an necessary prequisite. |
||||
|
||||
![]() Neptune Member since: 9/1/2008 From: Atlanta, GA, United States |
||||
|
|
||||
| I think many people believe so-called high level development environments are slower(overhead) and do not provide direct access that C++ provides. How would you respond to those people? |
||||
|
||||
![]() Drew_Benton GDNet+ Member since: 7/29/2004 From: Katy, TX, United States |
||||
|
|
||||
Quote: Sorry bud, but you just invalidated your entire post right there You were really on a roll too Let me explain.How many people start indy/amateur dev for the sole sake to make money? Not many. Now that question is ambiguous so let me further clarify. If you know you have to make $400 by the end of the month to pay bills, would you undertake game programming to fulfill that task? Absolutely not. (Assuming you have never done it before and are not employed, etc..) You would find some decent paying job to get by on so you can pay your bills and make a little over to have for your hobbies. That is not to say people don't make games with the intent to sell them, but the people who are just starting obviously have some time on their hands to learn and explore the field. Now, that is important to consider because, if you look at why people even get into game programming, it would naturally be (in my eyes): 1) to pursue a career in it (and thus become a professional) 2) write their own version of <insert game title here> 3) and in a few rare cases, they have a mindset that all the cool people do it. All 3 points above point to a recurring theme of "if I want to make what I see, I have to do and learn what the professionals do". It is just common sense in a way, if you see your favorite sports star practice running backwards on a track for 2 hours a day and you want to be like them, well you would run backwards on a track for 2 hours a day. To anyone who would dismiss that though, one word for you, endorsements, just consider that. Now, right now, it is almost the de facto standard to use some C/C++ in your game project in the industry. You look at all the game engines around, they are mostly made in C/C++. That is the current trend right now. So, when you tell someone new that they shouldn't use C/C++, it's <adjective A>, <adjective B>, <adjective C>, it would appear to them that you are telling them that they don't have the capability to be able to do what they want, which as we all know in human nature, just drives us more so to do it (attraction/repulsion). Top that off with all of the horrible misinformation on the web about everything, you have a horrible environment for beginners that don't know better. I'm talking about things like, "Visual Basic is an easy language, but too slow", "Java is too slow and no one really uses it", "C++ is the most powerful language", ad infinitum. The problem is that of context, something that is hardly paid attention to when people make such blanket statements. This is better known as: "know the power of the tools available before you use it for a job". Sure you can construct a giant DeathStar in space that can send a laser down to kill a single ant, but why do that when you can just step on it? Such logic is not what is written about, only how to construct the DeathStar or How to put a shoe on your foot. Overall, I think there's not enough influential or even accurate resources available for people to make the best decisions for their selves, in which even that in itself is a circular dependency since they are incapable of knowing what is the best for their self. However, by not using C/C++, you will not be able to learn practical game programming concepts any faster than if you used C# or any other language. The reason is, there is no game programming specific language. You still have to learn the language. How "easy" it is it highly subjective - OOP languages force one specific perspective on development, and that perspective is not the only perspective in that. It's actually quite dangerous for people to be forced into one specific perspective such as that. So, the problem you are alluding to is that of learning the tool you choose to develop in, not how practical a language is for game development. That distinction is important to make because it goes back to what I said earlier about a lack of resources being available to make the better choice for the person to get started. And to think, all this discussion is just on the actual language used for a game. A game is more than a program, much much more, and until we start enforcing the idea that you just don't "program a game", we will be in this cycle for a long time. That might be the most important aspects to this topic, since all I am seeing is "How to program a game using this specific API" and not "How to engineer a game". But that's a another post for a rainy day, to which I've already brought up. Just my $700 billion worth of cents ![]() |
||||
|
||||
![]() DevFred Member since: 2/17/2007 From: Hamburg, Germany |
||||
|
|
||||
Quote: May I ask what other programming languages besides C++ you are accustomed with? |
||||
|
||||
![]() Sirisian Member since: 10/5/2005 From: kalamazoo, MI, United States |
||||
|
|
||||
| On IRC we tend toward having beginners learn Python or C#. It teache peoples the basics of programming. One thing many beginners don't fully realize is that basic programming concepts are common between languages. For instance, I can go from C++ to C# to AS3 and use the basic concepts to create the same algorithms with mere syntactic differences. A member of gamedev took the time to discuss and write this article: Picking a Language It helps beginners to start on their path of programming. Not to mention it covers the C++ question which is asked a lot. |
||||
|
||||
![]() Promit Moderator - Graphics Programming and Theory Member since: 7/29/2001 From: Baltimore, MD, United States |
||||
|
|
||||
Quote:Well, I'd start by asking them some basic system level questions, which nine times out of ten would reveal that they do not, in fact, know jack shit about how C++ works or how it interacts with their operating system. (This is a very good bet, because anyone who thinks C++ provides "direct access" is living in a world divorced from reality.) For the one out of ten who do understand that stuff, I ask some questions to check whether or not they have any idea how higher level languages (such as, but not limited to C#) work. That knocks out nine of ten again. For the remaining one out of a hundred, well, it depends, but by this time they've probably earned a rate down and a cold shoulder. |
||||
|
||||
![]() PKLoki Member since: 11/3/2006 From: Manchester, United Kingdom |
||||
|
|
||||
| Game dev is largely language agnostic in the sense that whether you implement your algorithm (be it A*, OBB calc, scene graph stuff...) in C++, C#, or whatever language, you learn the algorithm and data scructures independently from the language. As my boss says, all these languages are Turing complete, so anything you can write in one of them you can write in another. I think he's probably right (though he's smarter than me!) I guess in the same way you could explain all of these concepts in French and English (at least ToohrVyk can!) but the concepts remain the same. The only difference is that with XNA (for example) you're given a large class library and framework to get you started. (Don't get me wrong, I'm a fan of XNA, I use it myself in projects with friends and I think it's a good framework.) I'd like to add, from my own experience, that C++ is used in a lot of the more 'interesting' areas of coding. Sure you can work for a bank or insurance company and spend all day writing database/web code with C#/ASP.NET but personally I'm not too excited by that. I work as a software engineer/researcher in medical image analysis, and we use C++ exclusively, as does everyone in the field that I'm aware of. C++ has the advantage of cross-platform functionality too, which is a big bonus in scientific applications where your clients present a mix of unix and windows systems to deal with. Many of our clients simply wouldn't be interested in .NET apps because it doesn't fit in with their existing IT infrastructure. |
||||
|
||||
![]() Dave Member since: 3/22/2004 From: London, United Kingdom |
||||
|
|
||||
Quote: Java no good? |
||||
|
||||
![]() loufoque Banned Member since: 5/14/2008 From: Bordeaux, France |
||||
|
||||
| C++ is both a low-level and a high-level language. It can be much more high-level than most other languages out there, including Java/C# and ML/Haskell, if you use the right features. Also, at the same time, you always have an idea of the kind of code you're generating and what you're doing, and you will mostly always be able to write code as efficient as you want it to be, without huge language constraints. Moreover, it's one of the only languages that does resource management right. It is also an accessible language and has fairly good implementations on a large number of platforms. |
||||
|
||||
![]() knivil Member since: 9/14/2007 From: Potsdam, Germany |
||||
|
|
||||
Quote: It is just an opinion. I can't justify my statement with rich experience in many programming languages (worked with C++, Java, Prolog, Lisp, Lua and Perl). But look at C#, not every problem is an object and D has garbage collection. |
||||
|
||||
![]() VillageIdiot Member since: 9/2/2008 From: Chicago |
||||
|
|
||||
| You seem to really not like C++. My reasons for doing C++ are: 1. I am already a web software developer and want to migrate to computer development. C++ programming jobs are plentiful and well paying (although .net makes a decent paycheck also). 2. I like C++ more than C# or VB, I know all three fairly well. 3. I love the challenge. If learning curve is the only priority to telling people what to use, why stop at C#? Most (not all, but most) home developed games, especially that of a beginner, would be fine suited by visual basic or something like that. Why not send them down that road? I guess it is all about what you are in it for. If I had no interest in professional software development I would probably use a basic language. I just don't see why you would send a newbie to C# for ease of use opposed to a basic language. My point is that C++ really isn't over-used any more than C# or basic. Reason for that is that it cant be over used, it is all a matter of preference. |
||||
|
||||
![]() MaulingMonkey Member since: 8/19/2002 From: Seattle, WA, United States |
||||
|
|
||||
Quote: Gotta disagree there. No lambda functions, no garbage collector, no reflection, extremely limited type inference (e.g. templated function arguments), no intentionally introduced metaprogramming facilities (template and macro metaprogramming are more happy accidents [sic] than anything else), what else am I forgetting... Seriously though, give some examples of how you feel C++ can be "more high-level" than, say, C#. I disagree with basically the rest of your post too, but this seems like the point most likely to be at all interesting. Quote: We agree if you mean that tools are easy to get for C++, but we disagree if you mean to say that the language is easily picked up on. Because it's not. Quote: Sorry, I got kind of bored of repeating myself over and over again. |
||||
|
||||
![]() lol Member since: 6/18/2007 From: Sterling |
||||
|
|
||||
| I myself am still a n00b, and I use only c++, even though I know a couple of higher level languages like Java. The only problems I run into are math/linear algebra related problems (like not understanding CSG, BSP, quaternions, OBB, etc). I very rarely have any c++ specific problems (like memory corruption) that would be fixed by using a different language. Also, I have tried using Java for games in the past. For me, it has been a very frustrating language due to too many rules (such as the requirement that every single last exception be handled, even if you are 100% sure that the exception will never be thrown under the given circumstances). |
||||
|
||||
![]() xZekex Member since: 9/27/2008 |
||||
|
|
||||
| C++ is still used just as much as C is used. Believe it or not. People still prefer programming in C++ over C# or Python. |
||||
|
||||
![]() Daaark Member since: 8/1/2001 From: Ottawa, On, Canada |
||||
|
|
||||
| People programming for fun should use whatever language they please. People wanting to be pros should probably get intimate with C++ and DirectX, because that is what all the mainstream pro games are using, and you want to have a relevant skill set. I use C# and XNA out of personal preference, and I recommend it to everyone who is getting started. It's easy and fun. I got fed up of C++ as a language. In the time I was using it it went from a simpler language to one with 10,000 additions, and where all my headers had to have const every 2 words. ![]() I'm not anti C++, I just don't enjoy it anymore. I found C# to be a breathe of fresh air, and the syntax differences are only minimal. |
||||
|
||||
![]() Rockoon1 Member since: 12/4/2005 From: Uncasville, United States |
||||
|
|
||||
Quote: I'd point out that C++ doesnt provide direct access to anything other than its own abstract machine, and that direct access to abstract machines isn't advantageous in the sense that they believe. (When I can coerce a C++ compiler to generate an RCL or RCR instruction on an x86 without using proprietary extensions, I might change my tune .. its not going to happen tho, because a carry flag is not part of its abstract machine) |
||||
|
||||
![]() Telastyn GDNet+ Member since: 10/13/2003 From: minneapolis, MN, United States |
||||
|
|
||||
| Umm yeah, C++ is knocked pretty hard these days at least on these forums. Even people aiming to be professionals are pushed away from C++ (because anyone close enough to be a professional realizes that they need it and can learn on their own, so they're not posting in the forums about it). C++ is horrible. I've yet to see an even mildly convincing argument (in the past 5 years) that it doesn't beyond "it works on consoles!" or "all the company's code is already C++". A horrible option without practical alternatives is still a horrible option. |
||||
|
||||
![]() Daaark Member since: 8/1/2001 From: Ottawa, On, Canada |
||||
|
|
||||
Quote:Can I point out that it doesn't matter either way? A lot of games at this level are doing trivial things anyways, and the C++ or C# runtimes are not the bottle neck. You are setting up a bit of logic and letting the video card crunch away at all the actual hard work. Do you think I notice any overhead, runtimes, emulation layers, JIT compiling, or all those funny buzzwords when my C# XNA game is chugging along at a measly 600fps? ![]() |
||||
|
||||
![]() r691175002 Member since: 7/4/2008 |
||||
|
|
||||
| I have always been very against C++. I have done three years worth of it at school and am quite proficient but I still hate using it. The entire language feels cumbersome, especially when coding a personal project or with a few other people I don't want to be fighting the language when there is already enough on my plate with the project. Same deal with frameworks and engines. I don't want to be messing around with trying to create a window when I can be writing a game. I will go downwards a reasonable amount, but I'm not going to build a pyramid from the ground up myself. |
||||
|
||||
|
Page: 1 2 3 4 5 6 7 8 9 10 11 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|