Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cocos2d-X Game Development Blueprints

You're reading from   Cocos2d-X Game Development Blueprints Build a plethora of games for various genres using one of the most powerful game engines, Cocos2d-x

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781783985265
Length 392 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Karan Sequeira Karan Sequeira
Author Profile Icon Karan Sequeira
Karan Sequeira
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. A Colorful Start FREE CHAPTER 2. How to Fly a Dragon! 3. Not Just a Space Game 4. Back to the Drawing Board 5. Let's Get Physical! 6. Creativity with Textures 7. Old is Gold! 8. Box2D Meets RUBE 9. The Two Towers 10. Cross-platform Building Index

Creating a project in Cocos2d-html5

Creating a project in Cocos2d-html5 is as simple as copying a readymade template and renaming it to what you want to call your game. If you've downloaded and extracted the archive of the Cocos2d-html5 source, navigate to the template folder inside it. Your file explorer should show you something like this:

Creating a project in Cocos2d-html5

If you run the index.html file you see in the template folder, you'll realize that it is nothing but a hello world project. This is exactly what we need to get us started. To create a new project in Cocos2d-html5, follow these steps:

  1. Copy all the files within the template folder.
  2. Create a folder in the root directory of the Cocos2d-html5 engine. The engine's root with the folder for ColourSmash is shown in the following screenshot:
    Creating a project in Cocos2d-html5
  3. Now, paste all the files that you copied from the template folder into the folder you just created.

That's it! You have created your first project in Cocos2d-html5. Now, it's time to get acquainted with the different kinds of files located in the project's directory.

You have been reading a chapter from
Cocos2d-X Game Development Blueprints
Published in: Jul 2015
Publisher: Packt
ISBN-13: 9781783985265
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image