I am reading a book on 2D game programming, and I can't remember much of the code, although I understand how it works and am able to do some simple modifications, though I'm stuck on one, probably a bit more advanced one now.
I am wondering how usually the process of learning a programming language goes - is it okay if I don't remember most of the code and just understand the way it works. I'm not really good with memorizing "static" things usually - for example at school I always can retell a text from two A4 pages by reading it once for an A or A+, but I can't recall mathematical formulas by reading them 20 times. Same goes for the code.
As for my current knowledge (if that matters) - I know the basics of C++, a bit of C and learning Win32 basics from a book about game programming. My ultimate goal is to create some nice little games (I have a lot of ideas in my mind) that people could enjoy. Although I'm a bit afraid of graphics design at the moment, but for now - I want to learn the code.
Yes, I think it is fine dude...when I was learning C, I had the whole library in my head, advantage is it..is faster, even better for exams...but in the real world...I could just check my books or go to the website and look up how a function works..much easier (yes, I decided to be lazy)...As long as you understand the code it is grand.
When I "learnt" C++...our first lecture was to make a bloody game and do it ourselves. Of course many were not happy about it..but at least I and some had basic knowledge of OOP concepts after.
I suggest you start with some C++ concepts, especially Classes and Objects and Inheritance..then polymorphism..I used it without understanding it a lot :( I'm rectifying that mistake now.
But those concepts are bloody useful. Try some asteroids or something. While many of my classmates might hate to hear it..but I think programming games from the start was the best way to go...although he should've worked on the math, I bloody suck at math. If you know math, you are lucky and I hate you :P
I think programming a simple game to start with is a good way to learn concepts but ultimately you will have to read more academic books to really understand the language and learn it. There is little benefit to memorizing syntactical sugar or this CRT function or that function b/c all of that can be looked up in API docs, etc. I think it is far more important to know which CRT functions to use in which situations as opposed to knowing all of them by heart. When I program I normally have the Direct3D SDK open, the Windows SDK open, documentation for any 3rd party libraries I may be using open, and several websites. Knowing what sprintf() does and when to use it is far better than just memorizing sprintf() as a function without remembering what it does or what it is for.