Cocos2d Cross-Platform Game Development Cookbook, 2/e(Paperback)

Siddharth Shekar

  • 出版商: Packt Publishing
  • 出版日期: 2016-02-19
  • 售價: $2,060
  • 貴賓價: 9.5$1,957
  • 語言: 英文
  • 頁數: 384
  • 裝訂: Paperback
  • ISBN: 1784393231
  • ISBN-13: 9781784393236
  • 相關分類: 遊戲引擎 Game-engine
  • 下單後立即進貨 (約3~4週)

商品描述

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,以及使用Cocos2d的Swift/Sprite builder實現。
- 使用易於遵循的食譜開發並部署遊戲到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插件。

本書以非常清晰和逐步的方式撰寫,任何人都可以輕鬆理解。所包含的主題被分解為單獨的章節,因此您可以參考特定章節以獲得您感興趣的主題的答案。