Skip to main content
gamedev.net
🔒 Locked

Impossible Feat?

Started by Soccerman4 Mar 14, 2003 at 7:34 PM 80 replies 2.3k views
Original Post
Soccerman4
Soccerman4
I am trying to learn C++ and DirectX to program games and i have had no previous programming expierence at all. In fact i''m only twelve...heh. Anyway i was wondering if it is possible to learn C++ and DirectX at the same time to program games. I know i''m going to get Tricks of Game Programming Guru''s(i think thats title) and i have Teach Yourself C++ Programming in 24 hours(third edition). What kind of DirectX books are there that would help me learn. I could learn C++ from game programming perspective by using Tricks of game programming gurus and i know it has section on DirectX.Anyway, Do you think its possible?Got anybooks to recommend?
I exist.
Punx
Punx
Tricks of the Windows Gurus won't teach you c++. In fact there is only a small appendix at the back detailing the new features of c++ to C programmers. It's an excellent book though so don't think it's not worth the purchase, but you will need a book to learn the basics of c++ first. I have Teach Yourself C++ in 21 Days, and while I'm sure it's not the best book on C++, it was okay for me.

[edited by - punx on March 14, 2003 8:49:14 PM]
~punx
Sante05
Sante05
It''s not impossible, but I wouldn''t recommend you to do that. You will need some experience in programming before starting with Windows programming and DirectX.

I think you should be patient, learn C++, practice, and jump to Windows and DirectX only when you are familiar with programming/reading code in C++. Think that, even though most DirectX books include C++ references, they assume you are already familiar with that language, or at least with programming in general. Often they use complex structures that you can only understand if you have used them before.

As for the books, I don''t know about "Teach Yourself C++ Programming in 24 hours", but the Tricks one is a really good one for beggining in game programming. It covers more game-related topic (not in detail, though, but enough to get an idea), and also explains DirectX basis. Note that the book is a bit obsolete, and uses DirectDraw, not longer supported in DirectX8/9.

Anyways, good luck and go for it.
-----DevZing Blog (in Spanish)
Soccerman4
Soccerman4
The reason i''m rushing is because i think the best way to learn C++ would be from a Game Programming Perspective. When i read Sams Teach Yourself C++ in 24 hours at night its just way to confusing. I can never see where it would fit into programming a game(well some things...but not all). I''m going to get "Tricks of Game Programming blah blah...." so i can do it from that perspective. Good idea?
I exist.
Narcus
Narcus
After you read the Teach Yourself C++ book, I think Tricks of the Windows Game Programming Gurus is a pretty good place to begin. Its got 2D DirectX programming and a little bit of everything you need to make some simple games.

Oh, you definitely need a decent foundation in C++ though. There are a lot of tricky language features, and the "Teach Yourself in 24 Days" book might not even be good enough. It might not SEEM like it is useful in making a game, but I promise you, go look at the source code for a game like Quake and you will see all sorts of stuff in there that you've already learned about in your C++ book.



[edited by - Narcus on March 14, 2003 8:56:26 PM]
Narcusmy homepage:http://www.pcis.net/amenzies
Soccerman4
Soccerman4
Yea good idea. I know how to find that Teach Yourself C++ in 21 days on the internet(NOT ILLEGAL). And i was reading some of it and it is like 89.9% like the book i have. What i want to do is get "Tricks" and learn C++ while i''m reading "Tricks".ex. if i see a term i don''t understand in "Tricks" then i''ll just jump over to my other book and read about that term and continue on. Now do you see what i''m trying to do? Possible?
I exist.
targhan
targhan
Do you learn to use a hammer while you''re building a house?
probably not, it''s the same with trying to learn to code games while learning C++, C++ is just a tool.

First you learn to use your tools, then you learn how to use them to build complex things.

Some terms will only be fully understood after some practice and experience, I suggest you learn C++ properly before starting DirectX.

--------------------------------

