Learn C++ By Making Games

Erik Yuzwa, Francois Dominic Laramee

  • 出版商: Charles River Media
  • 出版日期: 2006-08-04
  • 定價: $1,580
  • 售價: 2.5$399
  • 語言: 英文
  • 頁數: 450
  • 裝訂: Paperback
  • ISBN: 1584504552
  • ISBN-13: 9781584504559
  • 相關分類: C++ 程式語言

立即出貨(限量) (庫存=1)

買這商品的人也買了...

相關主題

商品描述

Description

Learn C++ by Making Games teaches the fundamentals of C++ from a unique and fun perspective. Using game specific code and examples, the book helps anyone wanting to learn C++ progress from the basics to more advanced topics. As you learn C++, you’ll be putting the code and techniques into practice by programming a game project in each part of the book. The book begins with an introduction to the fundamentals of the C++ language, including the basic data types of the language. It then progresses further into creating and defining variables, basic mathematical operators, and the various loop structures at your disposal. Next, you’ll learn how to use functions to make code more readable and maintainable, along with techniques for breaking up source code into several files for readability. From there you’ll move to data structures and explore concepts such as using collections to store multiple copies of a data type. With these foundations of C++ firmly applied, you’ll be ready to learn the basics of pointers that you’ll need for all of your C++ programming. Next comes an introduction to object-oriented programming (OOP) concepts, including classes, objects, inheritance, virtual methods, and polymorphism. From there, reading and writing data files (serialization) are covered. The book concludes with an exploration of how to use the Simple DirectMedia Layer to display graphics and handle basic input, sound, linked lists, templates, along with a variety of more advanced topics, including using SDL to create a simple demo. This book is ideal for an introductory C++ course, or for anyone wanting to teach themselves C++ through the creation of game projects!

 

Table of Contents

PART I Fundamentals of C++ Programming: Ch 1 Introduction to Programming, Ch 2 The Mandatory Hello World Program and Its Structure, Ch 3 Variables, Constants and Volatile Variables, Ch 4 Basic Data Types, Enums, Typedefs, Ch 5 Console input/output, Ch 6 Strings, Ch 7 Game #1, PART II C++ Statements and Constructs: Ch 8 Assignment and Typecasting, Blocks, Ch 9 Conditional Statements, Ch 10 Game #2: The Last Straw, PART III Functions: Including Libraries and Using Predefined Functions: Ch 11 Random Numbers, Ch 12 Defining Your Own Functions, Ch 13 Function Parameters, Ch 14 Variable Scope Rules, Ch 15 Inline Functions vs Macros, Ch 16 Game #3: Blackjack, PART IV Elementary Data Structures: Ch 17 One-Dimensional Arrays, Ch 18 Recursion, Ch 19 Structures, Ch 20 Unions, Ch 21 Game #4: Mastermind, PART V Pointers: Ch 22 Introduction to Pointers, Ch 23 Pointer Arithmetic, Pointer Parameters, Ch 24 Comparisons Between Pointers and Arrays, Ch 25 Game #5:Variable-sized Minesweeper, PART VI Object-Oriented Programming: Concepts of OOP: Ch 26 Classes,Objects, and Composition, Ch 27 Accessing Data and Function Members from Inside and from Outside the Objects,Access Qualifiers, Ch 28 Object Construction and Destruction, Ch 29 Classes vs Structs, Ch 30 OO Analysis, Inheritance and Class Hierarchies, Ch 31 Virtual Functions and Virtual Base Classes, Ch 32 Game #6: Othello, PART VII Files and Streams: Ch 33 Text Files and fstreams, Ch 34 Object Serialization, Ch 35 Game #7: Adding a Savegame to Othello, PART VIII Graphical Games with SDL: Ch 37 Where to find SDL and free compilers on the Web; Ch 38 Crash Course in SDL Graphics, Ch 39 Defining GraphicalEntity class that can show itself in SDL; Ch 40 Covering input and sound in SDL; Ch 41 Game #8: Graphical Othello; Part IX: Advanced C++ Topics: Ch 42 Introduction to Linked Lists; Ch 43 Discussion of Templates; Ch 44 Introduction to Exception Handling; Ch 45 Introduction to Containers and Iterators; Ch 46 Game #9: A Simple Tetrus Clone with STL and SDL; Appendix A: About the CD-ROM; Index