• 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.

Archived

This topic is now archived and is closed to further replies.

LostSoul

C or C++ I have lost my mind.

27 posts in this topic

I am no good at expressing my ideas in a written form, let me try to be simple and clear. Should I learn C then C++ or should I go right for C++? I understand that C++ is a superset of C. And if I knew C++ I would have to already know C. But this isn''t entirely true. I have a book that teaches OOP from chapter one, they don''t cover any C stuff, example they don''t teach the printf function, they go right for using cout, cin, etc. They don''t bother with telling you how to code in a non-oop format... Which means after learning C++ from this book I will not have the ability to read C code because I will not understand the format... If I read this book I will know all of the C++ language, but still not know C if you understand what I mean..... I don''t know what to do, and I know I can''t explane things very well so if you need me to clear something up please just ask and I will do the best I can to help you.... LostSoul
0

Share this post


Link to post
Share on other sites
I believe that if you learn how to program in C++, then you should have no problem reading C code. Within the C++ OOP methods is C code.
0

Share this post


Link to post
Share on other sites
Your best bet is to learn C++ first if you have the choise. It is a superset of C, which means you can read C code. As far as the libraries go, don''t let that scare you off. You should be much more concerned with the keywords and the syntax at this point.

Here it is simply, I started off with C++ and I never regret it. That''s my best advice.
0

Share this post


Link to post
Share on other sites
for the most part, c by itself is dead. so learn c++, there would be no point in just learning c.
0

Share this post


Link to post
Share on other sites
quote:
Original post by Int86x

for the most part, c by itself is dead. so learn c++, there would be no point in just learning c.


C is hardly dead. Much of the code I work with every day is written in straight C, even though most new code is written in C++. As far as the original question goes, it has long been my opinion that you should learn C++ first; the biggest argument I''ve heard against doing so is that OOP can be confusing. However, most C++ books and classes I''ve encountered teach procedural programming first, and then move on to classes and OOP later. As long as it''s done that way, I think learning C++ first is fully appropriate. Then, at some point, you should go back and learn exactly how C is different, so you can understand and write straight C code if you need to.

Look in our Featured Articles section for John Hattan''s "Which Language Should I Use?" for an excellent discussion of this topic.
0

Share this post


Link to post
Share on other sites
I went for C++ and I don''t regret it.

C is dead! There is no need to write C-code. C++ is better and if you understand C++ you understand C so there is no problem when you are maintaining some old C-code
0

Share this post


Link to post
Share on other sites
I would suggest you start with C++. My very first serious programming language was C++. I found little difficulty in understanding C++ - I was about 14 years-old back then. Last year in college, I studied C and found it also easily understandable because of my C++ knowledge. Nonetheless, C makes learning a little more difficult since you have to worry about the trivial details like that of the printf statement i.e. %s, %c, %d and so on. C++ has this complexity minimised with cout. So, I guess your best bet is with C++.

Best regards,
Sherman
0

Share this post


Link to post
Share on other sites
GunnarStein: Be careful not to associate all languages with the same style of programming. OOP and procedural methods represent two different programming paradigms, and each has it benefits and weaknesses. C is often considered to be the language of choice for writing fast procedural programs. Saying that C is dead is like saying that the procedural programming paradigm is dead...a statement that would be hard to back up (yes, there are situations when the OOP paradigm is NOT good, let alone not optimal). Procedural programming will not just go away because everyone is really high on OOP right now.

That having been said, C++ is my language of choice for most applications. I actually learned OOP by using LISP and JAVA, and so C++ was a natural, although messy, next step. Speaking of obsolete languages, anyone used LISP lately? Anyone heard of it? No...then why does it persist as one of the most important languages around...
0

Share this post


Link to post
Share on other sites
For that matter, not everyone is high on OO Languages and C++. There are tons of development shops that still deal exclusively in c. Still others profess to use c++, but place so many restrictions on its use that they are basically c houses with a few nice features added on top.

I would suspect that good programmers, well grounded in software design methodologies write good programs and that while languages may help or hinder this, they are not the backbone of it. No language makes up for poor engineering.

Notwen
0

Share this post


Link to post
Share on other sites
Hey, I want to only learn one language, I know C is C++ w/o the superset just like the other guy but there are still books that teach only the C++ way to do things and stuff..
And since I don''t have to go by the requirements of game companys (c/c++ and asm knowledge) I only want to focus on one language, plain C or C++ ? then if I get good at either one, I may learn the other or something..

Most people say out of preference, but since I have no past experience, I have no preference on which language to use. Which one would you suggest I use? some people say things like C++ code is cleaner, C is faster, C is more portable, C++ is better, blah blah..whatever..
0

Share this post


Link to post
Share on other sites
Well, you''ll get into a circular loop and not reach a decision like this. But if you are going to just pick one, just pick C++. Why not?

You can write procedural programs with C++ btw. It''s not like Java where you have to have an OO approach.

The other side is what are your immediate objectives? what do you want out of the language? What kind of games do you want to develop. If you don''t know, then C++. If you do, there could be some consideration for C.
0

Share this post


Link to post
Share on other sites
Lost soul I think I know what you are talking about.I started with C++ not to long ago it wasn''t to bad, but then got game programming for dummies which was pretty much C.Spent alot of time looking up stuff like printf.If you have the money I would get The Complete Reference C++ Third Edition it has a C subset in it.Just look in index and turn to the page.I wish I would have got it to begin with would have saved alot of time. And if you are new to C++ you will find you have only scratched the surface.
0

