Like Tree7Likes

Which language?

This is a discussion on Which language? within the Game Programming forums, part of the General Programming Boards category; Ok, I'm stuck, I apologise in advance for probably being the hundredth person to ask this, where do I start? ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    11

    Which language?

    Ok, I'm stuck, I apologise in advance for probably being the hundredth person to ask this, where do I start?

    I want to get into serious programming for games, not making my own little games type of thing, properly doing it, and I don't mind having to spend a lot of time doing other things before I make something that actually looks like a game.

    I probably will make some small stuff for fun

    I've been looking around and getting slightly more confused as I go on. I don' know what to learn, I hear the big guns are using C/C++ (reason why I'm here) but I imagine doing stuff in things like XNA would be a lot easier. What about Java?

    Shoudl I just go ahead and start learning C++ straight off the bat?

    Thanks in advance

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,549
    For serious games, C++ is the language for simply one reason: speed. XNA and Java can't beat C++ in speed and C is just not cut out for such large projects.
    That said, you have a split road here:
    - Either you go the fast, easy way and learn doing some small games with nice results. The drawback is that it isn't C++, and you'll probably have to go back to the basics when doing bigger games.
    - Or you could go the hard way right off the bat. Start with C++, and make your way slowly into making games.

    That's how I see it, anyway.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Well since this is a C/C++ board my vote is for C/C++.

    Why would you ask what language to use when most of us here clearly love C/C++ more than is probably healthy for any programmer?

  4. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Bubba View Post
    Well since this is a C/C++ board my vote is for C/C++.
    Ditto. But to add an element of non-self-interest, I only program in C, not C++ ('cause its just silly ), but I've been working on a game (in POSIX C) and would definitely say that community is overwhelmingly C++ AFAICT so if you want to live in Italy, you should learn ___ian.

    Elysia's comment about "large projects" is interesting: by tonnage, the Titanic would definitely be a C++ project, whereas a large marine diesel engine (say you have an OS, where the game is played -- the game actually dwarves the OS in terms of resource usage) would be like a C project and by it's nature "smaller".
    Last edited by MK27; 02-06-2010 at 08:04 PM.
    caroundw5h likes this.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,500
    Just google "game programming <<insert name of language here>>>"

    Example
    News pygame - python game development
    PythonGames - PythonInfo Wiki
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,549
    Quote Originally Posted by MK27 View Post
    Elysia's comment about "large projects" is interesting: by tonnage, the Titanic would definitely be a C++ project, whereas a large marine diesel engine (say you have an OS, where the game is played -- the game actually dwarves the OS in terms of resource usage) would be like a C project and by it's nature "smaller".
    I would also say a lot of operating systems were created before C++ was invented, plus I'll bet some OS code also is C++ behind the scenes.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Games can be serious in a lot of languages; it's all about what you put into it. That being said, C++ with libraries. Don't reinvent the wheel when you're just trying to make a game, unless you're some sort of guru (even then you may spend 5 years creating a sub-par graphics engine, for what?). Even professional game studios in the industry are starting to show interest in open source third party libraries like Ogre, and Boost is well established. Choose a graphics, sound, networking, physics, input, and a few other libraries, and get to work. This is all covered extensively here and at gamedev.

    It may be a little more overwhelming than learning C# and XNA, but if you push yourself through it you'll learn more quicker. Big no to Java, there just isn't enough libraries, support, etc. XNA is nice if you want to sort of showcase your skills as a developer, create a small game, maybe try and win one of their contests. I wouldn't invest in it as a serious platform for future game development; at least anymore than C++. There's always exceptions, with really nice/addictive gameplay that can pull it off in XNA on Xbox 360, or Flash on a site, or game for iPhone, and be considered professional and successful. Choose your game, then choose your requirements, then your language. Of course it helps to know some languages first xD but do you think the designers know them? No, they figure out their specific requirements after the basis of their game, and don't have to know anything about the language other than it's a tool to get the job done.
    Last edited by Dae; 02-07-2010 at 02:33 AM.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  8. #8
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    Thanks for the replies all

    @Elysia: Guess I'll be buying some books in the near future! Prob gonna start with the recommended "C++ without fear"

    Prob just use the compiler I get with that for now.

    This may sound dumb to people in the know, but does the fact that have done a fair old bit of Access, Excel and Visual Basic help at all? I'm also from a very technical background focused on electronics and such.

    @bubba: Fair point lol

    Sorry you posted as I was writing this one Dae. Ok, sorry I may not have understood that one. Are you saying go ahead and learn C++, but I'd have to be a bit of a maniac to ignore all the resources available in *cringes expecting a telling off for bad wording* plugins, libraries and the like.
    Last edited by woody_294; 02-07-2010 at 02:33 AM.

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,549
    I don't know what "compiler" it comes with, but I'd recommend Code::Blocks + gcc (mingw) or Visual Studio as your IDE / compiler. They are usually the most popular ones, and for good reason.

    The fact that you've programmed before does help, obviously. There is more to programming than merely syntax. That said, you still have a tough future ahead of you since C++ isn't exactly easy to learn, nor is game programming.
    But still, you have this forum's entire resources at your disposal. If you run into problems, use them. Many members here are happy to answer questions or doubts.
    Last edited by Elysia; 02-07-2010 at 02:40 AM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    Sounds like an excellent place to start! I hopefully I'll be coming up with some good questions soon then

    Wonder if anyone I know has a book I can borrow so I can get started right away?

    Oh, while I'm asking, are there any good qualifications in C++, like CCNA sort of quals.

  11. #11
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I'm NOT doing this just to bicker, bare with me and I'll get to the real reason

    Quote Originally Posted by Elysia View Post
    I would also say a lot of operating systems were created before C++ was invented, plus I'll bet some OS code also is C++ behind the scenes.
    Technically, the first statement is FALSE.

    I'd say one very major reason for C++'s popularity would be the libraries more than the core syntax, and those libraries perhaps lend themselves more to high-level end user applications, which is where C++ tends to predominate. OO API's are a boon, no doubt, for many such things.

    The point being choose the tool for the job; your implication that C++ would be a better choice "universally" for anything and everything is just wrong-headed; by that way of thinking, modern interpreted languages like python and perl would be much better for a lot of things that remain C++ purely out of tradition (because those are the veteran developers) and MOST IMPORTANTLY because of business concerns (you can close source compiled product).

    Basically, I agree the OP should go with C++ but I think it is stupid of you to foster a mentality I often perceive amongst neophyte C++ programmers whereby a language they have never spent any serious time with (C) is useless or atavisitic, simply because they cannot comprehend writing a serious project without OO. No surprise: they have never tried to do so and then universalize their subjectivity because they work within myopic and self re-enforcing cliques. Which is a limitation of theirs, not anyone else's -- don't encourage it, it's banal, pointless, and annoying.
    Last edited by MK27; 02-07-2010 at 07:35 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  12. #12
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,549
    I have no idea what you're ranting about.
    There is one thing I did make out. I wouldn't recommend a big project with C because it is complex, and using another language such as C++, Java, whatever tends to be more trivial because these languages were designed for big modern applications in mind.
    C has its world where the absolute low-level, close to the hardware is needed.

    These are usually the use the right tool for the job descriptions of the languages. But sure, you can use C for whatever you want, just as any other language. But again, consider the right tool for the job principle.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Elysia View Post
    I have no idea what you're ranting about.
    This is what I'm ranting about:
    There is one thing I did make out. I wouldn't recommend a big project with C because it is complex, and using another language such as C++, Java, whatever tends to be more trivial because these languages were designed for big modern applications in mind.
    There is some truth in this, but it hinges on what you mean by "big". "Big" here would mean the kind of project that no one is going to be involved in for at least several years from when they start if not more, at which point they will be knowledgeable enough to make their own decision and someone saying "oh, of course you should use C++ for that" will be just silly. At this point they will also recognize that lots of people do big projects in C and aren't complaining about it.

    But by spouting this rhetoric in C++ programming 101 you are creating a false impression amongst the naive. You are trying to create a mystique.* They end up with the belief that anything over a few thousand lines is "big" and therefore unsuited to C. This is not reality. It just sounds like some kind of defensive/argumentative meme that has propagated itself like a virus in insular communities. It's probably rooted in history, from a time when C++ was new and no doubt poo-pooed by traditionalists and conservatives. It does not foster open mindedness, it's reactionary nonsense and it fosters morons who are no where near working on a "big" project but believe what they are doing is more complex than anything done with C, simply because they are using C++, which is terrible because it reifies the method over the task. They think they are somehow working on some magical level and are now lightyears beyond the dumb cavepeople who wrote their operating system for them. That's pure ignorance.

    My last example of this was some dufus on a web-dev forum who tried to explain to me that C is not a modern language and needs to be replaced. When I informed him that people had been trying hard and failing at that for decades, and that most of what makes web-dev possible are big modern applications written in pure C, his response was, "well it's a fine minimalist thing like Go, but eventually people have to move on and play something else".** My response to his response was that after we invent a better Go, we should invent a better Chess and maybe a better wheel, too, which the wheel is so venerable it's amazing vehicles still roll around on them.

    You are a C++ programmer. Be happy, do your thing, and quit trying to put everyone else down: if you were so sure of what you were saying (which you shouldn't be, because you're wrong) you would not have to say it. It cannot be meaningful except in a fantasy sense to beginners and it is patronizing and dumb for people with more experience. It is completely childish to go around saying every big modern application not written in C++ was done that way because the developers didn't know any better. In reality, other people have done far more impressive things in both languages than (chances are) you or I will ever do. I'm sorry you are upset by the fact that many people have preferred C and are on some kind of mission to correct them.

    C has its world where the absolute low-level, close to the hardware is needed.
    Hardware is always needed, Elysia. I agree that if I did not have to run programs on a computer, I would be happier with a much "higher level" language completely abstracted from little details like memory management.

    But again, consider the right tool for the job principle.
    Of course, which I think comes down to: If you want to live in Italy, learn Italian. If you want to program games, learn C++. No doubt, there are Italians who will argue that the reason Italians speak Italian is because Italian is the best language in history, but that is pompous and ridiculous, esp. considering most of them speak only Italian fluently.

    * maybe you've fallen for it yourself.
    ** and nb. this was a Java developer who's "truth" was that C++ was just as clunky and backward as C and hampered his ability to program properly because it is not good enough for a smart guy like him.
    Last edited by MK27; 02-07-2010 at 08:49 AM.
    caroundw5h likes this.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  14. #14
    Registered User
    Join Date
    Feb 2010
    Posts
    11
    Wow epic argument All points from either side noted!

    Ok, I've started up reading "Thinking in C++" and it's making a great deal of sense to me, am I likely to get confused soon or if I'm getting concepts should I plod on?

  15. #15
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    If it makes sense to you and "plod on". If you're wrong, you'll find out later, to a certain extent that is inevitable, that's why you don't begin as an expert.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Page 1 of 9 123456789 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 01-21-2010, 03:40 PM
  2. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  3. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  5. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 05:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21