• Stars
    star
    187
  • Rank 206,464 (Top 5 %)
  • Language
    JavaScript
  • Created about 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

cocos2d JavaScript test cases and games.

cocos2d JavaScript tests and games

These tests and games are shared by the following projects:

If you modify the a test, please test it with all the projects to ensure 100% API compatibility between all the projects.

Tests

cocos2d JS tests

Running the tests and games

For cocos2d-html5

$ git clone git://github.com/cocos2d/cocos2d-html5.git
$ cd cocos2d-html5
$ git submodule update --init
$ python -m SimpleHTTPServer

... and run a brower and open it in localhost:8000/samples

For cocos2d-iphone

$ git clone git://github.com/cocos2d/cocos2d-iphone.git
$ cd cocos2d-iphone
$ git checkout develop-v2
$ git submodule update --init
$ open cocos2d-tests-ios.xcodeproj
  • Select the "JS Test" scheme in Xcode
  • Run it

Xcode JS-Tests

For cocos2d-x

$ git clone git://github.com/cocos2d/cocos2d-x.git
$ cd cocos2d-x
$ git checkout gles20
$ git submodule update --init

run on iOS

$ open samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj
  • Select the "TestJavascript" scheme in Xcode
  • Run it

run on Android

  • Install Android NDK developement environment
  • Define environment variable "NDK_ROOT" which means the directory NDK installed in
  • Run the following command
$ cd Samples/TestJavascript/proj.android
$ ./build.native.sh

Generating Published files

Before running Crystal Craze and Cocos Dragon, you need to open the CocosBuilder project file and press publish.

  1. Open the CrystalCraze.ccbproj file with CocosBuilder (located here: games/CrystalCraze/CrystalCraze.ccbproj )
  2. CocosBuilder -> File -> Publish
  3. Repeat those steps for CocosDragon

Automated tests

Automated tests are not ready yet. In the meantime use the obsolete method of updating the following spreadsheet:

Multiplatform

Code once, run everywhere. These tests can be run unmodified in the following platforms:

  • In any browser ( with cocos2d-html5 )
  • iOS ( with cocos2d-x / cocos2d-iphone + JS Bindings)
  • Android ( with cocos2d-x + JS Bindings )
  • Mac ( with cocos2d-iphone + JS Bindings )

Games

Crystal Craze

Crystal Craze

It is a simple puzzle game. It uses:

  • CocosBuilder
  • cocos2d

Play it online: Web version

Licensed under MIT.

Watermelon with Me

Watermelon With Me

It is a simple physics game. It uses:

  • cocos2d
  • Chipmunk
  • CocosBuilder

Play it online: Web version

Licensed under MIT.

CocosDragon

CocosDragon

It is a simple platformer game. It uses:

  • cocos2d
  • CocosBuilder

Play it online: Web version

Licensed under MIT.

Moon Warriors

Moon Warriors

It is a simple shooter game. It uses:

  • cocos2d

Play it online: Web version

Art and audio is copyrighted by Enigmata Genus Revenge, you may not use any copyrighted material without permission.

This showcase is licensed under GPL

Authors

  • Programmer: Shengxiang Chen, Dingping Lv
  • Effects animation: Hao Wu
  • Quality Assurance: Shun Lin

Website

More Repositories

1

cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
C++
18,090
star
2

cocos2d-objc

Cocos2d for iOS and OS X, built using Objective-C
Objective-C
4,070
star
3

cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
JavaScript
3,055
star
4

cocos2d-js

cocos2d-x for JS
C++
1,858
star
5

CocosBuilder

CocosBuilder, the visual editor for cocos2d
Objective-C
1,012
star
6

cocos2d-iphone-extensions

3rd party extensions for cocos2d-iphone
Objective-C
638
star
7

cocos2d-x-samples

Contains different cocos2d-x samples
Python
575
star
8

creator_to_cocos2dx

Creator plugin to support C++& Lua in cocos2d-x
C++
234
star
9

cocos2d-x-3rd-party-libs-bin

C
197
star
10

bindings-generator

JSBindings generator for C++
Python
168
star
11

cocos2d-x-extensions

samples games & code snips for cocos2d-x
C++
152
star
12

cocos2d-console

cocos2d command line tool
Python
151
star
13

cocos2d-x-3rd-party-libs-src

Dependencies of cocos2d-x.
Perl
140
star
14

cocos2d-x-for-xna

port cocos2d-x into c# based on XNA
C#
123
star
15

cocos2d-x-docs

documentation of cocos2d-x
HTML
102
star
16

cocos2d-objc-ext

Extensions and utility classes for Cocos2D-iphone
Objective-C
58
star
17

cocos2d-iphone-classic

Repository of original V1 and V2 of Cocos2D-iphone
Objective-C
47
star
18

cocos2d-frame

Player and "stub" for cocos2d
C
37
star
19

cocos2d-js-samples

Includes different samples to be used with cocos2d
JavaScript
36
star
20

cocos2d-x-swift-bindings

Swift bindings for cocos2d-x
Objective-C++
32
star
21

cocos2d-x-external

use CMake to build external 3rd party modules for cocos2d-x
C
18
star
22

cocos2d-js__old__

cocos2d in JavaScript central repository
JavaScript
14
star
23

js-bindings

C++
13
star
24

cocos2d-x-classic

For full history commit logs of cocos2d-x
C
8
star
25

v8

V8 building
Python
7
star
26

migration-demo-objc

The Objective-C flavoured version of migration-demo-x
Objective-C
6
star
27

migration-demo-x

Demonstrates -obj to -x project migration
C++
5
star
28

console-binary

The binary files for cocos2d-console
4
star
29

cocos2d-x-docs-deps

Dependencies of building cocos2d-x docs
Shell
2
star
30

cocos2d.github.io

1
star