Cocos2d Cross-Platform Game Development Cookbook, 2/e(Paperback)
暫譯: Cocos2d 跨平台遊戲開發食譜(第二版,平裝本)
Siddharth Shekar
- 出版商: Packt Publishing
- 出版日期: 2016-02-19
- 售價: $2,220
- 貴賓價: 9.5 折 $2,109
- 語言: 英文
- 頁數: 384
- 裝訂: Paperback
- ISBN: 1784393231
- ISBN-13: 9781784393236
-
相關分類:
遊戲引擎 Game-engine
海外代購書籍(需單獨結帳)
相關主題
商品描述
Develop games for iOS and Android using Cocos2d with the aid of over 70 step-by-step recipes
About This Book
- Learn to efficiently use Cocos2d to develop cross-platform games, and have them work on iOS as well as Android
- Get acquainted with industry-wide professional tools such as Glyph Designer, Texture Packer, and Physics Editor, as well as using the Swift/ Sprite builder implementation of Cocos2d
- Use the easy-to-follow recipes to develop as well as deploy games to the Playstore and the App Store
Who This Book Is For
This book is for intermediate game developers and especially the ones who are generally curious to find out what's new in Cocos2d v 3.3.
What You Will Learn
- Build custom sprites with custom animations for the game
- Build interactivity into your game by adding gestures and touch interactions
- Understand AI enemy programming and path finding to make games more exciting
- Add physics to your game to make it more lively and interactive
- Get familiar with the Swift and Sprite builder implementations along with Objective-C programming
- Perform hassle-free deployment of games built in iOS onto Android
- Add effects and particle systems to make the game more colorful
In Detail
Cocos2d is the world's leading game development framework for developing iOS games. With the introduction of Swift and Spritebuilder, it has become easier than ever to develop the games of your dreams without much effort. With Cocos2d, you can also deploy the game on Android, thereby maximizing profit and reducing development and porting costs.
The book starts off with a detailed look at how to implement sprites and animations into your game to make it livelier. You will then learn to add scenes to the game such as the gameplay scene and options scene and create menus and buttons in these scenes, as well as creating transitions between them. From there on, you will get an understanding of how to program user interactions such as tapping, holding, and swiping. You'll then add accelerometer inputs and physics to the scene, and make objects respond back to the inputs. A game is practically incomplete without audio being added, so this will be covered next.
The next section will include ways to add Artificial Intelligence to enemies in the game, allowing them to patrol, chase, and shoot in a projectile manner. You will then learn to use NSUserDefault to save and load game progress, and create and access files using JSON, Plist, and XML files for custom storage and retrieval of data. Then you will learn to add dynamic lighting to your game and will use industry-wide tools such as Texture Packer, Glyph Designer, Physics Editor, Particle Designer, and Sprite Illuminator to create more visually appealing and performance-optimized games.
Towards the end of the book, we dive into Apple's latest programming language―Swift, highlighting the major differences between Objective C and Swift. The book culminates with taking your existing game developed for iOS and porting it to Android, showing you how to install the Android Xcode plugin as well.
Style and approach
The book is written in an extremely lucid and step-by-step manner; it can be understood easily by anyone. The topics included are broken down into individual chapters so you can refer to the specific chapter to get answers on the subject you are interested in.
商品描述(中文翻譯)
使用 Cocos2d 開發 iOS 和 Android 遊戲,並透過超過 70 個逐步食譜輔助
本書介紹
- 學習有效使用 Cocos2d 開發跨平台遊戲,並使其在 iOS 和 Android 上運行
- 熟悉業界專業工具,如 Glyph Designer、Texture Packer 和 Physics Editor,以及使用 Swift/Sprite builder 實現 Cocos2d
- 使用易於遵循的食譜開發並部署遊戲到 Playstore 和 App Store
本書適合對象
本書適合中階遊戲開發者,特別是對 Cocos2d v 3.3 的新功能感到好奇的人。
您將學到的內容
- 為遊戲構建自定義精靈和自定義動畫
- 通過添加手勢和觸控互動來增強遊戲的互動性
- 理解 AI 敵人編程和路徑尋找,使遊戲更具刺激性
- 為遊戲添加物理效果,使其更生動和互動
- 熟悉 Swift 和 Sprite builder 實現以及 Objective-C 編程
- 輕鬆將在 iOS 上構建的遊戲部署到 Android
- 添加效果和粒子系統,使遊戲更具色彩
詳細內容
Cocos2d 是全球領先的遊戲開發框架,用於開發 iOS 遊戲。隨著 Swift 和 Spritebuilder 的引入,開發夢想中的遊戲變得比以往任何時候都容易。使用 Cocos2d,您還可以將遊戲部署到 Android,從而最大化利潤並降低開發和移植成本。
本書首先詳細介紹如何將精靈和動畫實現到您的遊戲中,使其更具活力。接著,您將學習如何為遊戲添加場景,例如遊戲場景和選項場景,並在這些場景中創建菜單和按鈕,以及創建場景之間的過渡。從那裡,您將了解如何編程用戶互動,例如點擊、長按和滑動。然後,您將為場景添加加速度計輸入和物理效果,並使物體對輸入做出反應。遊戲幾乎無法完整,若未添加音效,因此這部分將在接下來的內容中涵蓋。
接下來的部分將包括如何為遊戲中的敵人添加人工智慧,使其能夠巡邏、追逐和以拋射方式射擊。然後,您將學習使用 NSUserDefault 來保存和加載遊戲進度,並使用 JSON、Plist 和 XML 文件創建和訪問文件,以便自定義存儲和檢索數據。接著,您將學習為遊戲添加動態照明,並使用業界工具,如 Texture Packer、Glyph Designer、Physics Editor、Particle Designer 和 Sprite Illuminator,來創建更具視覺吸引力和性能優化的遊戲。
在本書的結尾,我們將深入探討蘋果最新的編程語言——Swift,強調 Objective-C 和 Swift 之間的主要差異。本書的最後部分將展示如何將您為 iOS 開發的現有遊戲移植到 Android,並告訴您如何安裝 Android Xcode 插件。
風格與方法
本書以極其清晰和逐步的方式撰寫,任何人都能輕鬆理解。所包含的主題被分解為單獨的章節,您可以參考特定章節以獲得您感興趣主題的答案。