• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
trapeze

learn C or C++ ??

44 posts in this topic

i am thinking about learning even though i know very little of them. but, i don't know which is better ? by being better it may depend on my purposes. however, i would like to hear from others. thx.
0

Share this post


Link to post
Share on other sites
Probably neither of those. No one can give you a sensible response to that unless you tell us what your goals are however.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Most likely neither. What languages do you already know?



hm... matlab.. please don't laugh out loud...

i do know a bit C/C++.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Kazgoroth
Probably neither of those. No one can give you a sensible response to that unless you tell us what your goals are however.


something i will need to work in the industry. more specifically, computer networks, communications, telecommunications and whatnot.
0

Share this post


Link to post
Share on other sites
You will need many different languages to work in the industry. I'd pick one of C#, Java, C++. Probably in that order... but you will have to keep learning new languages as you go (this is not as big a deal as you think, once you know a couple its not much harder than learning a new API)
0

Share this post


Link to post
Share on other sites
Go with C++. If you learn C++, you will automatically learn C as well.

Furthermore, it is very important that you choose an object oriented language, as that is what is used in the industry. Once you know one of the OO languages, it is fairly easy to learn the others.

C++ is the most difficult ones of the three (C++, C#, Java), and when you master C++, you will find it very easy to learn C# and Java. The opposite will not necessarily be the case.
C++ is still the most used language in the industry (actually it is almost exclusively used in the industry), so IMO it will be the most valuable for you of the three, if you wish to work professionally with it.

If your choice stands between C and C++, there is no doubt that you have to choose C++. It becomes a bit more fuzzy if you can choose among all three OO-languages.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
Go with C++. If you learn C++, you will automatically learn C as well.


Not true. The languages are completely different. If you "know C" by "learning C++", you either haven't learned C++ at all or you will get a nasty surprise trying to write non-trivial C programs.


Quote:

C++ is the most difficult ones of the three (C++, C#, Java), and when you master C++, you will find it very easy to learn C# and Java. The opposite will not necessarily be the case.


"When you master C++". This could take a very long time. It is arguable that onemight spend less time learning C# first then moving to C++.

Quote:

C++ is still the most used language in the industry (actually it is almost exclusively used in the industry), so IMO it will be the most valuable for you of the three, if you wish to work professionally with it.


This is true.

Quote:

If your choice stands between C and C++, there is no doubt that you have to choose C++. It becomes a bit more fuzzy if you can choose among all three OO-languages.


Just to note: there are many, many more object oriented languages than the 3 you have mentioned.
0

Share this post


Link to post
Share on other sites
Which other than those three do you want to use for game development?

Sure, it may be possible, but Im not writing a thesis on OO-languages here, Im giving advice on game development.

As for C and C++: I agree, there are alot of tricks that you would use in C, that a good C++ developer would never use (although he could). When reading C code, I have been very surprised at seeing stuff I had never seen before, or thought was at all possible.

However, when that is said, I believe that learning C++ would give you a sufficient level in C to build on. You won't know every trick in the book, but you will have a very solid foundation. The rest you can look up as you go IMO.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
Which other than those three do you want to use for game development?

Sure, it may be possible, but Im not writing a thesis on OO-languages here, Im giving advice on game development.

As for C and C++: I agree, there are alot of tricks that you would use in C, that a good C++ developer would never use (although he could). When reading C code, I have been very surprised at seeing stuff I had never seen before, or thought was at all possible.

However, when that is said, I believe that learning C++ would give you a sufficient level in C to build on. You won't know every trick in the book, but you will have a very solid foundation. The rest you can look up as you go IMO.


I do realise this, most of what you say has a lot of truth. But not for beginners. In fact if this wasn't the "For Beginners" forum I probably would not have replied like that.

I believe beginners do themselves an injustice by trying to learn C and C++ first. Python is an OO language that can be used for game development. You might not be writing Doom 17 and Quake 42 in it any time soon, but for a starting language it is more than adequate. The types of games people write while learning game programming tend to be retro 2D game clones, not AAA blockbusters.

There are enough pitfalls in starting programming and game programming already without adding "undefined behaviour" to the mix.
0

Share this post


Link to post
Share on other sites
From what I've seen so far in my software engineering course, learn C before learning C++ if you want to know both. Most students in my course knew C++ before they came in, and they're really struggling with C :-/
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
Go with C++. If you learn C++, you will automatically learn C as well.
This statement is only true given that you're willing to accept being really bad at one or both of the languages. They're different languages with different idioms, and simply removing classes/namespaces/etc from C++ code does not by a long shot make for good C code.

Quote:
Which other than those three do you want to use for game development?
How about Python, as used extensively in Civilization IV and even more so in EVE Online and ToonTown Online? Although not typically used as such in industry Python can be used as the sole language to program a high-quality game rather than as an embedded scripting language and is generally much more approachable for a beginner than either C or C++. It's also used extensively in programming fields other than games.

Quote:
Original post by trapeze
something i will need to work in the industry. more specifically, computer networks, communications, telecommunications and whatnot.
Noting that you specifically outlined several non-videogame industries there, Java is very widely used and may be worth your consideration.

As some of the other posters have touched on however, it's not neccesarily in a beginner's best interest to choose a programming language based on the choices currently made by professional developers; if you're just starting out you're likely to take quite a while learning before you can consider yourself a good programmer, and so it can be beneficial to ease the task of learning by picking a more beginner-friendly language to start with and then learn any languages -- you'll find that excepting extremely different languages using different paradigms it's significantly easier to pick up additional languages after your first -- required by your chosen industry at a later stage.
0

Share this post


Link to post
Share on other sites
I'm learning C++ as my first language, and I'm starting to understand it - everyone says start with C# first because simple things that you won't have to worry about (like memory management if I'm correct, I'm still a noob myself)

I was going to learn VB 6.0 as my first language... (LOL) but then someone made a real good point... "You're going to get used to the simplicity of that language and when you attempt to apply what you've learned to C++ it will just put you off to it, C++ requires that you to do more... plus VB 6.0 is pretty old dummy." Don't move away from one language to another because one is 'faster' to learn, you just have to stick at either one you choose to learn first...

3 tips from mistakes I've made while trying to learn C++ (if you pick to learn it)
1) Read books, and reread parts of the book you've think you've forgotten, or are unclear on (DONT GET STUCK IN ONE PART, Move on and come back but don't sit in one part, you won't get or understand everything you read the first time you read it...)
2) Read small books. No need to jump into C++ books that are 1000 pages long and have a very large section in detail on classes, functions - you only want to learn the basics then learn more details of the basics later.
3) MAKE YOUR OWN PROGRAMS. It was until I've covered afew books that I realized I could read code and understand it, but when I tried to apply my own I'd fall on my face... same thing as learning to drive a car - you can be told which pedal is the brake, and the gas - but you've got to drive it yourself to learn how to get it to operate smoothly.

