TopGit theo dõi cocos2d/cocos2d-js trên GitHub, đã đạt 1.9k sao. cocos2d-x for JS
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
*** 2/27/2016 - This repository is no longer active. Cocos2d-JS was merged with Cocos2d-x starting at version 3.7.
*** please go here
Cocos2d-JS
Cocos2d-JS is Cocos2d-x engine's JavaScript version that includes Cocos2d-html5 and Cocos2d-x JavaScript Bindings. It equips your game with cross-browser and cross-platform abilities, accompanied by full Cocos2d-x features and simplified JavaScript friendly APIs.
Cocos2d-JS reinvented workflows for all platforms in v3.0, it provides a consistent development experience for whichever platform you want to distribute to, no matter web and native. "Code once, run everywhere" is incredibly easy and natural in Cocos2d-JS. With one single JavaScript code base, you can run your game on all web browsers and native platforms including Mac OS, Windows, iOS and Android. This will bring your game great opportunities in almost all channels of distribution. On the other hand, if you are only interested in casual games on the web, you can embed directly in your web page the Cocos2d-JS Lite Version which is extremely easy to use and light as a feather.
Furthermore, JavaScript friendly APIs make your game development experience a breeze - easy to code, test and distribute. In the meantime, Cocos2d-JS v3.0 is super powerful along with all these cool new features: Editors Support, Assets Manager, Object Pool, JS to Objective-C/JAVA reflection, etc.
Workflows
Cross platforms developers can use Cocos Console to create projects, boost their development with web version engine and deploy games onto all native platforms and all browsers with Cocos Console.
Casual web game developers can download the Lite Version and start to develop just like using other web frameworks (e.g. jQuery).
Downloads
Cocos2d-JS v3.0 Full Version
Cocos2d-JS v3.0 Lite Version
Online API reference
Downloadable API Reference
Online demos
MoonWarriors
Testcase
Documentations
Getting Started with Cocos2d-JS
Cocos2d-JS release notes
About Cocos2d family
Cocos2d-JS v3.0 uses Cocos2d-x 3.2 final as base of JSB solution
Cocos2d-JS v3.0 is compatible with Cocos Code IDE v1.0.0 RC2+
Cocos2d-JS v3.0 is compatible with Cocos Studio v1.2 - v2.0
With any problems you might have, our communities are happy to help:
Online forum
Document root
Github repository
How to Start a New Game
Download the code from Cocos2d download site
Run setup.py
Run the cocos script
Example:
$ cd cocos2d-js
$ ./setup.py
$ source FILE_TO_SAVE_SYSTEM_VARIABLE
$ cocos new MyGame -l js -d /directory/to/project
$ cd /directory/to/project/MyGame
###Run the project under the game directory
Run Cocos2d-html5 project with a Websever:
cocos run -p web
Compile and run project in Cocos2d-JSB :
cocos compile -p ios|mac|android|win32|web
cocos run -p ios|mac|android|win32|web
You may need to provide your Android NDK, Android SDK and ANT's paths during the setup. Note that this tool is developed with python, so you will need python (32bit) 2.7.5 or later installed on your machine (but it doesn't support Python3). Please refer to Cocos Console document.
And if you have any doubt about the usage, please use -h with any command to have some help messages.
You can also use prebuilt Xcode or Visual Studio projects which are located in Game/frameworks/runtime-src/proj.xxx
##Folder structure of new project
frameworks
cocos2d-html5 : Cocos2d-JS html5 engine source
js-bindings : JSB engine source (include Cocos2d-x and JSB)
runtime-src : IDE projects (Android, iOS, Mac OS, Win32)
publish : Published apps
runtime : Debug app files
tools : JS Bindings generator
res : Your game resource folder for images, sounds, etc
src : The source code folder to place your game's js files
main.js : The entrance of your game logic
index.html : The web page for hosting your game in web server
##Built-in Projects
There are two prebuilt projects in Cocos2d-JS repo:
Test cases, located in samples/js-tests
cd samples/js-tests
run -p ios|mac|android|win32|web
Game sample : Moon Warriors, located in samples/js-moonwarriors
cd samples/js-moonwarriors
run -p ios|mac|android|win32|web
And they share the same project files which are located in build folder, there are Xcode and Visual Studio projects.
##Main features
Support All modern browsers and native platforms
Scene management (workflow)
Transitions between scenes
Sprites and Sprite Sheets
Effects: Lens, Ripple, Waves, Liquid, etc.
Actions (behaviours):
Trasformation Actions: Move, Rotate, Scale, Fade, Tint, etc.
Có — cocos2d/cocos2d-js phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/cocos2d/cocos2d-js.
cocos2d/cocos2d-js có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho cocos2d/cocos2d-js. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
cocos2d/cocos2d-js có trang demo không?
Dự án có trang chủ ở http://www.cocos2d-x.org. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
cocos2d/cocos2d-js còn đang phát triển không?
Commit gần nhất trên cocos2d/cocos2d-js là 1.5 năm trước (theo timestamp GitHub). Repo có 474 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
cocos2d/cocos2d-js dùng license gì?
cocos2d/cocos2d-js phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về cocos2d/cocos2d-js ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/cocos2d/cocos2d-js là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc cocos2d-js có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về cocos2d-js.