"I''m a half time coder, full time Britney Spears addict"
Targhan
--------------------------------"I'm a half time coder, full time Britney Spears addict" Targhan
Soccerman4
Soccerman4
Bah!You suggest i learn C++ first. I''m going to get Tricks first thats all i''m saying eh? If its to hard for me to understand i''ll go back to trying to figure out C++(easier said than done). Anyway,thats my strategy. Is the cd that comes with tricks anygood ?
I exist.
cowsarenotevil
cowsarenotevil
You can''t use directx without a solid knowledge of c/c++. I found that out at eleven. It''s worth spending two years making console stuff, trust me... Then you can learn opengl/directx

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Soccerman4
Soccerman4
Arghhhh!!!!I''m gonna do it this-a-way k? i''ll get back to you if i screwed up eh? is the "Tricks" Cd that comes with book anygood?
I exist.
Sante05
Sante05
The CD comes with the source code, some articles about stuff not covered in the book, and the typical goodies/sample programs, just like the CDs that come with most DirectX books.

And I'm not sure, but I think this one had a collection of images, sounds, and music, too.

[edited by - Sante05 on March 14, 2003 9:40:48 PM]
-----DevZing Blog (in Spanish)
cowsarenotevil
cowsarenotevil
I did the exact thing you are doing, except with windows programming for dummies, (same author, directx, but a bit simpler) but it made no sense without knowledge of C. I''m not trying to stop you from learning, I just want to save you looking at the book and not understanding what the stuff is. Game programming books all assume you at least know what variables, arrays, and often classes. Many expect much more. However, I will respect your final decision, whatever it is. Good luck

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Soccerman4
Soccerman4
I have a book on C++ though. So if i don''t understand something about the arrays and classes i''ll just go read the C++ book. Knowledge of C? Is this book in C or C++?
I exist.
cowsarenotevil
cowsarenotevil
I''m guessing C with maybe a bit of c++. If you know c++, you know c. They have the same syntax, but c++ has classes and some other things.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Soccerman4
Soccerman4
Here is a question that has been lingering on my mind for a while....what is syntax? Since i''m only 12 years old and have had no past programming experience or any friends that are interested in programming it is only natural that i don''t know this answer. What is syntax??? Should i get "Tricks" even though it is in C and i want to learn C++?

?????
I exist.
Sante05
Sante05
quote:
I have a book on C++ though. So if i don''t understand something about the arrays and classes i''ll just go read the C++ book


Well, it doesn''t work that way. For example, with pointers, the DirectX book won''t tell you how to use them, it won''t tell you what are pointers. It will just say "this function returns the address of a pointer" or whatever, and then use it in code, so if you don''t know about pointers, you simply won''t understand anything. Even in some cases the book won''t mention the word "pointer" and just use it, as it assumes you know what they are and how they work.

Btw, if you don''t know what is a pointer, then don''t even bother to open the DirectX book, as almost all functions use them.
-----DevZing Blog (in Spanish)
cowsarenotevil
cowsarenotevil
Syntax is simply how things are written, e.g. using semicolons or function parameters and such. C++ is simply c with added stuff, if you make a c program, it will compile with a c++ compiler. Speaking of which, you do have a compiler, don''t you? If not, I can direct you to some free ones.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Soccerman4
Soccerman4
yup i got a compiler(Dev-C++) came with the C++ book i got.....i guess the bottom line is that i''m going to get "Tricks" because i was reading the article on gamedev and it was talking about how you should begin with making a tetris clone then continue to breakout and pac-man....and i figured "Tricks" would help me program those kind of games....But since all of you are telling me to learn C++ first(so confusing and veryboring). I just want to jump to the games!!!!arghhhh
I exist.
cowsarenotevil
cowsarenotevil
Since the games are in c++, you really need to know it. If you want to make games, you can start making console RPG''s. Even though they don''t have graphics, you can make them do anything a graphical game can do, but without the same output. Putting a graphical interface over it is the easy part. The calculations and such are what are hard.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Sante05
Sante05
quote:
But since all of you are telling me to learn C++ first(so confusing and veryboring). I just want to jump to the games!!!!arghhhh


And what do you suppose game programming is? It''s just code and more code, usually in C++. And when it gets more advanced, you usually don''t see any results after some weeks of coding.

About making a tetris, then pacman and such, that is right, but only if you already know programming.
-----DevZing Blog (in Spanish)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.