Game Development Community

Wanting to Learn

by fendory · in Technical Issues · 07/12/2005 (12:35 pm) · 13 replies

I have no clue about programming, but have recently started to like the idea of learning it. Its like when I say "NO CLUE" I mean I don't have the slightest clues about it, so I was wandering what would be a good way to start? I was thinking about finding a book on C, but thought I'd ask here first, what would be best.

Thanks for any help you can offer. I hope to go get a book this weekend If all goes well.

#1
07/12/2005 (1:35 pm)
Same advice I give to you as I gave to everyone else:

if you are a windows programmer, and you want to learn to program, learn C#. (I would say "any .NET language" but people think of C# as a sexy language, so you might as well use it)

That means no Torque for you right now, but C# (or java) takes care of funky memory allocation issues that will be the death of you if you use a language like C to start learning with.

Also, I say "no java" because it's not nearly as polished, and the function libraries (SDK) are not nearly as well polished as .NET

If you are not a windows person, then.. well good luck :)
#2
07/12/2005 (2:13 pm)
Though a little difficult and frustrating, I think C is a great way to start. It is a solid foundation to most all other languages you would learn. It teaches you things like memory allocation, pointers, structs, pointers to structs. It may take longer but I feel it would be well worth it.

I would start with an introductory book on Programming that focuses on C coupled with "The C Programming Language" by Kernighan and Ritchie. Just remember to do the exercises and examples because most of your learning will come from doing. Especially with the compiler (read the manual). When you are comfortable I would branch out to "Practical C++ Programming". Though this will require a different frame of mind when designing your programs, but luckily this book covers that.

After this learning C# or Objective-C will be easy as pie. It will always take practice and reading to learn the nuances but with C/C++ as your base, I feel your horizons are broader.

Do not be intimidated, do not get discouraged, and read the documentation. Programming can be very rewarding. Good Luck!
#3
07/12/2005 (2:59 pm)
I would recommend either C# (sexy is definitely the word, but it's not yet standard for making games) or C++. The book I learned C++ on was Teach Yourself C++ in 21 Days by Jesse Liberty, and it is a very good introductory text that I would highly recommend. Just don't expect it to only take 21 days :)

Many people suggest Kernighan and Ritchies "The C Programming Language" along with Stroustrups "The C++ Programming Language", but I always thought that both of these books were way too wordy for a beginning programmer. They are written directed at someone who knows a previous programming language (such as Pascal or Basic) and are very difficult for a beginning to absorb.
#4
07/12/2005 (3:22 pm)
I think people who learned C++ or C years ago forget that they (most likely) learned it in a classroom, where there is a teacher explaining to you in detail what exactly a pointer is, and what a pointer to a pointer really is and how it works.

For someone who wants to learn how to program "on their own", this level of complexity is totally unnessicary *TO START WITH*... yes yes yes, you cant make a game (right now) with C#, but you cant program anything until you learn how to program.

With C# you can learn what a program is, what an algorithm is, and you can actually "make" something very rapidly.

If you start with C# and discover that programming really is your calling in life, then you can decide to tackle the nightmare (relative to C#) that is C or C++.

I think to sum it up, you can think of C++ and a "powerful language".

You can think of C# as the BASIC of the 21st century. Simple to use, but very, very powerful too.. *AS LONG AS YOU DONT NEED REAL-TIME PERFORMANCE*... which you need if you were to build a game engine, or any other type of real-time simulations.

And of course, dont forget that C# (or .NET) is a microsoft software.. there is very limited support (basically none) for it on non-windows OS's.

but if you are 100% windows (like me) it's not a big deal.
#5
07/12/2005 (3:40 pm)
Actually, I learned C++ by using the book I recommended above (not in a classroom). And C# can be used to make games (using Managed DirectX) and get decent performance if you have a strong grasp of the language. Its just not standard yet for making games, so you will need to learn C++ at some point or another.
#6
07/12/2005 (3:53 pm)
@Joe: Yeah, I was trying to simplify things for Josh. You "can" do just about anything with any language.. but some are better suited to different tasks.

C++ is good for the hard-core developer

C# is good for the beginner, and the "I want to write an app, not a memory allocation system!" type-dev

