Learning C ++ through Game Programming

    Hi, Habrahabr.

    In this post we want to tell you about Michael Dawson’s good book “ Beginning C ++ Through Game Programming ”. Many people are familiar with Michael's work in the book " Programming in Python ", which many liked. Once we talked about her in our blog. We have not yet made a final decision on the publication of the book, so we decided once again to consult with you. As a review, we translated the opinion of www.gamedev.net . In terms of content, the C ++ book resembles Python, since it has the same style - learning through game programming.



    The book “Beginning C ++ Through Game Programming” is a much deeper work than similar books on programming games in dynamic languages, such as Python, ActionScript or Java - and this is not surprising. In books on programming games in dynamic languages, many important topics - for example, memory management are considered almost briefly. They are discussed in the final chapters on the topic of “optimization,” and the authors often discuss only such details as calling the garbage collector less often. But C ++ is known for its applied approach to memory management, and topics such as pointers and references and memory management as such come to the fore here. Therefore, the book “Beginning C ++ Through Game Programming” covers a slightly different range of topics than other books on game programming, whose authors talk about dynamic languages. For example, in a 400-page book on ActionScript, it is quite possible to describe the development of 10 full-fledged games, while a book on C ++ on page 400 will still cover theoretical topics such as overload operators and deep copying of objects. The thing is that C ++ is one of the most fundamental and complex programming languages ​​that are widely used today. To create an object, it is not enough just to “declare its existence” - although in most dynamic languages ​​nothing more is required of you. And for an object to disappear in C ++, it’s not enough just to “forget about it” for a while. and in the book on C ++ on page 400 theoretical topics, such as overload operators and deep copying of objects, will still be considered. The thing is that C ++ is one of the most fundamental and complex programming languages ​​that are widely used today. To create an object, it is not enough just to “declare its existence” - although in most dynamic languages ​​nothing more is required of you. And for an object to disappear in C ++, it’s not enough just to “forget about it” for a while. and in the book on C ++ on page 400 theoretical topics, such as overload operators and deep copying of objects, will still be considered. The thing is that C ++ is one of the most fundamental and complex programming languages ​​that are widely used today. To create an object, it is not enough just to “declare its existence” - although in most dynamic languages ​​nothing more is required of you. And for an object to disappear in C ++, it’s not enough just to “forget about it” for a while.

    I am afraid that it is precisely such difficulties that deter many developers from C ++. In the book “C ++ Through Game Programming” you will not find any complex full-featured games. Here you will learn how to write games controlled through the command line - in particular, “tic-tac-toe” and “gallows”. But (and this is important!) Such games will be built in strict accordance with object-oriented design. Maybe such a severity is superfluous in such a trivial game as the "gallows", but in those games that you will write after reading this book, the acquired knowledge and skills will be very useful.

    Undoubtedly, the game “Hangman” can be written in Python - it will consist of about 100 lines, and all the work will require you no more than half an hour. However, many of the tricks that you learn when writing such a game quickly will not be applicable in a game with 100,000 lines of code. Or a million lines. The essence of the book “Beginning C ++ Through Game Programming” is not to teach you how to program “Hangman” in a hundred lines, so that after that you can feel like a real game developer. In this book, you will learn how to implement reliable projects that will scale well, while remaining convenient to support. The techniques that you learn in this book will come in handy for you when working on larger projects.

    The book “Beginning C ++ Through Game Programming” will be useful to the reader who wants to take the first step to the development of large projects. The problem is that this first step is far from being as interesting as in other similar books. Having worked through this book, you cannot write a cool game in C ++ and then trump it with your friends. But you can get ideas out of this book that will later come in handy when implementing simply amazing projects.

    The main problem that I had with the book “Beginning C ++ Through Game Programming” is the same as with other books of this kind - Mac and Linux operating systems are considered at the level: “believe me, all this code will work in them, but we we will not stop there. ” Given that the book contains five pages dedicated to customizing Visual C ++ Express and compiling the project, five pages - Xcode and five pages - the IDE for Linux of your choice, this is worth paying attention to. If you can read this book as cross-platform, then perhaps it is worth reading it.

    Only registered users can participate in the survey. Please come in.

    What is your opinion?


    Also popular now: