Create a New Project in Cocos Studio

Create a New Project in Cocos Studio

November 18, 2015
Expand

Project: Build a clone of Timberman in C++ with Cocos2d-x and Cocos Studio

If you haven't used Cocos Studio before, you will need to install it. For more information, on how to do that look at the tutorial here.

In fact, if you haven't used Cocos Studio and Cocos2d-x before, you might find it easier to start with the Game of Life tutorial instead.

Create a New Project

Let's start the work on our game by creating a new Cocos Studio project.

Open the Cocos App:

image

Switch to the Projects tab and click new project:

image

Create a new Cocos Project:

image

Name your new project SushiNeko. Select the latest engine version, and set the orientation to portrait. Make sure you select C++ as your project language. Set the Project Path to wherever you like, but remember where you set it, so you can find it later!

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 SushiNeko. Inside it is a Cocos Studio project named SushiNeko.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 SushiNeko.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 or comment below.

Summer academy

An iOS Development Summer Course

Design, code and launch your own app. Locations in San Francisco and Asia

Find your location

Product College

A computer science college

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

Learn more