您好,欢迎光临本网站![请登录][注册会员]  
文件名称: COCOS2d-X by Example Beginner
  所属分类: 游戏开发
  开发工具:
  文件大小: 3mb
  下载次数: 0
  上传时间: 2015-05-18
  提 供 者: leng*****
 详细说明: Table of Contents Preface 1 Chapter 1: Installation 7 Download and installation 7 Time for action – downloading and installing Cocos2d-x 8 Hello-x World-x 9 Time for action – creating an application 9 The folder structure 11 The iOS linkage classes 12 The AppDelegate class 12 The HelloWorldScene class 12 Who begets whom 13 Further information 13 Time for action – running the test samples 14 The other tools 14 Summary 15 Chapter 2: You plus C++ plus Cocos2d-x 17 Cocos2d-x – an introduction 17 The containers 18 The director and ca ches 19 Then there is all the other stuff 19 But you don't know C++? 19 The interface 20 Time for action – creating the interface 20 The implementation 22 Time for action – creating the implementation 22 Instantiation and memory management 23 Option 1 – use static methods 24 Option 2 – C++, Cocos2d-x style 25 Table of Contents [ ii ] What you get with CCObject 26 Summary 27 Chapter 3: Your First Game – Air Hockey 29 Game configurations 30 Time for action – creating your game project 30 Time for action – laying down the rules 30 Supporting retina displays 31 Time for action – adding the image files 31 Time for action – adding retina support 32 Adding sound effects 32 Time for action – adding the sound files 33 Extending CCSprite 34 Time for action – adding GameSprite.cpp 34 Time for action – implementing GameSprite 35 The actual game scene 36 Time for action – coding the GameLayer interface 37 Time for action – implementing init() 38 Time for action — handling multi-touches 41 Time for action – adding our main loop 44 Time for action – updating scores 47 Summary 49 Chapter 4: Fun with Sprites – Sky Defense 51 The game – Sky Defense 51 The game settings 52 The start project 52 Adding screen support for a universal app 52 Adding background music 53 Initializing the game 53 Using sprite sheets in Cocos2d-x 54 Batch drawing sprites 55 Time for action – creating a CCSpriteBatchNode 56 Bitmap fonts in Cocos2d-x 58 Time for action – creating bitmap font labels 59 Time for action – adding the final screen sprites 60 Time for action – creating our object pools 63 CCActions in a nutshell 64 Time for action – creating actions with Cocos2d-x 64 Animating a sprite in Cocos2d-x 66 Time for action – creating animations 66 Time to make our game tick! 68 Table of Contents [ iii ] Time for action – handling touches 69 Time for action – starting and restarting the game 71 Time for action – updating the game 73 Time for action – retrieving objects from the pool 75 Play the game! 77 Summary 79 Chapter 5: On the Line – Rocket Through 81 The game – Rocket Through 81 The game settings 81 Play first, work later 82 The start project 82 Screen settings 83 So what are particles? 84 Time for action – creating particle systems 85 Creating the grid 87 Drawing primitives in Cocos2d-x 88 Time for action – let's do some drawing! 88 The Rocket sprite 90 Time for action – updating our Rocket 91 Time for Action – handling touches 94 The game loop 98 Time for action – adding the main loop 98 Kill and reset 102 Time for action – adding our resets and kills 102 Summary 104 Chapter 6: Quick and Easy Sprite – Victorian Rush Hour 105 The game – Victorian Rush Hour 105 The game settings 106 Rapid prototyping with Cocos2d-x 106 Time for action – creating placeholder sprites 106 The Player object 108 The Block object 108 The Terrain object 108 Time for action – coding the player 109 Time for action – coding the Block object 112 Planning the Terrain class 113 Building the Terrain object 114 Time for action – initialising our Terrain class 115 Time for action – initializing our Blocks 117 Time for action – moving and resetting 121 Table of Contents [ iv ] Platform collision logic 123 Time for action – adding collision detection 123 Adding the controls 126 Time for action – handling touches 126 Time for action – coding the main loop 128 Summary 129 Chapter 7: Adding the Looks – Victorian Rush Hour 131 Victorian Rush Hour – the game 131 New sprites 132 Animations 133 Texturing our buildings with CCSprites 133 Time for action – texturing the buildings 134 Containers within containers 137 Creating a parallax effect 138 Time for action – creating a parallax effect 139 Adding a menu to our game 140 Time for action – creating CCMenu and CCMenuItem 141 Adding a tutorial to our game 143 Time for action – adding a tutorial 144 Summary 146 Chapter 8: Getting Physical – Box2D 147 Creating a Box2D project with Cocos2d-x 147 Time for action – preparing the basic template 149 So what is a physics engine? 151 Meet Box2D 152 Meet the world 152 Running the simulation 153 No CCObjects in Box2D 154 Meet the bodies 154 Our game – MiniPool 155 Game settings 156 CCSprite + b2Body = b2Sprite 156 Creating the pool table 157 Creating edges 158 Creating the ball objects 159 Creating collision filters 160 Creating the cue ball 161 Creating a contact listener 162 The game controls 165 Table of Contents [ v ] Time for action – adding the touch events 165 The main loop 169 Time for action – adding the main loop 170 Adding a timer to our game 171 Time for action – creating a timer 171 Summary 173 Chapter 9: The Last Game – Eskimo 175 The game – Eskimo 175 The game settings 176 How the game is organized 177 Using CCScenes in Cocos2d-x 178 Time for action – creating a CCScene transition 179 Time for action – creating transitions with a singleton CCLayer 180 Loading external data from a .plist file 182 Time for action – creating a .plist file 182 Loading the level data 183 Time for action – retrieving data from the .plist file 184 Saving game data 186 Time for action – storing the completed levels 186 Using notifications in your game 187 Time for action – using CCNotificationCenter 188 Using the accelerometer 189 Time for action – reading accelerometer data 189 Reusing b2Bodies 190 Time for action – changing a b2Body fixture 190 Summary 192 Chapter 10: Code Once. Retire. 193 First, a word on versions and requirements 194 Requirements 194 Further steps 195 Time for action – creating an Android project with Cocos2d-x 195 Time for action – compiling the code 196 Using Eclipse 197 Time for action – installing the C++ compiler 197 Time for action – adding the Cocos2d-x library to Eclipse 198 Time for action – opening the project in Eclipse 198 Running the application 200 Compiling C++ code in Eclipse 202 Time for action – compiling our C++ code 202 Table of Contents [ vi ] Creating a hybrid project 206 Time for action – creating a hybrid Cocos2d-x project 206 Creating a Box2D hybrid project 208 Time for action – creating a Box2D project 208 Developing a hybrid game 210 Summary 211 Appendix A: Vector Calculations with Cocos2d-x 213 What are vectors? 213 The vector methods 214 Using ccp helper methods 214 Rotating the rocket around a point 215 Using the dot product of vectors 216 Moving from pixel-based speed to angular-based speed 218 Appendix B: Pop Quiz Answers 221 Chapter 4, Fun with Sprites – Sky Defense 221 Chapter 8, Getting Physical – Box2D 221 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: Cocos2d
 输入关键字,在本站1000多万海量源码库中尽情搜索: