Skip to main content
GameDev.net gamedev.net
🔒 Locked

Can we ban...

Started by d000hg Oct 6, 2007 at 4:23 AM 28 replies 3.6k views
Original Post
d000hg
d000hg
This was inspired and taken from this post
Quote:
Original post by d000hg Can we ban people recommending C++ as a good language to learn for programming games? There is no situation where a beginner needs C++. Even if he wants to work in games where C++ is a neccesity, he should start with something else - if he can't learn a new language then he's not a good programmer. I'll point out that I love C++. But things are different from when I learnt to program and it's demonstrably not the best choice.
Am I right? Or is there any argument for recommending C++ to a new/beginner would-be game programmer? I'm looking mainly to the more experienced members here for responses, anyone chip in but please can we keep this objective and not have comments like "Java is slow because it's interpreted" or "C# sucks because it's M$" or "you have to use C++ if you want your game to be fast". If you think any of those are true, please don't bother saying so here.
boolean
boolean
Damn, I thought this thread was going to be about RSC_x
Andrew Russell
Andrew Russell
C# for sure - although it "tastes" a bit verbose to me. Not Java because it constrains you to (and thus teaches beginners) its overly "classy" idiom.

I think C++ is a beautiful language. But it exposes a great deal of complexity to you right off the bat. Also, in a recent, large C++ game project I found that a lot of coding effort was spent writing things (not just memory management) that could have been had for free in a different language (although admittedly we weren't using Boost).

In another thread I recommended PyGame or XNA to a beginner (for a programmer - a designer, for example, might want something more "clicky"). And I stand by that. A beginner shouldn't be stuck with a raw language at all - they should be using a framework to handle the grunt stuff.

And absolutely, you don't need the speed. I know C# (and possibly Java as well) is already "pretty damn fast" anyway. And a beginner's game has no use for speed at all.


Of course - that's not to say that it can't be done in C++. But I agree - it should not be recommended to beginners any more. With C#, Python and even (shudder) Java there more appropriate tools out there.


Quote:
Original post by boolean
Damn, I thought this thread was going to be about RSC_x
Me too. Oh well...
Driv3MeFar
Driv3MeFar
I wholeheartedly recommend C# or Python to beginners, but I don't necessarily think that suggesting C++ should be banned. In all honesty, I think the choice of a starting language is just about the least important one a beginner has to make; what matters is that they start programming in a language, not which language that may be.

Quote:
Original post by Drigovas
Functional languages are not too useful for game programming through.

Jak and Daxter was programmed almost entirely in a LISP-based scripting language, IIRC. Unfortunately, when the development studio got bought out, they were told to abandon the language (because it made sharing between studios too hard), and all their programmers were back to square one [oh].

Quote:
Original post by boolean
Damn, I thought this thread was going to be about RSC_x

Heh, so did I.
Drigovas
Drigovas
C++ for learning to PROGRAM GAMES is a perfectly reasonable choice due to a substantial amount of support in the form of high-level libraries/tools [like for example, irrlicht and ogre3d] that really make the process of TRANSITIONING INTO GAMES smooth, and making simple demos and such a piece of cake, along with a lot of commercial games that have been made open source are written in C++. C# has some of this kind of support too, in certain respects so does python [thanks to pygame].

I'd be perfectly comfortable recommending C++ to a brand new GAME-PROGRAMMER, but thats mostly because I believe that a brand new GAME-PROGRAMMER should already be an accomplished REGULAR-PROGRAMMER, and the transition to C++ [if any transition needs to be made] wouldn't be a big deal to somebody who already knows their way around programming in general.

It IS a good language to learn for programming GAMES [with the emphasis on 'GAMES', and not 'learn for programming', or learning to program, or whatever], but that is assuming you already know what you're doing in non-game programming, and have the mobility and background to just pick up and run with a language without having to learn to program from scratch. It's very important to separate out the big ball of tar that this issue has become, and divide "learn to program" and "learn to program games" into the separate challenges that they deserve to be. It can certainly be argued that C++ sucks for learning to program. A decent programmer can make a decision about what they want to use to learn how to program games [or AI, or scientific simulation programming, or anything else], and C++ is not a bad choice. The 'challenges' presented by C++ aren't exactly challenging in their own right, and anybody who has a grasp on programming in general can transition to C++ in a week's time without much difficulty [not that they'll pick up every little bit of C++, but they'll be able to lateral over their skill level from their own language to a similar skill level in C++]

Your comment is actually rather iconic of throwing these two entirely separate challenges into one big ugly mess. ['Learning to program' AND 'learning to program games' vs. 'Learning to program and program games' together.]

Personally think new programmers should learn to program on functional languages first, then move out from there to the realm of other languages, if only because those do a better job [in my opinion] of teaching someone to *think* like a computer scientist and approach problems like a computer scientist rather than just produce code. Functional languages are not too useful for game programming through. But they are great when someone is learning to program, and not learning to program games.

So get your ban-hammer ready, and let me have it. :D
Jroggy
Jroggy
I agree. I really see no reason why a beginner would need to use C++ (some will argue that no one NEEDS to use C++ either) for "speed". I don't remember a time I needed to optimize my hello world program :P
Personally I started with C, then moved on to C++ and then I started using Python. I haven't looked back since, not to get into a language preference discussion, as I believe all languages have their own uses and quirks.
Anyway, now that I've used Python I'd definitely recommend it to a beginner. I learned how to use Python in less than a week, C++ took me a hell of a lot longer. Granted by the time I started learning Python I was a pretty confident programmer, but I still think Python would be much easier to pick up than C++.
EDIT:
Quote:
C++ for learning to PROGRAM GAMES is a perfectly reasonable choice due to a substantial amount of support in the form of high-level libraries/tools [like for example, irrlicht and ogre3d]

You can use Python with Ogre now :) Most people will probably say that using Python with Ogre would slow things down. However, from experience I haven't run into a situation where using Python as opposed to C++ with Ogre slowed things down noticeably. Personally the minimal loss in speed is no where near the loss in time. It is much faster to set up something like a simple demo using Python, then it is in C++. But I digress.. I don't want to go back into personal preferences again ^^;
John H
John H
I think it depends on the person. Personally, I started with ASP and server-side JScript and gradually worked my way through a host of languages before spending more concrete time with C++/C#. I liked the idea of C++ at the time, but I used to be very impatient and I felt a bit stifled when trying to use it as it's not always apparent exactly what you've accomplished. That's different with web-based languages as the effects are more readily apparent.

