Jump to content
  • Advertisement
Sign in to follow this  
mohaakilla51

New N00b, (kinda, just read)

This topic is 3994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Some background: I am a 14 year old Texan. I come from a background of web designing, and therefore know HTML, PHP, javascript, little ASP, little bit of other languages. I have been coding PHP since I was ten, and learned HTML at 8. -------------------------------------------------------------------------------- I started learning C++ recently, mainly just because I wanted to see if I could :p, but I didn't get very far at all because it was extremely dull, I knew the basics, just not the syntax for them, so I switched to visual basic. I have created an extremely advanced calculator in it, but I have decided that it isn't the best language to learn because it really creates sloppy coders, and has no where near the power I want. I still have all my C++ stuff, including the Digital Mars compiler. I have also downloaded Visual C++, Visual C#, and of course Visual Basic (all express, I am fourteen and therefore have no $$$). So, I searched around and have decided the most popular starting language is C++, however when I go to you for beginner reource fo people who are already coders, then it gives me a crapload of stuff about Direct X. Questions: 1.) Are C# and C the same thing? 2.) How do I make games with directX (is it free)? 3.) If DirectX is not free, C or C++ (or c#?)?

Share this post


Link to post
Share on other sites
Advertisement
C++ is NOT a beginners' language! In fact, I would go so far as to say that if your goal is to develop games, you should stay away from C++ and choose another language instead.

C++ is, on the other hand, a great language if your goal is to learn about computers. To learn how memory works. To learn about how to interact with Windows on a more technical level. But not if your goal is to create games, especially if you're somewhat new. Why? Because you will spend more time banging your head on the desk trying to figure out why your code doesn't run, and less time actually enjoying making games and accomplishing projects.

Given that you have a pretty good amount of experience in scripting languages, I would actually recommend that you go with a language called Python. It's very beginner friendly - you'll feel like the language just "fits". And once you learn the language itself, you can learn about PyGame, which is an "extension" to the language that is specifically made for creating games.

You can visit python.org to learn more about the language itself: www.python.org. You can also find some beginner tutorials by searching the web.

Quote:
1.) Are C# and C the same thing?


No they are not.

C is a relatively old language. It's not used widely anymore since it was largely replaced by C++.

C++ is used a lot today, but as you have already found out, it's quite a difficult language to learn. What mostly makes it different from C is that it adapts the "object-oriented" method of programming. This is a feature of many programming languages to divide the code into self-contained "objects" that "communicate" with each other. Perhaps you have heard of it, or perhaps you just need some more experience to understand it fully.

C# is yet another language. It tends to be more beginner friendly. What makes it different is that it enforces object-oriented programming to a much higher degree. Also, in my opinion, C# code is a lot clearer than C++ code.

Both C++ and C# can be used for game programming.

Quote:
2.) How do I make games with directX (is it free)?


Yes, DirectX is free. However, you need to know either C++ or C# in order to use DirectX. Don't worry about it for a while. There's not much that DirectX can do for you yet.

Quote:
3.) If DirectX is not free, C or C++ (or c#?)?


The languages are free. However, tools are not always free.

If you choose to go with C++ or C#, you did the right thing by installing the free Express editions from Microsoft. Those are the best tools that you can get at this point.

However, I once again make the recommendation that you should stick with Python. It's a great language - much easier to learn than either C++ or C#, and it's quite powerful, too.

Share this post


Link to post
Share on other sites
I, like you started learning to program young, I had qbasic down when I was 9. I then started learning C++, and am still learning big time even though I am 17. Believe me when I say C++ is not a beginners language, but It has paid off a lot learning it, because it has opened the programming world. Once I got the hang of it, I could look at code in any language (with the exception of assembler) and be able to understand it. It's nice to have C++ one of the first languages you learn.

Share this post


Link to post
Share on other sites
If you do decide to stick with C++, here's a free book which seems to be good. Another two-volume free book can be found here. It is a bit difficult for a beginner because it moves fast in the beginning and has poor code examples, but it is really great at explaining how the language works, and why it works the way it does (by the way, I learned C++ from this book). I would say that you should use the first book, and when there's a specific feature you don't understand/want more info on, look it up in the second book. Also, the second volume of the second book talks about many advanced and interesting topics.

Share this post


Link to post
Share on other sites
My first major language (programming) was C#, and I use it for just about everything. It's very easy to use, and powerful enough for anything I've put at it. It forces Object Oriented design, so you can learn all of those ideas/techniques. It's very user friendly, I highly recommend it. It also uses very similar syntax to C++, so switching from C# to C++ isn't TOO huge, mostly have to learn memory management. I don't know Python, so I can't say much about it, but I'd say learn Python (Then PyGame) or C# (Then use XNA, for games).

Share this post


Link to post
Share on other sites
Quote:
Original post by Niddles
I, like you started learning to program young, I had qbasic down when I was 9. I then started learning C++, and am still learning big time even though I am 17. Believe me when I say C++ is not a beginners language, but It has paid off a lot learning it, because it has opened the programming world. Once I got the hang of it, I could look at code in any language (with the exception of assembler) and be able to understand it. It's nice to have C++ one of the first languages you learn.

Any procedural language, perhaps. Check out Prolog if you have the time.

Share this post


Link to post
Share on other sites
Quote:
Original post by aceofspaceman
Quote:
Original post by Niddles
I, like you started learning to program young, I had qbasic down when I was 9. I then started learning C++, and am still learning big time even though I am 17. Believe me when I say C++ is not a beginners language, but It has paid off a lot learning it, because it has opened the programming world. Once I got the hang of it, I could look at code in any language (with the exception of assembler) and be able to understand it. It's nice to have C++ one of the first languages you learn.

Any procedural language, perhaps. Check out Prolog if you have the time.


Or lisp. Even fortran can be a bit difficult to follow if you aren't used to it. I would say that knowledge of C++ should allow you to follow code written in any language that falls in the "curly braces" family, for the most part. But, then again, perl is in that category. :-)

Share this post


Link to post
Share on other sites
As you have no "$$$", I recommend Code::Blocks (codeblocks.org; a GPL (open source, free)) IDE, running on top of gcc (GPL, too; gcc.gnu.org)). Code::Blocks has fine support for C/C++ and many other languages.

