Skip to content

adrienbaron/twobunnies-workshop

Repository files navigation

cocos2d-X Workshop

This repo contains the code of a simple cocos2d-X game. The game is called 2Bunnies and is a clone of 2 Cars.

⚠️ This repo is incomplete, you need to follow the instructions in TASKS.md to get an actual game.

Project structure

The code for the game is contained in the src folder.

  • src/app.ts: The game entry-point. Setup cocos2d and start the start scene.
  • src/config: Config constants
  • src/scenes: cocos2d scenes for the game
    • src/scenes/start: The start screen
    • src/scenes/shared: Shared elements between scenes
    • src/scenes/game: The main game screen

How to run the project

Ensure you have Node.js and Yarn installed then run

To run on the Web

yarn install
yarn start

Then open your browser on http://localhost:55555/

To run on the iOS

Ensure you have XCode installed.

First run:

yarn install
yarn build

This will build the JS bundle.

Then open: frameworks/runtime-src/proj.ios_mac/twobunnies.xcodeproj with XCode. Finally select an iOS simulator or your iPhone and hit run.

To run on Android

⚠️ I haven't tried with this particular project.

Ensure you have Android Studio installed.

First run:

yarn install
yarn build

Then open: frameworks/runtime-src/proj.android with Android Studio. Finally select a device and run.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published