enchant.js meetup Tokyo #2 「enchant.js でゲームを作るコツ」 1. enchant.js でゲームを作るコツ UEI/ARC 伏見 遼平 2. 自己紹介伏見 遼平(株)ユビキタスエンターテイメント秋葉原リサーチセンター (UEI/ARC)9leap プロジェクトリーダー 3. 様々な試練を くぐり抜けてきました• 48時間で20本のゲームを作る• 24時間で10本のTwitter連携ゲームを作る• 16時間で21本のゲームを作る• 8時間でMMOを作る 4. 気づいたこと: ゲーム作りにはプログラミング以外にも要求されることが多い 5. ゲームを作るコツを お伝えします 6. プログラマのためのゲームデザイン入門 7. このセッションの目的• 短い時間で• テーマに沿ったゲームの• 骨組みを作るコツ• ハッカソンで優勝できる(?)• 普段のゲーム作りに
Enchant.jsでお絵かきソフトでも作ろうかなと思ったのですが、Surfaceクラスからcontextを介して毎回 Canvasにアクセスするのが面倒になってきたので、よく使いそうなパターンをクラス化しました。 Surface拡張プラグインPaint.js【ダウンロード】(名前をつけて保存でダウンロードしてください) 使い方。 enchant.jsを読み込んだ後に等でこのプラグインも読み込んでください。そしてSurfaceクラスの替わりに var canvas = new Paint(320,320); と書けばSurfaceをラップしたPaintクラスが使えます。 *しょぼい機能 色を指定する。 paint.color(strokeStyle,fillStyle); 線の色と塗りつぶしの色を指定します。片方だけを指定する場合は片方をnullにしてください。 円を書く paint.ci
4. Node ● サーバサイド javascript ● イベントドリブン ● シングルスレッド ● C10K(1 万クライアント ) 問題に対応 ● javascript は遅そう? → javascript は今や遅くない 5. websocket ● はやりの HTML5 な技術 ● http 上で VPN 張るイメージ ● socket.io というフレームワークが超優れもの → websocket 非対応のクライアント上でも同 じ API で通信できる
圧縮後のファイルサイズはenchant.jsのほうが3kbほど少ないですね。 どちらもjs上に継承などを行う擬似クラスを作るためのClass要素があったり、スマートフォン/PC両方で使えるようにtouch系イベントとmouseDown/Move系イベントを判定したり、fps(フレーム数)を設定してフレーム毎のイベントを設定するなどしています。 後発だけあって、Arctic.jsのほうはenchant.jsの機能をパクったenchant.jsにある機能はだいたいあるような感じですね。 オブジェクトの描画についてですが、Canvasでの描画の方が性能的に有利かもしれませんが、enchant.jsは divタグ毎にオブジェクトに持っていることで利便性をあげています。既存のアニメーション効果をdivタグ単位で 適応することにより、今までのエフェクトを使いまわすことができるのです。 ench
チュートリアル的なものが見つからなかったので自己流で. ステップ1: enchant.jsを読み込む 基本的にはenchant.jsを読みこめばよい. スタート画面やゲームオーバー画面,ハイスコアの送信機能を使いたい場合はnineleap.enchant.jsが使える. ui.enchant.jsはバーチャルパッド(タッチ操作)用. <script src="enchant.min.js"></script> ステップ2: enchant() まず最初にenchant()を実行する必要がある. ステップ3: Gameクラス FPSなどの設定や画像の読み込みを行う. var game = new Game(320, 320); game.fps = 15; game.preload('some.png'); ステップ4: Spriteクラス Spriteクラスは座標の管理や画像の管理などを行
透過度はCSSのプロパティopacityで操作する。 スプライトオブジェクト._element.style.opacity 1.0で不透過 0.0で透過 enchant(); window.onload = function() { var game = new Game(320, 320); game.fps = 15; game.preload('/img/bear.gif'); game.onload = function() { var bear = new Sprite(20, 30); bear.x = 0; bear.y = 160; bear.image = game.assets['/img/bear.gif']; bear._element.style.opacity = 1; var lblOpacity = new Label(); lblOpacity.text
※ phiary に引っ越しました. 毎日プログラミングやWebに関する情報を発信しています! RSS 登録してたまに覗いたり, tweet やハテブして拡散してもらえると幸いです. enchant.js 怒涛の 100 tips!! ローカル整理してたら昔勉強がてら作った enchant.js のサンプルが大量に出てきたので, 整理するついでに公開しようと思います. 最終的に 100超えちゃったけどw(全部で102個あります) 逆引きてきな感じでまとめてます. 参考になれば幸いです. 全て jsdo.it に移植したので Web上で実行できます!! fork なりダウンロードなりして遊んでくださいな♪♪ Tips Base(基本) 基礎です. enchant.js のテンプレートを用意しよう Entity(エンティティ) 表示物系の基底クラスです. 内部で DOM を持っているので表示は
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
第一回 Osaki.js の enchant.js ハンズオンの資料です。 超初歩の初歩。 http://osakijs.blogspot.jp/Read less
モバイルゲーム 物凄い勢いで勃興したモバイルゲーム業界は、いろいろな課題や問題に直面しながらも巨大化し、今日の時点でのスマートフォン向けゲームの市場へと継承されていきます。 モバイルゲームの歴史 2001 Javaアプリと3Dゲームの登場 Javaが利用できるようになったことにより、ダウンロード型のゲームが供給できるようになりました。 2002 携帯電話端末の大容量化・3D化競争 Java搭載携帯電話端末が登場してからごく僅か1年の間に、アプリのサイズに関しては10倍に広大化し、表現方法も2Dから3Dにシフトし始めました。J-PHONEは『ゼビウス』や『スペースハリアー』などといった昔のアーケードゲームを、ドコモはSIMCITYなどパソコンで世界的規模のヒットを飛ばしたゲームを主力商品としていました。 2003 モバイルゲームの一般化 メモリの制限が厳しいJava仮想マシン上ではなく、OS
enchant.jsプログラミングでRequireJSを使うとなにが嬉しいの?どうやって使うの?という話。最初はenchant.jsをCommonJS/Modulesに合うように書き変えなきゃダメだと思っていたんですが、そんなことはないんですね。これは便利。 何が嬉しいの? 開発時にはゲームを複数のJSファイルに分割できるというメリットを、公開時にはゲームプレイに必要なダウンロード回数を減らせるというメリットを得られます。 Why Web Modules? 複雑なゲームじゃないしべつにgame.jsひとつで充分ですという場合には、はっきり言って不要なモノです。しかし長々と開発してたらクラス数が10を超えてきて超長いスクリプトになっちまったぜウォォという場合には、遠慮なくコードを分割統治できるというメリットは大きいでしょう。 enchant.jsとgame.jsを読み込む まずはrequir
enchant.js Developers Blog The Latest News on the HTML5 + JavaScript Game Engine enchant.js そろそろWebGLにも対応したバージョンがリリースされそうなenchant.js。みんなやってるかな? ところでTwitterで気になる発言を目にしました。 enchant.jsのクラス継承のところでつまづいている、ということだったので、今日はこの微妙にややこしい問題を扱ってみようと思います。 まず、JavaScriptのクラス継承は、プロトタイプベース継承と言って、ちょっと特殊です。 JavaScriptのクラス継承については@ITのこの記事が非常に解り易くまとまっています。 しかしこのプロトタイプベース継承という考え方が、そもそもC++やRuby、Javaなど、他のクラスベース継承を採用した言語から入門し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く