If you are anti M$ (or need to target other OS's) Java is also a good canidate (instead of C#), but is weak in usability (bad SDK design).

And PS: if you decide to go with .NET, go with C#. Dont bother with VB.NET. The only reason VB.NET exists is to let old VisualBasic developers use .NET without learning a new language. it is *NOT* any easier to use than C#. (Both are easy)
#7
07/12/2005 (6:15 pm)
Thanks for the info. I may look into C#. I want to make games, but I'm not into a rush. I don't want to start and then have problems. I want to learn the basics and go from there. The college I'm going to teaches a basic C and an Advanced C, but I'm taking other courses and don't have time out of my schedule to take one of those, so what ever is best for me to learn on my own is best.

Thanks again.
#8
07/12/2005 (9:52 pm)
If you have never programmed in your life and you want to get into games programming, I personally reccomend starting with one of the following:

Python (www.python.org)
BlitzBasic/Blitz3D (www.blitzbasic.com)
Flash/Actionscript (www.macromedia.com)
Java (java.sun.com)

Ive seen good commercial games done in all of these. They are also all cross platform and easy to use.

C/C++ is pretty good. But nowadays there are so many great alternatives that can be used to build excellent games with much less time and experience. Unless you are planning on creating Half Life 3, any of these should be more then sufficient.
#9
07/12/2005 (10:51 pm)
You guys are seriously recommending C# to a newbie programmer?
Come on, now let's be serious here, C# is a convoluted mess that I couldn't even imagine trying to learn without a strong sense of C fundamentals. Not only that it's just another language du'jor with the not so minor drawback, that your programs will forever suffer from vendor lock-in.

Here's my advice, pick up one of those Sams Teach yourself C/C++ in 24hours/days whatever, and a good language refference like the one Foz recommended. Follow all of the directions, take all of the little pop quiz thingies. After you finish the Sams books, you will have a decent set of C fundamentals, and can rightly call yourself a beginner.

Once you are a beginner, use the source man! There are literally tens of thousands of opensource programs, written by people who know how to program and do it right. Read the source code, and modify it, make it better or more suited to your purposes than it already is.

You will learn a new language alot faster by doing than by reading or sitting in some stuffy class room.

Also make C/C++ your first language, it may be more difficult at first to wrap your mind around, but once you have learned it, darn near every other programming language will come to you MUCH easier.

Thats my 2c
#10
07/13/2005 (12:13 am)
@Dreamer .... uhh, sorry but I dont think you know what you are talking about.

The only thing "similar" about C# to C or C++ is (aproximatly) the general syntax.

.NET *does* have a lot of very complex functionality (Reflection and casting in V1, Generics in V2) but these are things that a beginner never has to touch, it's "added functionality", not "required functionality".

The reason why people thing C# is complex is generally because they dont look at the language itself, but the .NET JIT Engine, the extensive libraries, the M$ Lockin, etc.

C was written 20 something years ago, C# is about 5 years old. I know that how "new" a language is doesnt really say much about how good it is, but let me promise you that C# has gone a long, long way to improve usability. They learned alot over the years, and if you look at the languages on a syntax level, It's really not even a comparison.

PS: I say this from a person who has programmed in BASIC, VisualBasic, C, C++, C#, Java and SQL.

There are plenty of reasons to say no to .NET (windows lockin, performance) but NOT how difficult the language is.
#11
07/13/2005 (8:04 am)
@Jason, the reason I recommended C is because the language is straightforward and plain. It is great way to learn the basic idioms and iterative programming. For instance, he will have a thorough understanding of a string and when he moves to C++ and finds that string is a type he will jump for joy.

Though much has been learned over the years, as you have mentioned, I believe that much of the lessons have been in abstraction. (Starting with C++) I just feel that it's best for a programmer to understand what he/she is abstracting, and why. Further, you are well aware of the power of the language despite its simplicity. (There are many Game Libraries that use it)

TSE, is in the works and from what I have read (I don't own it), it is for Windows only because it is using DirectX. Now I doubt, though I may be wrong, that it is written in C# because if it was it would require a re-write to port and Mac and Linux users would never see it. (Nothing against the GG Engineers....just let's say it would be a royal pain in the butt)

I understand your reasoning...I just see it diiferently. At least Josh has the benefit of reading it all and deciding himself.
#12
07/13/2005 (11:51 am)
In my opinion, your best bet would be to read "C++ how to program", by Deitel & Deitel. I'm not sure about the title, but here in Italy it's called "C++ fondamenti di programmazione".
The first couple chapters explains the C side of C++, so you can learn C then C++, when the chapters start discussing about classes and so on.
Unfortunately, due to a very few spare time, I stopped my way just the chapter before pointers, and now I have only partial understanding of how things work.
By the way, starting with that book and then moving on to something more advanced, I think you could be end in 1-2 years.
If you're oriented toward Windows development, you should consider also a book about windows api, as well as MSDN or the barebone Windows API help file, wich you can find around in the internet and code with almost every C++ compiler (eg: Dev-C++).
If you wish to do some game programming on your own (without already written engine) I higly suggest also gametutorials.com, theyr tutorials could give a nice start about DirectX and OpenGL, as well as NeHe (nehe.gamedev.net) and NeXE (nexe.gamedev.net), the Neon Helium OpenGL and DirectX tutorials (wich are free).
You could also consider SDL or Allegro to do some 2D programming (Allegro is very barebone).
I have no resources about Mac or Linux development, except for some links on Linux (in Italian).

Bye, Thc.
#13
07/13/2005 (12:11 pm)
@Foz : You are right, it really depends on what he's looking for.

I am kind of unsure if abstracting the "details" like C# does is really a good thing.. Overall, I think it is for most types of programming (application development). I started with SQL and C# about 4 years ago, and worked with Java and VB for 2 years before that. So honestly I forgot most of the pointer voodo I learned from my C++ class.

When I started my current torque project (about 3 weeks ago) I had to relearn C++, and honestly i'm gratefull that I dont have to deal with pointers and memory allocation in my day-to-day life.

Anyway, I think for a skilled programmer, knowing about pointers is probably a good thing, for a beginner, maybe it's "too much detail".

Wishy washy, but fun thread :)