The learning curve of C++ is a monster. Grab afew cigars, get a nice book, bring the laptop outside, and read away while we still have good weather.

Or just ignore this post in its entirety... I'm still a noob here myself.
0

Share this post


Link to post
Share on other sites
The answer for beginners is neither. Go with Python. It is both simple and practical. There is no good reason for starting out with C or C++, or perhaps any of the C variants.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by JohnBolton
The answer for beginners is neither. Go with Python. It is both simple and practical. There is no good reason for starting out with C or C++, or perhaps any of the C variants.


I'm not sure I entirely agree with John's statement. Specifically, the last part "...or perhaps any of the C Variants."

In general, C is less commonly used in game development these days due to C++'s superior support for Object Oriented Programming. However, C++ can be a difficult language to begin with.

In contrast, C# is much simpler, has less ambiguity built into the language, has tons of support forums, etc...and even has XNA - an API for beginning and hobbyist game programmers. So while C is largely abandoned for modern game programming, and C++ is overly complex, C# is both powerful, easy to use, and well supported.

If you're set on learning a C-style language, I highly recommend C#.

Now, with all that said, there's nothing wrong with trying Python first. It'll help you get down the basic semantics of modern programming, while giving a fairly gentle introduction to the syntax. From Python, it should just be a matter of learning the keywords and syntax differences to move to C#, and from there, it's a hop, skip, and a jump to C++.

As to a good reason to start with C++, well it is the industry standard for game development. So by learning it first, you jump straight into the Lion's Den. But, it more often than not results in "baptism by fire." So I'd not recommend it, in spite of the fact that learning C++ first has perfectly valid reasons.

Anyways...I'm rambling now. My vote, start with C#. If you're intimidated by C#, start with Python. And in the end, learn them all.

Cheers!
0

Share this post


Link to post
Share on other sites
Quote:
Original post by NerdInHisShoe
Most students in my course knew C++ before they came in, and they're really struggling with C :-/
Most students who "know" C++ don't really.
0