On the other hand, a friend of mine seems to have been working with C++ forever and it's done him absolutely no harm. He has used other languages as well but C++ is his niche.

One thing I will say which can make C++ a bit more difficult to learn (aside from the language intensity itself), is the way in which most books/articles are written. They treat C++ in a very formal way which, especially when you're younger, can have an impact on how quickly you pick up the language. Conversely, books/articles for web-based languages seem to be less formal and a lot easier to read.

It's difficult to really tell people what language they should be starting in. The only thing you can really do is to try and let them know what they're getting themselves into and help them to make an informed choice. However, I think this is where there's a problem. It's all too easy for someone who's been using a language for a few weeks, who's also enjoying what they're learning, to readily recommend that language to anyone and everyone they come across, whether that person needs it or not.

The problem is knowing to whom you should be listening when you're starting out.
Drigovas
Drigovas
Quote:
Original post by Driv3MeFar
Jak and Daxter was programmed almost entirely in a LISP-based scripting language, IIRC. Unfortunately, when the development studio got bought out, they were told to abandon the language (because it made sharing between studios too hard), and all their programmers were back to square one [oh].
Honestly didn't know that. Been doing academic programming in functional languages for nearly 6 years now, and always found it highly restrictive any time I tried to push games around with it compared to other languages. Certainly wouldn't say that nobody can bend a functional language [or any language] to serve some arbitrary purpose.... Sure there's someone out there who has written a game in anything you can think of.
Quote:
Original post by Jroggy
You can use Python with Ogre now :)
Neat. Honestly I thought I remembered something about Ogre worming it's way into other languages, so I went to check their website before posting that originally, at at the top of Ogre3D's 'About' Page it says it's for C++ still. Turns out there IS a Python-Ogre to handle python. Neat. [Just putting the thought process and sources out there so people don't think I'm just a total wreck when posting who just types whatever I damn well feel like]
JSoftware
JSoftware
There's not going to be a solution to the problem, and the problem is that people recommend a specific language to beginners. The fact is, that the majority of programmers in here use C++. I see no reasons why it is that way, as I don't really like the syntax and concept of C-like languages(C/C++/Java/C#)

To me, all it comes down to is syntax and which side shouts highest. Right now C++ is probably winning, but I certainly hope it won't stay that way

Object Pascal is comming back, and you can't stop us! [evil]
ChurchSkiz
ChurchSkiz
Quote:
Original post by d000hg
This was inspired and taken from this post
Quote:
Original post by d000hg
Can we ban people recommending C++ as a good language to learn for programming games? There is no situation where a beginner needs C++. Even if he wants to work in games where C++ is a neccesity, he should start with something else - if he can't learn a new language then he's not a good programmer.

I'll point out that I love C++. But things are different from when I learnt to program and it's demonstrably not the best choice.


Am I right? Or is there any argument for recommending C++ to a new/beginner would-be game programmer?
I'm looking mainly to the more experienced members here for responses, anyone chip in but please can we keep this objective and not have comments like "Java is slow because it's interpreted" or "C# sucks because it's M$" or "you have to use C++ if you want your game to be fast". If you think any of those are true, please don't bother saying so here.


I'll play devil's advocate and say that there is an advantage just in the sheer number of tools/libraries/tutorials/books for c++ specifically. Not saying that there aren't plenty for other languages but right now C++ is the king.

I agree though that it is a relatively unimportant decision. Overshadowed by the decision to learn ONE language and use it to create completed titles. I don't think there is anything wrong with starting with C++, but with all the new tools out there (specifically XNA), I don't know why you'd go through the trouble.
d000hg
d000hg
C++ with a full commercial game engine is still WAY harder. Why would a beginner want to use Ogre? It's a huge hammer for a tiny screw.

This thread isn't about whether C++ is suitable for game programming. It's about why anyone would think C++ is the best language to learn with. It's comparitively clunky/unfriendly and other languages have at least as good library support - PyGame, XNA, and a whole pile of Java things for instance. There is very litle which C++ gives you you can't get without all the disadvantages - the main advantage people claim is speed but that's just not a factor.
_the_phantom_
_the_phantom_
Quote:
Original post by ChurchSkiz
I'll play devil's advocate and say that there is an advantage just in the sheer number of tools/libraries/tutorials/books for c++ specifically. Not saying that there aren't plenty for other languages but right now C++ is the king.


Ah, but all the tools and libraries in the world are no use if you don't know how to program in the first place. That's the first hurdle, and if the person already knows how to program in a language you can generally find bindings for the libraries in those languages.

Oluseyi
Oluseyi
No, we can't ban any legitimate option. What we should ban is discussions over which is "best". Pick a language - any language - and get started. If you fail, try again. If oyu can't understand the language, pick another and try again.

People obsess too much over "wasting time." It's rubbish; no knowledge is wasted, and your failures and experiences have didactic value. Plus, if you're serious about this thing, you're going to learn multiple languages eventually.
Zipster
Zipster
Well now that the thread is here, we have to ban something...
jjd
jjd
Quote:
Original post by Oluseyi
What we should ban is discussions over which is "best".


YEEEESSSSSS!!!!!!!!!


Luctus
Luctus
Quote:
Original post by Oluseyi
Pick a language - any language - and get started. If you fail, try again. If oyu can't understand the language, pick another and try again.

People obsess too much over "wasting time." It's rubbish; no knowledge is wasted, and your failures and experiences have didactic value. Plus, if you're serious about this thing, you're going to learn multiple languages eventually.
This ought to be put in the FAQ and used as the official answer to any "what language should I pick?" thread that crops up...
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
GameDev Doctor
GameDev Doctor
Something that would make more sense might be to put in the forum faq that people shouldn't recommend languages until they have tried a variety of them. There wouldn't really be a way to check anyone, but it might work as something you could bring up to shut some people up.

On a related note, I think that whenever someone begins a "How to make an MMO?" thread, it should be answered, not by pages and pages of posts telling them that they need a huge team and have no chance, but just a simple list - Direct3d/OpenGL,Sockets,a programming language, make some simple games, etc - and let them try it. They'll undoubtedly fail, but they might learn a decent amount in the process and those threads wouldn't stay around indefinitely.
I mean, why would you get your medical advice anywhere else?
Wan
Wan
Quote:
Original post by Zipster
Well now that the thread is here, we have to ban something...

Yes!! Ban me! Ban me!
Nypyren
Nypyren
Quote:
Original post by GameDev Doctor
Something that would make more sense might be to put in the forum faq that people shouldn't recommend languages until they have tried a variety of them. There wouldn't really be a way to check anyone, but it might work as something you could bring up to shut some people up.

On a related note, I think that whenever someone begins a "How to make an MMO?" thread, it should be answered, not by pages and pages of posts telling them that they need a huge team and have no chance, but just a simple list - Direct3d/OpenGL,Sockets,a programming language, make some simple games, etc - and let them try it. They'll undoubtedly fail, but they might learn a decent amount in the process and those threads wouldn't stay around indefinitely.


The problem with that is we'd have to answer the same damn post 5 times a day.
gunning
gunning
I agree that often C++ is a poor first language, but you have some serious ego problems if you think you should create a ban on opposing opinions. If you care so much about how beginners learn, spend some time making your argument to them on the forums instead of whining.
....[size="1"]Brent Gunning

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.