Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 368 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
368
Dung lượng
11,82 MB
Nội dung
[...]... tilemaps with Tiled Time for action – creating your first map Loading tilemaps in Cocos2d Time for action – using tilemaps in Cocos2d Time for action – running actions on layers Time for action – reaching the end of the level Time for action – fixing black gaps and glitches Using layers to hold objects Time for action – adding object layers in tiled Time for action – retrieving objects in Cocos2d Summary What... started with sounds Time for action – using SimpleAudioEngine Methods for handling sound effects Time for action – playing background music with SimpleAudioEngine Methods for handling background music Using CDSoundEngine Time for action – setting it up Time for action – playing sound effects for explosions Time for action – loading effects asynchronously with CDSoundEngine Time for action – playing background... Getting Started with Cocos2d Downloading Cocos2d foriPhone Visit http://www .cocos2d- iphone. org for downloading the latest files Search the downloads page, and there you will find the different versions available As of this writing, Version 0.99. 5 is the latest stable version Once you have downloaded the file to your computer, uncompress the folder to your desktop, and rename it to Cocos2d Open the uncompressed... Time for action –taking a look at the Chipmunk template Understanding cpBodies and cpShapes Preparing the game Bringing objects to life The Totem Time for action – creating a poly-shaped object Time for action – creating the goal platform Removable blocks Time for action – building blocks Time for action – destroying shapes with touch Collision callbacks Time for action –losing the game Time for action... Preparing for the game Making a hero Time for action – creating the hero class Making yourself some enemies Time for action – throwing enemies at your hero Forging some bullets Time for action – creating and reusing bullets Handling accelerometer input Time for action – moving your hero with the accelerometer Handling touches on layers Time for action – firing the bullets Detecting collisions Time for action... templates Cocos2d comes with three templates These templates are the starting point for any Cocos2d game They let you: Create a simple Cocos2d project Create a Cocos2d project with Chipmunk as physics engine Create a Cocos2d project with Box2d as physics engine Which one you decide to use for your project depends on your needs Right now we'll create a simple project from the first template Time for. .. these are very useful for small projects or when you are low on budget [3] Preface Who is this book for? This book is for anyone who wishes to get into game programming Game programming is one of the most difficult subjects for a beginner but it is a very rewarding experience, so you should have some patience if this is your first time! Fortunately, Cocos2d makes it very easy for you to start working... Preface Cocos2d foriPhone is a framework for building 2D games, applications, presentations, demos, and more It was originally made for Python and then ported to IPhone by Ricardo Quesada as an open source project with the MIT license This book will teach you the fundamentals of how to write games with this framework As this book is meant to give you a basic knowledge of the most important aspects of Cocos2d, ... you will help the community and the framework itself a lot As of this writing, Cocos2d foriPhone is in its 0.99. 5 version I have been using it from Version 0.7x and the improvements made by its author and the community have been huge Right now, it is one of the most used 2D game frameworks available for iPhone development Cocos2d can be used to build any kind of 2D game; from simple puzzle games to... cmd + N) 2 Cocos2d templates will appear right there along with the other Xcode project templates, as shown in the following screenshot: 3 Select Cocos2d- 0.99. 1 Application 4 Name the project HelloCocos2d and save it to your Documents folder Once you perform the preceding steps, the project you just created should open up Let's take a look at the important folders that were generated: Cocos2d Sources: .