Under GNU/Linux, you get most stuff you need for free, and if you're a hacker, you can modify that very stuff. Languages available in GNU/Linux-Land are e.g. Java, C#, C/C++, of course PHP, Haskell, Fortran, Simula, Algol and many more. A great plus is also the wide set of tools if you're an advanced programmer once in the future (e.g. objdump, dissy, embroider (here), strip et cetera). Under GNU/Linux you have many free and open source IDE's, maybe not that blown like some none-free IDE's, but really, who needs enterprise software in her/his private bureau ;).

Share this post


Link to post
Share on other sites
While I don't understand why this topic suddenly is about which language to start with, I will give my $0.02 here:

I'm gonna go against popular opinion: go ahead and learn C++. Sure, some of the more exotic features of the language might be more difficult to understand, but a large part is the same as any other OO/imperative programming language. Different syntax, same stuff. Actually, syntax wise C++ is alot like other languages (the basic stuff anyhow). I don't understand why people always make such a fuss over the languages. Unless you're considering coding in assembler it's all pretty much the same after a while (popular languages anyway, I'm not going to go into functional and logical languages, which are more academic in nature). The big difference with C++ is that if you screw something up, you usually screw up badly (mostly when you start messing with pointers). It's all relative though. Want something a bit more safe? Start with java.

My main point: Don't pick the laguage purely for the language, pick the language that is best suitable for achieving your goals. Any language can be learned in a reasonable ammount of time, and there are large simmilarities between many languages.

Now for your questions:
1. No, they're not. The name is misleading. It is one of those cases however where the syntax is very similar.
2. Yes it's free. You can download the SDK to start coding DX from the MS site somewhere. It comes with coding examples too. There are many, many online tutorials that will help you with Direct X coding. A simple google search will give you a ton. Alternatively, you could browse through MSDN.
3. C is quite old, but still usable. C++ would be prefered, because it's Object Oriented (you can create classes) and considering OO is the popular programming method nowadays.

You seem to think that Direct X is a seperate programming language from C/C++ (because of your last question). It is however something that uses C++. An addition to it, if you will.

Okay, enough ranting from me.

Share this post


Link to post
Share on other sites
Quote:

Original post by Menno
I don't understand why people always make such a fuss over the languages. Unless you're considering coding in assembler it's all pretty much the same after a while


I disagree. In C++, if you dereference a NULL pointer or use an invalid array index, the program crashes with a cryptic error message. In C#, an exception is thrown that tells EXACTLY what happened and even provides the location of the error (and the stack trace). That, for me, is probably the biggest reason why I switched to C# (even though I know C++ pretty well). Another thing is that with C++, you have to take greater care to avoid "shooting yourself in the foot". C# is much safer in that respect (include guards, copy-c'tor/assignment operator, uninitialized variables, undefined initialization of globals, etc.). And, automatic memory management doesn't hurt either.[smile]

To be proficient in C++, you have to really take your time to learn the language. With C#, you can be productive much more quickly. That's why C# is a much better language for a beginner.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!