Product College starts on September 18. Submit your application today. Apply now.

Create a New Project in Cocos Studio

Create a New Project in Cocos Studio

November 17, 2015
Expand

Project: Learn Cocos Studio and C++ by building the Game of Life

Create a New Project

Now we're set up and ready to create a new Cocos Studio project:

image

Create a new Cocos Project:

image

Name your new project “GameOfLife”. Select the latest engine version, and set the orientation to landscape. Also make sure you select C++ as your project language:

image

Once the project is created, open Finder and take a look at the folder structure of your project. If you can't find your project in Finder, search for it using Spotlight at the top right of your screen.

The folder structure should look something like this:

image

Cocos Studio created a new folder called GameOfLife. Inside it is a Cocos Studio project named GameOfLife.ccs. It also created an Eclipse-based Android project in proj.android, an OSX and iOS Xcode project in proj.ios_mac and a Windows and Windows Phone Visual Studio project in proj.win32. The C++ classes you'll be writing are stored in the Classes directory, which is read by all three projects. The assets and resources used by your game (like images, fonts, sounds and Cocos Studio binary files) are kept in the Resources directory.

The default Cocos Studio project comes with one scene, MainScene.csd. Your empty project should look like this:

image

Testing your setup

Let’s make sure everything was generated correctly. Click on the Publish and Package button in Cocos Studio:

image

Change the Publish Type to Publish to Xcode and click OK

image

Now navigate to the proj.ios-mac directory and open GameOfLife.xcodeproj to view the project in Xcode. Press the play button in Xcode to run the project on the iOS Simulator.

image

Verify it shows the Cocos2d-x logo:

image

Congratulations! Now you have run your first Cocos Studio project and you know your tools are working.

Feedback

If you have feedback on this tutorial or find any mistakes, please open issues on the GitHub Repository.

Summer academy

An iOS Development Summer Course

Design, code and launch your own app. Locations across the USA and Asia

Find your location

Product College

A computer science college

Graduate into a successful career as a founder or software engineer.

Learn more