2025-04-18 11:59:02 +07:00

1.5 KiB

sidebar_position
sidebar_position
1

Create The Project

The first step to start a new project.

When starting a new project, you'll be giving an empty repository.

Take the Roma Legacy game as an example.

Clone Git repository

To clone this repository, run the following command:

git clone https://gitea.plp19.com/cocos-eanew/coc-roma-legacy.git

Once cloned, configure your Git user information (only needed the first time):

cd coc-roma-legacy
git config user.name "Your Git Username"
git config user.email "Your Email"

Create Cocos Creator project

Inside coc-roma-legacy folder, create a project.json file:

{
  "engine": "cocos-creator-js",
  "packages": "packages",
  "name": "coc-roma-legacy",
  "version": "2.4.4",
  "isNew": false
}

Now you can open the project in Cocos Creator.

  1. Launch Cocos Dashboard
  2. Click Add Project
  3. Navigate to coc-roma-legacy folder
  4. Click Select Project.

Cocos Dashboard

Now that the project is available in Cocos Dashboard, double-click on it to open.

Cocos Creator will generate the entire game structure including .gitignore file.

Cocos folder structure

Commit to Git

At this point, you should create an initial commit and open your first Pull Request.

Run these following command:

git checkout -b feature/init-project
git add --a
git commit -m "Init cocos project"
git push --set-upstream origin feature/init-project