Core Lua Programming with Cocos2d-x
Liu Kenan / Yang YongTsinghua University Press2015
No rating yet- Chapters
- 8
- ISBN
- 9787302414711
Tags
Computing Programming Development SkillsGame DevelopmentGame EngineMobile GamingProgramming DesignCoding PracticeSample CodeBeginner LearningSummary
This book is a Cocos2d-x Lua game-development technical title planned and published by Chukong Education (the official Cocos team), systematically covering the core knowledge of mobile game development using Lua scripting. It begins with the fundamentals of the Lua language, first introducing basic concepts such as the overall architecture of the Cocos2d-x engine, its interface structure and node system, along with the engine mechanisms developers encounter most often, such as scene transitions and memory management; it then gradually goes deeper into the engine's basic controls, core modules and common development techniques; finally, through a complete game example, it ties the previously scattered knowledge points into a full project development workflow. The book follows a "theory combined with practice" approach throughout, with runnable sample code in nearly every chapter to help readers understand how the engine and scripts work together through hands-on operation. The author team has long promoted and taught Cocos2d-x/Lua technology, so the knowledge is organized closer to the real development habits of Chinese mobile-game teams, and advanced topics such as hot updates, performance optimization and network access are also covered. The book can serve both as a roadmap for learning Cocos2d-x Lua from scratch and as a desk reference for developers with some engine experience looking up common engine interfaces and practical approaches.Editor's review
市面上讲 Cocos2d-x 的书不少,但专门围绕 Lua 脚本开发系统展开的并不多,这本由 Cocos 官方培训团队编写的教程正好填上了这块空白。它的价值首先在“官方”二字:作者刘克男是触控教育创新中心的教学总监,长期负责 Cocos2d-x 课程设计与实施,书中的知识顺序基本照着学员容易卡壳的地方来排,而不是把 API 手册简单搬一遍。其次在“实战”二字:全书不是零散地讲控件和接口,而是用一款消除类小游戏把场景、节点、事件、UI、音效等模块串成完整项目,读者跟完一遍就能真正跑通从环境搭建到发布上架的全流程。对自学者来说,这种“边写边学”的结构比纯理论书更友好;对已入行的开发者来说,书中对内存管理、性能优化、热更新、网络访问等话题的取舍,也能帮助建立一套接近商业项目的工程意识。需要提醒的是,本书基于 Cocos2d-Lua 3.x 版本撰写,阅读时最好配合官方文档确认接口细节,避免因引擎版本更新而产生偏差。Who it's for
A good fit for
- 刚接触 Cocos2d-x Lua、希望系统入门手游开发的学习者
- 熟悉 C++ 版 Cocos2d-x,想转向 Lua 脚本开发的程序员
- 在校学生或培训学员,需要一本完整实战项目的课程配套书
- 独立开发者,想快速做出可发布的小型休闲游戏
Not a good fit for
- 想学习 Unity、虚幻等其他引擎的读者
- 只打算用 Cocos Creator 的纯可视化开发者
- 完全没有编程基础、需要从计算机通识学起的人
- 寻找最新版引擎(4.x 及以后)API 详解的高级开发者
Reading tips
- 先对照引擎官方文档确认书中使用的 Cocos2d-Lua 3.x 版本,必要时调整环境搭建步骤。
- 第1~3章不要跳过,Lua 语法与引擎架构是后面实战的地基,可边读边敲示例。
- 第4章和第6章的消除游戏实战建议完整做一遍,把前面零散知识点串成项目。
- 进阶与高级章节可先通读建立索引,实际项目中遇到内存、网络、发布问题时再回查。
About the publisher
Tsinghua University Press China · Founded in 1980Founded in 1980, Tsinghua University Press has 57 titles in our collection, covering popular science, medicine, health, law, philosophy and social sciences. Representative works include medical popular-science books such as Cancer Truth: Doctors Are Reading It Too and New Knowledge on Cancer by Bo Luo (Li Zhizhong), legal titles such as Sunshine Is the Best Preservative: Express Delivery of Major Global Anti-Corruption Cases, and works like Qi Ge's A Brief History of Philosophy with Big Ideas and Liu Yunhao's From the Internet to a New Industrial Revolution. Its authors include science writers, medical researchers, the Renmin University of China anti-corruption master's class and university scholars, reflecting a publishing profile that balances academic seriousness with accessible reading. As public information is limited, this profile is based only on the titles in our collection.
Contents
- Chapter 1 Cocos2d-Lua
- Chapter 2 Lua Programming
- Chapter 3 Cocos2d-Lua Basics
- Chapter 4 Match-Three Game in Practice (Part 1)
- Chapter 5 Cocos2d-Lua Intermediate
- Chapter 6 Match-Three Game in Practice (Part 2)
- Chapter 7 Cocos2d-Lua Advanced
- Chapter 8 Packaging and Publishing
FAQ
这本书适合零基础直接学吗?
如果完全没有编程经验,建议先补齐变量、函数、面向对象等基本概念再读。书里的 Lua 部分讲得较紧凑,有编程基础的人上手会更顺。书中的代码用哪个引擎版本能跑起来?
本书基于 Cocos2d-Lua 3.x(Quick 框架)系列撰写,接口在 3.x 各版本间较为稳定。建议使用书中提到的版本或 Quick-Cocos2dx-Community,避免直接套用 4.x 新接口。书里讲的游戏项目有多大?
实战部分是一款消除类小游戏,章节中称为“Fruit Fest”,属于体量适中、涵盖完整流程的教学项目,主要帮助理解模块组织与开发顺序。第1版和第2版有什么区别?
第2版于2017年出版,在第1版基础上增加了 Spine 骨骼动画、渲染纹理、Lua Binding、OpenGL ES 2.0 与 shader、SDK 接入等内容,并补充了打包发布章节。This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.
About the author
Liu Kenan AuthorLiu Kenan (Chinese: Liu Kenan) is the author of books on computer programming. Publicly available information about him is limited: his nationality, dates of birth and death, educational background, and professional career are all unknown, and only one of his works is held in the collection, namely Core Programming with Lua in Cocos2d-x. Judging from the subject matter of this book, Liu Kenan writes for game development and programming practice, focusing on the combination of the Cocos2d-x engine and the Lua scripting language, which falls under the common category of computers and programming design. Technical books of this kind are usually practice-oriented, emphasizing the coordination of engine interfaces, scripting logic, and development workflows, and are mainly intended for game developers and programming learners who wish to use Lua to improve development efficiency. Because information about the author himself is scarce, a full picture of his career cannot be drawn, but it is clear that he focuses on game engines and scripting programming; this work also offers Chinese readers a reference for understanding Lua development under Cocos2d-x.
Yang Yong AuthorYang Yong is a Chinese author of computer programming books, whose publicly available personal information is currently limited, with no reliable records of his life, education, or professional positions. Judging from the available titles, he writes on game development and scripting programming. His representative work, Core Programming with Lua in Cocos2d-x, falls under the categories of computing and programming design and is intended for readers developing games with the Cocos2d-x engine and the Lua language. The book takes the combination of engine and scripting language as its starting point and discusses core concepts and implementation methods in development, making it a reference for developers who wish to move from beginner level toward practice. Since only one of his works is held in the collection, it is difficult to summarize his complete writing style and long-term influence; he can be regarded as an author who offers technical organization and experience sharing in the niche of game engines and scripting programming.