{"id":20023452,"url":"https://github.com/niku/cocos2d-js-environment","last_synced_at":"2026-06-07T04:32:14.612Z","repository":{"id":27074293,"uuid":"30540758","full_name":"niku/cocos2d-js-environment","owner":"niku","description":"Environment for development of games built by cocos2d-js","archived":false,"fork":false,"pushed_at":"2015-02-10T21:29:21.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T04:17:24.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-09T14:52:52.000Z","updated_at":"2015-12-08T18:38:43.000Z","dependencies_parsed_at":"2022-08-31T21:36:35.151Z","dependency_job_id":null,"html_url":"https://github.com/niku/cocos2d-js-environment","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/niku/cocos2d-js-environment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niku%2Fcocos2d-js-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niku%2Fcocos2d-js-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niku%2Fcocos2d-js-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niku%2Fcocos2d-js-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niku","download_url":"https://codeload.github.com/niku/cocos2d-js-environment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niku%2Fcocos2d-js-environment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27294940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-28T02:00:06.623Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:46:29.198Z","updated_at":"2025-11-28T04:03:47.002Z","avatar_url":"https://github.com/niku.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# これは何？\n\n[cocos2d-js](http://www.cocos2d-x.org/wiki/Cocos2d-JS) を使ったゲームが簡単に遊べるようになる環境です．\n\n# 動作環境\n\nOSX で確認しました．\nたぶん Windows でも Linux でも動くんじゃないかなあ．\n\nダブルクリックで使えるコマンドについては，まだ OSX 版しか用意していません．\n\n# 必要なもの\n\n- [VirtualBox](https://www.virtualbox.org/)\n- [Vagrant](https://www.vagrantup.com/)\n\n# 使い方\n\n## OSX\n\n### ダウンロード\u0026解凍\n\nまず必要なものをインストールしましょう．\nどちらもコマンドを使わない，普通のアプリと同じようにインストールできます．\n\n次に [releases](https://github.com/niku/cocos2d-js-environment/releases) から最新の zip ファイルをダウンロードしましょう．\n\nダウンロードしたファイルを解凍しましょう．普通は Downloads に入っているはずです．\n\n### ゲームの名前をつける\n\nゲームの名前をつけましょう，解凍したディレクトリの中に `game_name.txt` というものがあり，そこにゲームの名前を書いておきます．\n空白や記号，日本語名は避けた方がいいです．(試していないからどうなるか知らない)\n何も思いつかなければ，そのまま `MyGame` でも動きます．\n\n### ゲームの雛形を作る\n\n`create_game.command` をダブルクリックすると，`game_name.txt` に書いたゲーム名でゲームの雛形ができます．\n\n最初の一回だけは，このアプリケーション全体のセットアップをするために結構時間がかかります．\nそのため，最初の一回だけは通信速度が速いところで行いましょう．\n\nゲームの雛形は，解凍したディレクトリと同じところに `cocos-2d-js-games` というディレクトリが作られて，その中に用意されています．\n例えば `MyGame` の場合だと `cocos-2d-js-games/MyGame` です．\n\n### ゲームを起動する\n\n`run_game.command` をダブルクリックすると， `game_name.txt` に書いたゲーム名のゲームが起動します．\n`http://0.0.0.0:8000/` という内容が表示されたら，起動に成功しています．\n\nhttp://localhost:3939/ へとアクセスしてみましょう．cocos-2d-js のデモが表示されれば成功です．\nあとは，起動したままゲームの内容を書き変えて，ブラウザをリロードすれば，ゲームの内容も書き変わっているはずです．\nもし書き変わっていなければ，ブラウザキャッシュのクリアを試しましょう．(詳しい人に聞いてください)\n\n起動したゲームを終わらせたいときは，起動したターミナルにフォーカスを合わせて *一度だけ* `Ctrl` キーを押しながら `C` キーを押します．\nしばらくすると `[プロセスが完了しました]` というメッセージが出て，http://localhost:3939/ にアクセスしても繋らなくなるはずです．\n\nもし誤って `Ctrl` キーと `C` キーを 2 回押してしまうなどして，http://localhost:3939/ にアクセスしてもゲームができる状態が続いていた場合でも心配ありません．\nそのときは `stop_server.command` をダブルクリックしましょう．すると，しばらくすると http://localhost:3939/ にアクセスできなくなるはずです．\n\n### ゲームを共有する\n\n`run_game.command` をダブルクリックして，http://localhost:3939/ へアクセスできる状態で，\n`share_game.command` をダブルクリックすると\n\n`URL: http://steaming-muskrat-4561.vagrantshare.com`\n\nのような URL がターミナルに表示されるはずです．\nその URL へアクセスすると，インターネット越しにゲームを共有できます．\n\n開発をPCで，動作確認をスマートフォンで行う場合などにも便利でしょう．\n\n共有を止めたいときは，起動したターミナルにフォーカスを合わせて *一度だけ* `Ctrl` キーを押しながら `C` キーを押します．\nもし複数回押してしまっても，ゲームを止めると共有も止まるので心配ありません．\n\n共有は一定時間で切れるようになっているそうなので，もし切れたら再度実行しましょう．\n\n### ゲームを消す\n\nゲームを消したくなったら，ゲームの雛形を作った場所のファイルを消すだけでよいです．\n例えば `MyGame` の場合だと `cocos-2d-js-games/MyGame` を消すだけでよいです．\n\n### サーバーを消す\n\n`destroy_server.command` をダブルクリックすると， サーバーを消すことができます．\nコンソール上で ` default: Are you sure you want to destroy the 'default' VM? [y/N]` (本当に消しますか) と聞かれるので，`y` を押してリターンしましょう．\n\n- cocos2d-js のバージョンを上げるなど，サーバー環境をアップグレードする前に，現在の環境を後始末する\n- cocos2d-js を利用したゲーム作りをやめてしまうとき(アンインストール相当)\n\nに使います．\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniku%2Fcocos2d-js-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniku%2Fcocos2d-js-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniku%2Fcocos2d-js-environment/lists"}