Learn C++ By Making Games
暫譯: 透過遊戲學習 C++
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$638 -
$880$695 -
$590$578 -
$490$382 -
$780$663 -
$650$507 -
$450$383 -
$270$230 -
$980$774 -
$880$695 -
$520$406 -
$580$493 -
$480$379 -
$720$612 -
$650$514 -
$580$452 -
$550$468 -
$620$490 -
$720$612 -
$490$417 -
$780$616 -
$540$459 -
$680$578 -
$650$553
相關主題
商品描述
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 章 基本資料類型、枚舉、類型定義,第 5 章 控制台輸入/輸出,第 6 章 字串,第 7 章 遊戲 #1,第二部分 C++ 語句和結構:第 8 章 指派和類型轉換、區塊,第 9 章 條件語句,第 10 章 遊戲 #2:最後一根稻草,第三部分 函數:包括庫和使用預定義函數:第 11 章 隨機數,第 12 章 定義自己的函數,第 13 章 函數參數,第 14 章 變數範圍規則,第 15 章 內聯函數與宏,第 16 章 遊戲 #3:二十一點,第四部分 基本資料結構:第 17 章 一維陣列,第 18 章 遞迴,第 19 章 結構,第 20 章 聯合,第 21 章 遊戲 #4:推理遊戲,第五部分 指標:第 22 章 指標簡介,第 23 章 指標運算,第 24 章 指標與陣列的比較,第 25 章 遊戲 #5:可變大小的掃雷,第六部分 物件導向程式設計:OOP 概念:第 26 章 類別、物件和組合,第 27 章 從內部和外部訪問資料和函數成員、訪問修飾符,第 28 章 物件的構造與銷毀,第 29 章 類別與結構,第 30 章 OO 分析、繼承和類別層次結構,第 31 章 虛擬函數和虛擬基類,第 32 章 遊戲 #6:黑白棋,第七部分 檔案與串流:第 33 章 文本檔案和 fstreams,第 34 章 物件序列化,第 35 章 遊戲 #7:為黑白棋添加存檔,第八部分 使用 SDL 的圖形遊戲:第 37 章 在網路上找到 SDL 和免費編譯器;第 38 章 SDL 圖形速成課程,第 39 章 定義可以在 SDL 中顯示自己的 GraphicalEntity 類;第 40 章 涵蓋 SDL 中的輸入和聲音;第 41 章 遊戲 #8:圖形黑白棋;第九部分:進階 C++ 主題:第 42 章 鏈結串列簡介;第 43 章 模板討論;第 44 章 異常處理簡介;第 45 章 容器和迭代器簡介;第 46 章 遊戲 #9:使用 STL 和 SDL 的簡單俄羅斯方塊克隆;附錄 A:關於 CD-ROM;索引