• Stars
    star
    575
  • Rank 77,622 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 9 years ago

Reviews

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

Repository Details

Contains different cocos2d-x samples

Cocos2d-x-samples

[TOC]

Contains different samples that show how to use Cocos2d-x v3.2 with 3rd party libraries:

Running the samples

Download

$ git clone https://github.com/cocos2d/cocos2d-x-samples.git
$ cd cocos2d-x-samples
$ python download-engine.py

Running

Once the samples were downloaded just go any sample, and open the project. eg:

$ cd cocos2d-x-samples/samples/LiquidFun-Testbed/proj.ios_mac
$ open LiquidFun-Testbed.xcodeproj/

Available samples:

LiquidFun

Based on Box2d, LiquidFun features particle-based fluid simulation. Game developers can use it for new game mechanics and add realistic physics to game play. Designers can use the library to create beautiful fluid interactive experiences.

We provide 2 samples:

LiquidFun - Testbed

Testbed

The Testbed that comes with LiquidFun, adapted for cocos2d-x.

Supported platforms:

  • iOS
  • Mac
  • Win32

LiquidFun - EyeCandy

Eye Candy

The Eye Candy demo that comes with LiquidFun, adapted for cocos2d-x. Includes two useful classes:

  • LFParticleSystemNode: Wraps a LiquidFun b2ParticleSystem into a cocos2d-x node.
  • LFPhysicsSpriteNode: Wraps a LiquidFun b2Body into a cocos2d-x node.

Supported platforms:

  • iOS

GAF

From GAF homepage:

"GAF stands for Generic Animation Format. GAF is designed to store Flash animations in an open cross platform format for further playback in a multitude of game development frameworks and devices. GAF enables artists and animators to use Flash CS for creating complex animations and seamlessly use them with various game development frameworks."

This sample shows how to use GAF with cocos2d-x. It has 5 different GAF samples and shows how to play sound events with GAF.

Supported platforms:

  • iOS
  • Android

MoonWarriors

Alt text

This is a built-in showcase of Cocos2d-JS, including many features just as:

  • Parallax background
  • Tilemap
  • Actions
  • Ease
  • Frame animation
  • Schedule
  • Labels
  • Keyboard Dispatcher
  • Scene Transition.

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

This showcase is licensed under MIT. Youโ€™re welcome to use this as a simple tutorial for your upcoming html5 game

Supported platforms:

  • iOS
  • Mac
  • Win32
  • WinPhone
  • Android

KillBug

This is a type of mini-games to test agility of cocos2d-lua, the players need to kill the spider which kept move into the middle hole.

Alt text

Supported platforms:

  • iOS
  • Mac
  • Win32
  • Android

How To Create New Samples

1ใ€init environment

$ python download-engine.py

$ cd libs/cocos2d-x

$ python setup.py

2ใ€create new sample

$ cd samples

$ cocos new ProjectName -l [cpp or js or lua] 

attension: only create projectName in samples dir, it will be compiled correctly

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

creator_to_cocos2dx

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

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

C
197
star
9

cocos2d-js-tests

cocos2d JavaScript test cases and games.
JavaScript
187
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