1 / 14

生徒会クエスト コードレビュー ?

生徒会クエスト コードレビュー ?. はぐれた メル で プログラムを 担当した一人の仁藤が 授業開始前の 2 時間くらいで作成. ってか 何を語ればいいのだ?. とりあえずコードレビューとは違うかも知れないけど、ミニテクニックとかを書いてみたよ. モーションデータの読み込み 編. s printf を使う. s printf でググ った 結果 http :// www9.plala.or.jp/sgwr-t/lib/sprintf.html

Download Presentation

生徒会クエスト コードレビュー ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 生徒会クエスト コードレビュー? はぐれたメルでプログラムを担当した一人の仁藤が授業開始前の2時間くらいで作成

  2. ってか何を語ればいいのだ? • とりあえずコードレビューとは違うかも知れないけど、ミニテクニックとかを書いてみたよ

  3. モーションデータの読み込み編

  4. sprintfを使う • sprintfでググった結果 http://www9.plala.or.jp/sgwr-t/lib/sprintf.html • モーションファイル名を、motion000.fkm, motion001.fkm, motion002.fkm, motion003.fkm ・・・というように連番化する。(ファイル名からファイルの中身わからなくなるね)

  5. 間違ってたらスミマセン。 for(inti = 0; i < (モーションの数); ++i){ char str[100]; // 適当 sprintf(str, "data/cg/raimu/motion%03d.fkm“, i); if(!chara.loadMotionData(str)){ fl_alert("Motion Read Error."); } }

  6. enumの数を数える? enum Motion{ WAIT, WALK, ATTACK, GUARD, JUMP, MotionMax }; int num = int(MotionMax);

  7. アニメーションの読み込み編

  8. 通常はsetTextureCoordを使う? voidsetTextureCoord(double sX, double sY, double eX, double eY); // 5*5の画像だとこんな感じ。 // intstep = 0; if(step >= 25){ step = 0; } texture.setTextureCoord((double)(step%5)*0.2, 1.0-(double)(step/5)*0.2, (double)((step%5)+1)*0.2,1.0-(double)((step/5)+1)*0.2); step++;

  9. 簡単3Dアニメーション編 • FKを使ってる人のみでごめんなさい • 素晴らしいFKのおかげで、3行の関数を書き足すだけで3Dアニメーショっぽいのを作れたりします。っていうか作ってみました。

  10. まずはモーションを作ろう • FK Performerでいろいろとモーションを作る。 • 登場キャラクターのモーションを作る • カメラのモーションも作る。 • ってか普通に大学の講義でFKPerformerは弄る(弄った)はずなのでこんな説明いらないね

  11. プログラム準備 • main.h • Camera.h • Camera.cpp

  12. (準備と)実行。 • main.cpp 準備→ メインループ内→ (これだけ!)

  13. ゲームプログラマとは・・・ みなさんはプログラマではなくゲームプログラマです。

  14. ご清聴ありがとうございました!!

More Related