Code Monkey home page Code Monkey logo

cocos2d-js-tests's Introduction

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

cocos2d-js-tests's People

Contributors

carlomorgantinizynga avatar casarock avatar dingpinglv avatar ericwangzynga avatar folecr avatar jji avatar kennyluck avatar minggo avatar pandamicro avatar qiaofeng00oo avatar ricardoquesada avatar rohankuruvilla avatar seobyeongky avatar shengxiangchen avatar timmjd avatar ucchen avatar visualsj avatar wenhailin avatar wu-hao avatar xingsenma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocos2d-js-tests's Issues

TileMap Test Error

hi.

When I clicked TileMap Test Menu in sample(engine test case),
error message appeared(Error message is "Uncaught TypeError: Cannot call method 'isLoaded' of null ") and do not work properly.

is it fixing? or How could I get sample code fixed?

Environment is...
Python server(SimpleHTTPServer)
chrome web browser

Requirejs and other concerns

I have a few questions about your project.

  1. How is the speed with the js bindings method compared to that of LUA and coronas 2d. Are there bench marks on this?
  2. What features and OS does it support from what I see its js web and ios so far.
  3. Are you using requirejs style imports? If so why cant all the code be in an amd wrapper for dependacy injection.

using nodejs like module management

In nodejs I can create a module using

module.exports = MyModule

and require this in main.js file.

MyModule = require('mymodule')

I use coffeescript to write js,coffeescript will wrap generated code in a function,I don't know how to use module write with coffeescript without nodejs like module management.
testcoffee

cocos2d-x don't have glee20 branch anymore

In Readme.md the cocos2d-x part, we have the following step:
$ git clone git://github.com/cocos2d/cocos2d-x.git
$ cd cocos2d-x
$ git checkout gles20

But the gles20 branch don't exists anymore.

the game demo can't run sucessfully.

when run the game demo, the below issue is occur.

[23:00:09.122] TypeError: cc.Class is undefined @ http://localhost:8000/extensions/PluginX/plugins/SocialQQWeibo.js:1
[23:00:09.123] TypeError: cc.Class is undefined @ http://localhost:8000/extensions/PluginX/plugins/SocialQzone.js:1
[23:00:09.123] TypeError: cc.Class is undefined @ http://localhost:8000/extensions/PluginX/plugins/SocialTwitter.js:1
[23:00:09.123] TypeError: cc.Class is undefined @ http://localhost:8000/extensions/PluginX/plugins/SocialFacebook.js:1
[23:00:09.125] TypeError: cc.Layer is undefined @ http://localhost:8000/HelloHTML5World/src/myApp.js:27

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.