{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Cocos2d-x学习笔记——完全掌握C++ API与游戏项目开发(未来书库)

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Cocos2d-x学习笔记——完全掌握C++ API与游戏项目开发(未来书库)

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

《Cocos2d-x学习笔记》由触控未来CEO李志远主编策划出版,由Cocos资深专家赵志荣、关东升(Cocos CVP)根据研发经验及读者学习规律,精心编撰。该系列图书得到了Cocos引擎创始人王哲的鼎力支持,并亲自作序。51CTO学院运营总监曹亚莉、触控爱普众创创始人肖涵泉、火云洞红孩儿卞安,LoopTek公司柯博文CTO通读全书,并写书评推荐。


Content Description

本书系统论述了Cocos2dx游戏编程和开发技术,内容涵盖Cocos2dx中核心类、数据结构、瓦片地图、物理引擎、Audio引擎、内存管理等知识。全书分为17章,各章内容为: 本书约定、Cocos2dx环境搭建、Cocos2dx引擎、游戏中的文字、Cocos2dx中的数据结构、菜单、精灵、场景与层、动作和动画、用户事件、Audio引擎、粒子系统、瓦片地图、物理引擎、内存管理、Cocos2dx多分辨率屏幕适配和Cocos2dx敏捷开发项目实战——迷失航线手机游戏。 本书适合作为普通高校计算机、动漫设计、数字媒体等相关专业的游戏开发课程的教材,也适合作为手机游戏开发培训机构的培训教材及广大手机游戏开发者的自学参考用书。

Catalogue

目录



丛书序3


序5


前言7


学习说明9


第1章本书约定


1.1使用实例代码


1.2图示的约定


1.2.1图中的箭头


1.2.2图中的手势


1.2.3图中的圈框


1.3书中的UML图


1.3.1类图


1.3.2时序图


第2章Cocos2dx环境搭建


2.1下载Cocos2dx


2.2搭建环境


2.2.1基本工具安装


2.2.2设置环境变量


2.3开发Cocos2dx游戏的IDE工具


2.3.1使用Visual Studio开发工具


2.3.2使用Xcode开发工具


本章小结


第3章Cocos2dx引擎


3.1Cocos2d家谱


3.2Cocos2dx设计目标


3.3第一个Cocos2dx游戏


3.3.1创建工程


3.3.2Visual Studio工程文件结构


3.3.3Xcode工程文件结构


3.3.4代码解释


3.3.5Win32平台下设置屏幕


3.3.6工程中添加资源文件


3.4Cocos2dx核心概念


3.4.1导演


3.4.2场景


3.4.3层


3.5Node与Node层级架构


3.5.1Node中的重要操作


3.5.2Node中的重要属性


3.5.3游戏循环与调度


3.6Cocos2dx坐标系


3.6.1UI坐标


3.6.2OpenGL坐标


3.6.3世界坐标和模型坐标


本章小结


第4章游戏中的文字


4.1Cocos2dx中的字符串


4.1.1使用const char*和std::string


4.1.2使用cocos2d::String


4.1.3Win32平台下的中文乱码问题


4.2使用标签


4.2.1使用Label类


4.2.2标签中文无法正常显示的问题


4.3位图字体制作


4.3.1Glyph Designer工具


4.3.2使用Glyph Designer制作位图字体


本章小结


第5章Cocos2dx中的数据结构


5.1Cocos2dx中两大类——Ref和Value


5.1.1Cocos2dx根类——Ref


5.1.2包装类Value


5.2Ref列表数据结构


5.2.1Array数据结构


5.2.2实例: Array数据结构


5.2.3Vector数据结构


5.2.4实例: Vector数据结构


5.3Ref字典数据结构


5.3.1Dictionary数据结构


5.3.2实例: Dictionary数据结构


5.3.3Map数据结构


5.3.4实例: Map数据结构


5.4Value列表数据结构——ValueVector


5.4.1ValueVector常用API


5.4.2实例: 使用ValueVector数据结构


5.5Value字典数据结构——ValueMap和ValueMapIntKey


5.5.1ValueMap和ValueMapIntKey常用API


5.5.2实例: 使用ValueMap数据结构


本章小结


第6章菜单


6.1菜单相关类


6.2文本菜单


6.3精灵菜单和图片菜单


6.4开关菜单


本章小结


第7章精灵


7.1Sprite精灵类


7.1.1创建Sprite精灵对象


7.1.2实例: 使用纹理对象创建Sprite对象


7.2精灵的性能优化


7.2.1使用纹理图集


7.2.2使用精灵帧缓存


7.3纹理图集制作


7.3.1TexturePacker工具


7.3.2使用TexturePacker制作纹理图集


本章小结


第8章场景与层


8.1场景与层的关系


8.2场景切换


8.2.1场景切换相关函数


8.2.2场景过渡动画


8.3场景的生命周期


8.3.1生命周期函数


8.3.2多场景切换生命周期


本章小结


第9章动作和动画


9.1基本动作


9.1.1瞬时动作


9.1.2间隔动作


9.1.3组合动作


9.1.4动作速度控制


9.1.5函数调用


9.2特效


9.2.1网格动作


9.2.2实例: 特效演示


9.3动画


9.3.1帧动画


9.3.2实例: 帧动画使用


本章小结


第10章用户事件


10.1事件处理机制


10.1.1事件分发器


10.1.2触摸事件


10.1.3实例: 单点触摸事件


10.1.4实例: 使用Lambda表达式


10.1.5键盘事件


10.1.6鼠标事件


10.2在层中进行事件处理


10.2.1触摸事件


10.2.2实例: 单点触摸事件


10.3加速度计与加速度事件


10.3.1加速度计


10.3.2使用事件分发器


10.3.3使用层加速度计事件


10.3.4实例: 运动的小球


本章小结


第11章Audio引擎


11.1Cocos2dx中音频文件


11.1.1音频文件介绍


11.1.2Cocos2dx跨平台音频支持


11.2使用Audio引擎


11.2.1音频文件的预处理


11.2.2播放背景音乐


11.2.3停止播放背景音乐


11.2.4背景音乐播放暂停与继续


11.3实例: 设置背景音乐与音效


11.3.1AppDelegate实现


11.3.2HelloWorld场景实现


11.3.3设置场景实现


本章小结


第12章粒子系统


12.1问题的提出


12.2粒子系统基本概念


12.2.1实例: 打火机


12.2.2粒子发射模式


12.2.3粒子系统属性


12.3Cocos2dx内置粒子系统


12.3.1内置粒子系统


12.3.2实例: 内置粒子系统


12.4自定义粒子系统


12.4.1代码创建


12.4.2plist文件创建


12.5粒子系统设计工具Particle Designer


12.5.1粒子设置面板


12.5.2使用分享案例


12.5.3粒子的输出


本章小结


第13章瓦片地图


13.1地图性能问题


13.2Cocos2dx中瓦片地图API


13.3使用Tiled地图编辑器


13.3.1新建地图


13.3.2导入瓦片集


13.3.3创建层


13.3.4在普通层上绘制地图


13.3.5在对象层上添加对象


13.4实例: 忍者无敌


13.4.1设计地图


13.4.2程序中加载地图


13.4.3移动精灵


13.4.4检测碰撞


13.4.5滚动地图


本章小结


第14章物理引擎


14.1使用物理引擎


14.1.1物理引擎核心概念


14.1.2物理引擎与精灵关系


14.2Cocos2dx 3.x中物理引擎封装


14.2.1Cocos2dx 3.x物理引擎API


14.2.2实例: HelloPhysicsWorld


14.2.3实例: 接触与碰撞检测


14.2.4实例: 使用关节


本章小结


第15章内存管理


15.1C++内存管理


15.1.1内存分配区域


15.1.2动态内存分配


15.2Ref内存管理


15.2.1内存引用计数


15.2.2自动释放池


15.2.3Ref内存管理规则


15.3Ref内存管理设计模式


15.3.1使用静态构造函数


15.3.2使用访问器


15.4其他类型内存管理


15.4.1Value内存管理


15.4.2Vector和Map内存管理


本章小结


第16章Cocos2dx多分辨率屏幕适配


16.1屏幕适配问题的提出


16.2Cocos2dx屏幕适配


16.2.1三种分辨率


16.2.2分辨率策略


16.2.3纹理图集资源适配


16.2.4瓦片地图资源适配


本章小结


第17章Cocos2dx敏捷开发项目实战——迷失航线手机游戏


17.1迷失航线游戏分析与设计


17.1.1迷失航线故事背景


17.1.2需求分析


17.1.3原型设计


17.1.4游戏脚本


17.2任务1: 游戏工程的创建与初始化


17.2.1迭代1.1: 创建工程


17.2.2迭代1.2: 多分辨率支持


17.2.3迭代1.3: 通用类与基类维护


17.3任务2: 创建Loading场景


17.3.1迭代2.1: 添加场景和层


17.3.2迭代2.2: Loading动画


17.3.3迭代2.3: 异步加载纹理缓存


17.3.4迭代2.4: 异步预处理声音


17.4任务3: 创建Home场景


17.4.1迭代3.1: 添加场景和层


17.4.2迭代3.2: 添加菜单


17.5任务4: 创建设置场景


17.6任务5: 创建帮助场景


17.7任务6: 游戏场景实现


17.7.1迭代6.1: 创建敌人精灵


17.7.2迭代6.2: 创建玩家飞机精灵


17.7.3迭代6.3: 创建炮弹精灵


17.7.4迭代6.4: 初始化游戏场景


17.7.5迭代6.5: 游戏场景菜单实现


17.7.6迭代6.6: 玩家飞机发射炮弹


17.7.7迭代6.7: 炮弹与敌人的碰撞检测


17.7.8迭代6.8: 玩家飞机与敌人的碰撞检测


17.7.9迭代6.9: 玩家飞机生命值显示


17.7.10迭代6.10: 显示玩家得分情况


17.8任务7: 游戏结束场景


本章小结


Introduction

手机游戏产业的发展越来越火热,很多公司推出了自己的游戏引擎,北京触控科技有限公司的Cocos2dx游戏引擎就是其中的佼佼者,它的优势在于实现了“一个平台开发、多个平台发布”。截至2016年初,Cocos2dx游戏引擎在全球199个国家和地区有超过40万开发者使用,已经成为全球使用率最高的手机游戏引擎之一。

为了推动Cocos2dx游戏引擎在我国高校与相关行业的应用与普及,提高相关专业人才培养及游戏产业发展的水平,进一步提高普通高校计算机、动漫设计、数字媒体等专业游戏类课程的教学质量,满足各大高校不断增长的人才培养需求、教学改革与课程改革要求,北京触控科技有限公司与清华大学出版社立项开展了《未来书库》的建设工作。我有幸受触控教育部门之邀,专门为广大高校师生、培训机构及有志于从事Cocos2dx游戏开发的读者撰写此书。

Cocos2dx游戏引擎提供了三种语言(C++/JavaScript/Lua)的API,开发者可以根据自己的技术背景选择不同语言。本书专门论述C++语言API,并以游戏项目开发的实例,抛砖引玉,教会读者动手实践。

关于源代码

为了更好地为广大读者提供服务,我们专门为本书建立了一个网站https://www.51work6.com/book/cocos1.php,大家可以查看相关出版进度,并对书中内容发表评论,提出宝贵意见。

勘误与支持

我们在网站https://www.51work6.com/book/cocos1.php中建立了一个勘误专区,及时地把书中的问题、失误和纠正反馈给广大读者。如果您在阅读本书过程中,发现了任何问题,可以在网上留言,可以发送电子邮件到eorient@sina.com,也可以在新浪微博中与我们联系: @tony_关东升。我们会在第一时间回复您。

本书主要由赵志荣、关东升执笔撰写。此外,智捷课堂的赵浩丞、赵大羽、关锦华也参与了部分内容的编写工作。在此感谢触控教育部门的李志远和清华大学出版社的盛东亮给我们提供了宝贵的意见。感谢我的家人容忍我的忙碌,以及对我的关心和照顾,使我能抽出很多时间,投入全部精力专心地编写此书。

由于时间仓促,书中难免存在不妥之处,请读者批评,并提出宝贵意见。

作者

2016年4月于北京


Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book