Share this post


Link to post
Share on other sites
Kazgoroth:
So you are seriously gonna recommend C over C++ for game development?
Because that is what this thread comes down to, isn't it?

Java? Does that even communicate with DirectX or OpenGL (the only two serious interfaces to modern GFX-cards)?
C# looks like it is gonna out-compete it anyway (I am not particularly fond of MS myself, but that is how it looks anyway).

Python? Are you serious? Are we not discussing programming languages? Python is a scripting language AFAIK.

CaptainThunder:
Smalltalk for game development? You must be kidding...
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
Kazgoroth:
So you are seriously gonna recommend C over C++ for game development?


Of course not. Read his earlier posts, he recommended python.

Quote:
Because that is what this thread comes down to, isn't it?


They often do, but they shouldn't.

Quote:

Java? Does that even communicate with DirectX or OpenGL?


Yes. It can talk to anything C can using the Java native interface...

Quote:

C# looks like it is gonna out-compete it anyway (I am not particularly fond of MS myself, but that is how it looks anyway).


C# is an open standard, Microsoft happens to have the most complete implementation so far.

Quote:

Python? Are you serious? Are we not discussing programming languages? Python is a scripting language AFAIK.


You know wrong. Python is just another programming language.

Quote:

CaptainThunder:
Smalltalk for game development? You must be kidding...


I imagine he is, but I've been surprised at odder things before [smile]
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
Java? Does that even communicate with DirectX or OpenGL (the only two serious interfaces to modern GFX-cards)?


Not sure about DirectX, but it has OpenGL.

Quote:
Original post by Mercenarey
Python? Are you serious? Are we not discussing programming languages? Python is a scripting language AFAIK.


The distinction between "programming languages" and "scripting languages" is pretty meaningless. Python can do anything that other languages can do, and in some cases, it does things better.

Quote:
Original post by Mercenarey
CaptainThunder:
Smalltalk for game development? You must be kidding...


Smalltalk is an obscenely powerful language. It probably wouldn't be my first choice for a game, but it's well worth learning for other reasons.

EDIT: Beaten to it [smile]
0

Share this post


Link to post
Share on other sites
So let me get this straight:
We now recommend either Python, a language that is used for nothing but scripting in the industry -

or
SmallTalk!

Is this turning into a "I know more languages than you!" discussion, or are we still talking seriously giving this guy advice?

In the 70's and 80's everyone and his mother made a programming language and there are probably thousands by now, why don't we just list them one at a time?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by rip-off
Quote:

Java? Does that even communicate with DirectX or OpenGL?


Yes. It can talk to anything C can using the Java native interface...


Well, if you add CORBA to the pot, any language talks with anything...
Im just pondering why people use some obscure, slow 3D API for Java games if it talks (natively!) with OpenGL.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
So let me get this straight:
We now recommend either Python, a language that is used for nothing but scripting in the industry -

or
SmallTalk!

Is this turning into a "I know more languages than you!" discussion, or are we still talking seriously giving this guy advice?

In the 70's and 80's everyone and his mother made a programming language, why don't we just list them one at a time?


We are recommending python as it is a fine language, and has a great 2D library, pygame (SDL wrapped in python code).

The OP mentioned only "industry", which may or may not refer to the games industry.
Quote:

something i will need to work in the industry. more specifically, computer networks, communications, telecommunications and whatnot.


Having many languages under your belt is good thing. Learning *any* language will be beneficial (except maybe COBOL [grin]). We are not recommending the OP *never* learn C++. But certainly not as a beginners language. Python fulfils all the requirements of being a reasonable, multi-purpose language with a nice game library.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mercenarey
We now recommend either Python, a language that is used for nothing but scripting in the industry -

If your definition of scripting is that broad, then most of game programming is scripting (and you'll certainly agree that neither C nor C++ make good scripting languages, right?).

It then follows that one should focus on scripting languages first, being that not only do they encompass most of modern game programming, but can be used to make complete games on their own, without the learning-cliff that is C/C++ impeding their way right from the get go.
0

Share this post


Link to post
Share on other sites
Language is just a tools,so it not very important to choose which one to learn if you can master any one of them,
C# and JAVA are quick develope tool,and easier to learn compared with C++,they do some thing for you(such as manage memory),so if you want to know better about
how does this things works,you can choose C++.
finally,good luck!
0

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  
Followers 0