Public Group

# New here, and hello!

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

## Recommended Posts

Good evening fine people! Having last week decided that, yes I will bloody well learn some computer programming. I took some advice from lurking on the forums. One particular gentleman said that at the beginning of the journey, people should not spend too much time trying to decide what language to pick, and just bloody well pick one (I cannot be sure, but I think he probably had a deep northern English accent, with his flat cap rolled up into his fist, with the burrowed expression of a man who has watched his neighbours cat cock its legs to his flower bed) Such decisiveness and a recent re-reading of The Dice Man was all the motivation I needed for my cunning plan. It came down to a vicious series of coin flips, and head to heads, old verses new, slowly eliminating language after language in a straight up fight (to the death!). The winner? Well it had to be bloody C++ didn't it eh? I have just received my copy of Accelerated C++ and Beginning C++ through game programming, as these were the recommendations from this site's book section. "Wayne", I hear you cry, "...all this talk of coin flips and cats is all well and good, but get to the point good Sir!" Point being, its pretty darn tough by the looks of things. I guess my first question is, regarding the C++ language features and game programming, how deep does the rabbit hole go? I have heard again and again of the need to have a good solid base of programming knowledge before jumping into game programming specifics, but if I turn towards the end of Accelerated C++ I get such glorious snippets as:
template<class T>
void Ptr<T>::make_unique()
{
if (*refptr != 1) {
--*refptr;
refptr = new size_t(1);
p = p? p->clone(): 0;
}
}


Blimey! Is this how crazy is gets, all this scribble, people can read and understand this stuff? So, advice time, should I read and complete the Beginning C++ through game programming, and then head off to find a library such as SDL or something, or will my knowledge, after reading that book still have far too many gaps before I can even think about delving into graphics etc. In other words, should I stop moaning and just knuckle down and read Accelerated C++? The funny thing is, when I see such cryptic text it motivates me a little, to know that given enough time and effort I can write and understand stuff like that. Cheers people! EDIT: I was just figuring out how to put my code into the fancy box for clarity

##### Share on other sites
Quote:
 how deep does the rabbit hole go?
Deep. The most visible aspect of programming is the code because it's so easy to illustrate snippets. What isn't shown is all the thinking and failed and bad experiences leading up to that snippet. What's interesting about code isn't usually what it is. It's why it exists in the first place, why it was written that way, and how it is used and relied upon in a larger sense. But you never really see any of that. Until you have to program something.

Quote:
 Is this how crazy is gets, all this scribble, people can read and understand this stuff?
It looks unreadable because you don't know any of the syntax. So when looking at code, you don't parse it, you just see one giant blob. There are discussions on code verbosity and readability, but that's more relevant when you've actually written some code and have a different perspective on what unreadable is.

Quote:
 and then head off to find a library such as SDL or something, or will my knowledge, after reading that book still have far too many gaps before I can even think about delving into graphics etc
You can't read your way to competence. You learn by doing. Learning syntax will not teach you how to approach programs. It's like a toolbox. If I hand you a car mechanic's toolbox, and teach you about every tool, you still can't fix cars. Even if you understand the tools really well. Not only will your knowledge of C++ be very shaky without sufficient practice, you will have had no experience in tackling programs. Thus, you'll need a crutch. Tutorials or someone to tell you what the next block of code to write is. (That's not programming, that's being a code secretary.)

Quote:
 In other words, should I stop moaning and just knuckle down and read Accelerated C++?
Yes. Please. You've inflicted upon yourself the pain that is C++. Now the least you can do is use a proper book to learn how to use C++ properly.

##### Share on other sites
Quote:
 Original post by WayneHaworthI guess my first question is, regarding the C++ language features and game programming, how deep does the rabbit hole go?
As deep as you're willing to dig.

Quote:
 Original post by WayneHaworthI have heard again and again of the need to have a good solid base of programming knowledge before jumping into game programming specifics
This is crucial to remember.

Quote:
 Original post by WayneHaworthbut if I turn towards the end of Accelerated C++ I get such glorious snippets as:*** Source Snippet Removed ***
That's pretty messy code. Books sometimes will write messy code in order to shorten its length and save on printing costs.

Quote:
 Original post by WayneHaworthBlimey! Is this how crazy is gets, all this scribble, people can read and understand this stuff?
Kind of, but usually the code will be cleaner than that. At least if a sane person is writing it. The reason I say kind of is because most of the code you write won't be anything like that block of code at all. That block of code has some special functionality that you will rarely need to duplicate yourself, and if you do, you shouldn't have to do it very much. Now of course, there are some things within that block of code that you may repeatedly use, but you'll probably do it in a more straightforward, clearer way.

Quote:
 Original post by WayneHaworthSo, advice time, should I read and complete the Beginning C++ through game programming, and then head off to find a library such as SDL or something, or will my knowledge, after reading that book still have far too many gaps before I can even think about delving into graphics etc.
How about you get to the end of the book and then do a self evaluation to see how far along you've progressed? I'd guess it would be safe to move onto something like SDL, but you'll only know once you finish the book.

Quote:
 Original post by WayneHaworthIn other words, should I stop moaning and just knuckle down and read Accelerated C++?
Having never read it, if it's got good introductory material, I'd say yes.

Welcome to GameDev [smile]!

ninja'd++;

##### Share on other sites
Hi, i've just been through the process of trying to learn c++ and game programming and i have just got a game engine together and have implemented a physics engine (PhysX) and starting to build a game.

I started off with basic, just to understand the thought processes needed.
This i suggest is not a great idea as i can create bad habits and when you do something right and the basic compiler interprets it as something different it can become very irritating.

The book you suggested is great, i used it and went stright onto game programming after going through it thoroughly (read and do the example along with it).

I then found a good website for DX tutorials (google directx tutorials called directxtutorials.com i think).

Basically, keep all your programs simple, some of the console based ones can be easy to understand so you example is a bit unfair.

Also c++ is quite easy to get the hang off once you start using it a lot, you begin to understand the debuggers and the syntax errors slowly start to reduce.

I think you;re approching it the right way, keep at it and you'll succeed.

PureBlackSin

##### Share on other sites
Quote:
 Original post by WayneHaworthif I turn towards the end of Accelerated C++

Was it the gardener?

• 21
• 10
• 19
• 14
• 20