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)
買這商品的人也買了...
-
$1,250$1,225 -
$750$593 -
$880$695 -
$590$578 -
$490$382 -
$780$702 -
$650$507 -
$450$383 -
$270$213 -
$980$774 -
$880$695 -
$520$406 -
$580$522 -
$480$379 -
$720$569 -
$650$514 -
$580$452 -
$550$495 -
$620$490 -
$720$569 -
$490$441 -
$780$616 -
$540$459 -
$680$578 -
$650$514
相關主題
商品描述
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
商品描述(中文翻譯)
描述
《透過製作遊戲學習 C++》以獨特且有趣的角度教授 C++ 的基礎知識。書中使用遊戲專用的程式碼和範例,幫助任何想要學習 C++ 的人從基礎到更高級的主題進步。當你學習 C++ 時,你將通過在書的每個部分中編寫遊戲項目來將代碼和技巧付諸實踐。本書從介紹 C++ 語言的基礎知識開始,包括語言的基本數據類型。然後進一步創建和定義變量,基本數學運算符以及各種循環結構。接下來,你將學習如何使用函數使代碼更易讀和可維護,以及將源代碼分解為多個文件以提高可讀性的技巧。然後你將轉向數據結構,並探索使用集合來存儲多個數據類型的概念。在這些 C++ 基礎知識牢固應用之後,你將準備好學習指針的基礎知識,這對於你的所有 C++ 編程都是必需的。接下來是面向對象編程(OOP)概念的介紹,包括類、對象、繼承、虛方法和多態性。然後介紹了讀寫數據文件(序列化)的方法。本書最後探討了如何使用 Simple DirectMedia Layer 來顯示圖形和處理基本輸入、聲音、鏈表、模板以及各種更高級的主題,包括使用 SDL 創建簡單演示。本書非常適合作為入門 C++ 課程的教材,或者任何想要通過創建遊戲項目自學 C++ 的人使用!
目錄
第一部分 C++ 編程基礎:第 1 章 編程介紹,第 2 章 必備的 Hello World 程序及其結構,第 3 章 變量、常量和易失性變量,第 4 章 基本數據類型、枚舉、typedef,第 5 章 控制台輸入/輸出,第 6 章 字符串,第 7 章 遊戲 #1,第二部分 C++ 語句和結構:第 8 章 賦值和類型轉換,塊,第 9 章 條件語句,第 10 章 遊戲 #2:最後一根稻草,第三部分 函數:包括庫和使用預定義函數:第 11 章 隨機數,第 12 章 定義自己的函數,第 13 章 函數參數,第 14 章 變量作用域規則,第 15 章 內聯函數 vs 宏,第 16 章 遊戲 #3:二十一點,第四部分 基本數據結構:第 17 章 一維數組,第 18 章 遞歸,第 19 章 結構,第 20 章 聯合,第 21 章 遊戲 #4:猜數字,第五部分 指針:第 22 章 指針介紹,第 23 章 指針算術,指針參數,第 24 章 指針和數組的比較,第 25 章 遊戲 #5:可變大小的踩地雷,第六部分 面向對象編程:OOP 的概念:第 26 章 類、對象和組合,第 27 章 從內部和外部訪問數據和函數成員,訪問限定符,第 28 章 對象的構造和析構,第 29 章 類 vs 結構,第 30 章 面向對象分析,繼承和類層次結構,第 31 章 虛函數和虛基類,第 32 章 遊戲 #6:黑白棋,第七部分 文件和流:第 33 章 文本文件和 fstream,第 34 章 對象序列化,第 35 章 遊戲 #7:為黑白棋添加保存遊戲,第八部分 使用 SDL 的圖形遊戲:第 37 章 在網絡上尋找 SDL 和免費編譯器的位置;第 38 章 SDL 圖形的快速入門,第 39 章 定義 GraphicalEntity 類