Jump to content
The Dark Mod Forums

C++ Programming Books And Resources?


woah

Recommended Posts

I've been using Java for a few, but I'm looking to get into C++ Programming. Rather than just arbitrarily selecting a C++ Programming book or other resource, I'd like to seek the assistance of those here who are well experienced with the language. I'd first like to learn the basics of the language, and then get into some game programming. I understand that searching google would, of course, manifest many resources, but there is so much available it is quite overwhelming.

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

I can only tell you what book NOT to use, and that would be Savitch. Used it for a class, keep it as a reference, but it's still pretty hard to find stuff and is not presented that well IMO. I seem to recall a good book with a blue cover called "Learning C++," but I'm not sure, and when I search Amazon there are about 5 different books with that name, all by different authors.

Link to comment
Share on other sites

*ahem* well I don't know if I qualify as a "real programmer" by whatever standards are behind that term, but anyway...

 

Free online C++ book, extremely good, is what I used as reference and taught myself things from it that were not taught in class.

 

http://newdata.box.sk/bx/c/

 

I also made the jump from Java to C++, so you should be able to do the same as me :) Only difference is I did have class to ask questions in, but you've got us... hehe.

 

Only thing is that all the exercises are done with the header stuff in the same file as the main code, whereas we were taught to write code with seperate header files straight away. Maybe the book is a little out-dated in that respect.

Link to comment
Share on other sites

There is some very good book on the internet and it's even free for download (even though I prefer to have a hardcopy). Unfortunately I don't remember the name as I don't really need it. That's why I didn't post it in the beginning. The only other book I could recommend is in german, so it will probably not be of much use, as I don't know wether a translation exists.

Gerhard

Link to comment
Share on other sites

  • 2 weeks later...

Does C++ actually make sense anymore? Management DirectX seems to be gaining speed...

Too late to save us but try to understand

The seas were empty -- there was hunger in the land

We let the madmen write the golden rules

We were just Children of the Moon

We're lost in the middle of a hopeless world

Children, Children of the Moon watch the world go by

Children, Children of the Moon are hiding from the Sun and the Sky

 

© The Alan Parsons Project - Children of the Moon

Link to comment
Share on other sites

An API is a Application Programming Interface which means that it is a set of functions that can be called by a progammer to do perform some action. For example, if you want to load a file into an editor, the editor has to write some code like this (under Windows)

HINSTANCE handle = CreateFile("path");

if(handle == NULL)
  printf("Unable to open file\n");

 

Now you can clearly see the difference. The call CreateFile() is an API call to perform some system operation. The other stuff like 'if(handle == NULL)' is a C/C++ statement that validates whether the system call worked. The important point here is that the API call is operating system dependent while the language is always the same.

 

So if I wrote the same code under Linux it might look like this:

int handle = open("path");

if(handle == -1)
  printf("Unable to open file\n");

 

And as you can see here - the operating system relevant part has changed, but the language is still the same. Now we have to all open() instead of CreateFile() and the function now returns -1 instead of NULL if it failed, but the validation itself, which is actual C/C++ code is always the same and doesn't change.

 

Therefore you can not compare an API with a language. If you say "Which is better to learn, C++ or DirectX?" it is similar to ask "What tastes better, an apple or a house?"

 

Well, you could still bite into the house and taste it, though. ;)

Gerhard

Link to comment
Share on other sites

Management(managd?) DirectX is a DirectX library especially for .NET(C#). DirectX regular is not supposed to work for C# at all. Or works badly. I'm not sure about that, there is just some problem with it.

Too late to save us but try to understand

The seas were empty -- there was hunger in the land

We let the madmen write the golden rules

We were just Children of the Moon

We're lost in the middle of a hopeless world

Children, Children of the Moon watch the world go by

Children, Children of the Moon are hiding from the Sun and the Sky

 

© The Alan Parsons Project - Children of the Moon

Link to comment
Share on other sites

Doom 3 does not use DirectX, neither will any future id games I imagine. Carmack is very much in favour of open standards so he uses OpenGL for his games. This also means they can be easily ported to Linux which is not the case for DirectX applications.

Link to comment
Share on other sites

In Vista the Desktop will use 3d functions and they will use, guess what, DirectX for this. Also they said that this means that OpenGL will not work properly any more and it needs special support, because MS will only implement the bare minimum of the 1.X (or was it 2.0?) Standard.

I don't remember all the details, but the concern was that this could be targeted to destroy OpenGL because one of the most important platforms will no longer properly support it.

 

Ah! Just remembered one of the main arguments. It would still work for normal games, because they usually run in full screen mode. What will no longer work is overlay. I don't really understand this, because currently you can run an OpenGL and a DirectX application in windowed mode side by side and it works fine. If this doesn't work anymore, it means that all the 3D apps, which are ported to other system, will have to be rewritten, because they usually use OpenGL for obvious reasons. So if the major apps are really rewritten to use DirectX in the future, this could be a severe blow for Linux, because I doubt that companies would write a port that supports boths systems if they have to do major rewrites. If GFX card manufacturer also follow suit, then this would be a very big blow for Linux and it's quest for the desktop.

Gerhard

Link to comment
Share on other sites

I doubt Microsoft will break OpenGL too thoroughly though, as it would be a major embarassment if Vista users lost the ability to play all of id's current titles.

 

Even if Microsoft don't support OpenGL anymore, somebody else will provide the special support you mention.

Link to comment
Share on other sites

Breaking it completely is certainly not a strategy, after all they don't want to get blamed for it. The strategy is to make it mostly usless (aka much slower) and if customers complain they can happily tell them that DirectX works in full speed and they should switch. The impact is not that OpenGL will not work at all, the impact will be that it will be bloody slow. And the average user will accept an answer from the helpdesk like "OpenGL is outdated and possibly can not keep up with current demands so you should use the much modern DirectX interface."

The details are coming back slowly. :)

Gerhard

Link to comment
Share on other sites

And the average user will accept an answer from the helpdesk like "OpenGL is outdated and possibly can not keep up with current demands so you should use the much modern DirectX interface."

The details are coming back slowly. :)

 

Except that the average users are not the ones making the decisions, it is the developers of the games. I can almost imagine it:

 

"Sorry Mr Carmack, OpenGL is outdated and possibly can not keep up with current demands so you should use the much modern DirectX interface...click...hello?...hello?"

Link to comment
Share on other sites

Strange, I heard that when Carmack complained about DirectX at first, the MS people prooved to him that DirectX is cool. But that was a long time ago. Anyway, well, Carmack can write in Fortran and use Glide for his games if he thinks it's a better choice. But writing in C++ only because it is much more useful in a master's hands is virtually the same as dropping out of Universities because Bill Gates did. Not all people can become millionaires in this sphere. Carmack uses C. Should everyone use C now? You'll write better in C# than in C if you are not a doctor in programming. But if you here are all experts - well sorry. I thought if you WERE you wouldn't need a DooM 3 Engine.

Too late to save us but try to understand

The seas were empty -- there was hunger in the land

We let the madmen write the golden rules

We were just Children of the Moon

We're lost in the middle of a hopeless world

Children, Children of the Moon watch the world go by

Children, Children of the Moon are hiding from the Sun and the Sky

 

© The Alan Parsons Project - Children of the Moon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...