Share this post


Link to post
Share on other sites
quote:
Original post by Potsticker

Well, you''ll get into a circular loop and not reach a decision like this. But if you are going to just pick one, just pick C++. Why not?

You can write procedural programs with C++ btw. It''s not like Java where you have to have an OO approach.

The other side is what are your immediate objectives? what do you want out of the language? What kind of games do you want to develop. If you don''t know, then C++. If you do, there could be some consideration for C.


Hi Potsticker, I want to make 2d games I know that, without the hassle of all these languages, so I can focus on one then choose to go onto the next, I''m just going to do this as a hobby like alot of people. I want the games to be fairly big, and have good graphics effects like stuff from photoshop, have quite a few different characters, guns and stuff, so maybe some platform games, 8 or more directional games..just games that I could maybe put on a webpage and that people may like to play in their spare time..

0

Share this post


Link to post
Share on other sites
If you''re programming in Windows, there''s no reason not to learn C++ first. In UNIX/Linux learn C first. Quite frankly it all comes down to which language bindings for APIs, etc. are more appropriate and in the Windows world it''s all going towards C++.

But for all you, OOP freaks out there, it''s perfectly possible to program OOP in C, especially if you''re willing to give up the multiple inheritance.

But here''s a link from the man himself about C++ as a beginner''s language: http://www.research.att.com/~bs/papers.html

[offtopic] LISP is dead! Long live scheme! [/offtopic]
0

Share this post


Link to post
Share on other sites
I learned C and used it for about 7 years before moving on to C++, and always felt my C habits were holding me back. Granted, it''s good to know some C tricks, and there''s the benefit of having a very good notion of what the compiler will do with every line of code (not so, I feel, with C++). All in all, I wish I had learned C++ first. My excuse is that there was no C++ standard when I started. =)
0

Share this post


Link to post
Share on other sites
You should go ahead and start with C++. If you are going to be a windows programmer, learn the basic structure of the C language, pointers, functions, classes, structs, etc. When you start programming windows, you''ll notice that pretty much all of the IO functions including cin, cout, printf, scanf, and all the FILE stuff no longer works. I suggest that you learn the basics, and then get Visual C++. Use the online help and tutorials. You''ll be a master in a month or two. Try writing code that takes care of the windows overhead. I''m writing a library that simplifies Windows. Its pretty large.

Dominque Douglas
0

Share this post


Link to post
Share on other sites
If you want to get a good book on OOP w/ c++ and want the basics in c get SAMS Teach yourself OOP w/ Wisual C++ 1.5 in 21 days, its not hard to learn the new keywords and it has a great c review in the back of the book that helps when reading c code.
Glandalf
0

Share this post


Link to post
Share on other sites
What Im doing is learning C then C++.

I have bought C for dummies and C++ for dummies.

Then Im getting a Visual C++ book and learning from that.

I guess people have different ways of learning languages to me though.


SNEAK
0

Share this post


Link to post
Share on other sites
alot to say
first of all, c++ is more readable and easier to think in
c is not dead however because it is faster
basically, to do c++ you need to know c -- sure you cant use classes and such in c code, but instead you just use more function calls from other headers (stdio with printf instead of iostream with cin/cout)
lastly, you can still use old file code in widows -- i use _open and _close and such -- you can have more files open that way than you can with streams
0

Share this post


Link to post
Share on other sites
C++ is a hybrid language combining structured programming with oop. The C++ structured stuff is the same as C. The only difference is the standard library stuff. And you need a reference book for that stuff anyway. Don''t waste your time sweating over this, just learn C++, get a C reference book, read through it once and put it on your bookshelf.
0

Share this post


Link to post
Share on other sites
C is _NOT_ dead!

Sure, C++ is great! If you''re doing a big project (yeah gaming programming involves that), alone or not, it''s great for getting a good structure. But then again, lets say you were to write as small console application to convert bitmaps from diffrent bitdetphs...would you do it in C++ with full blown classes and class tempelates and shit? Or in C, straight and clear, and get it done in 10 minutes? Learn both C & C++. I started out in C when i was 14, got a book at the library, wasnt hard i might add. Then learning C++ was a simple task. Another reason of knowing/coding C is that more people know it, actually i think about that 50% if not more of all code done today is pretty straight C. Have an open mind, learn them both! Go for assembly too while you''re at it
0

Share this post


Link to post
Share on other sites
Listen up, everybody!

C++ is great for servers, business apps, and that stuff. But if you plan to go with game programming, you''ll need to learn about C first. For one thing, it''s faster. Second, it''s not as complex as C++, and since game programming is mostly data manipulation, the simpler it is, the less bugs it will have.

I don''t mean that you should throw away C++. I simply mean that if you plan to be a game programmer, you should study C first.
0

Share this post


Link to post
Share on other sites
darkmage, most of todays cutting edge games are done in C++. why you might ask yourself? its more structured and of course, the encapsulation is great! most things can be done in C++ without any significant loss of speed, but then again, not everything. thats why you program those critical but even so essential parts in assembly.

Edited by - Staffan on 1/22/00 4:14:06 PM
0

Share this post


Link to post
Share on other sites