Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[GREE Tech Talk #07] Unityカジュアルゲーム・ケーススタディ

[GREE Tech Talk #07] Unityカジュアルゲーム・ケーススタディ

「Unityカジュアルゲーム・ケーススタディ」稲森 亮介(グリー株式会社)

※GREE Tech Talk #07「Unity Performance Casual Talk」での登壇資料です。
http://techtalk.labs.gree.jp/07/

gree_tech

May 25, 2015
Tweet

More Decks by gree_tech

Other Decks in Technology

Transcript

  1. Copyright © GREE, Inc. All Rights Reserved. Amy the Starry

    Archer 11⽉月 Director Programer 12⽉月 1⽉月 2⽉月 3⽉月 Programer (Junior) Artist Artist (3D Designer) (Effect Designer) (Sound Designer)
  2. Copyright © GREE, Inc. All Rights Reserved. w J04Ҏ߱σόΠε͸J1IPOFҎ߱ w

    "OESPJEҎ߱σόΠε͸೥Ҏ಺ʹൃച͞Εͨػछ w ͨͩ͠2"݁ՌͰରԠίετͷߴ͍σόΠε͸੾Δ w λϒϨοτ୺຤΋ରԠ 対応デバイス
  3. Copyright © GREE, Inc. All Rights Reserved. “you don't gain

    that much from 60 fps and it doesn't look like the real thing.” - Nicolas Guérin(Ubisoft) IUUQXXXUFDISBEBSDPNOFXTHBNJOHWJWBMBSFTPMVDJOBTTBTTJOTDSFFEEFWUIJOLTJOEVTUSZJTESPQQJOHGQTTUBOEBSE “جຊ75FPSҎ্” ※75HzϞʔυͷ৔߹ - CEDEC2014ʮOculus Panel Discussion ʙOculus RiftΛ༻͍ͨήʔϜ੍࡞ʙʯ 30 fps? 60 fps? or...?
  4. Copyright © GREE, Inc. All Rights Reserved. Target Frame Rate

    w J1IPOFTʙɺ/FYVTʙ౳͸GQTΛλʔήοτʹ w ࠷௿ϥΠϯ͸GQT w ݟͨ໨͚ͩ͡Όͳͯ͘ɺૢ࡞ײ౓ɾ೉қ౓ʹ΋Өڹ͢Δҝ΍΍ ஫ྗ w "QQMJDBUJPOUBSHFU'SBNFSBUFΛಈతʹม͑Δ
  5. Copyright © GREE, Inc. All Rights Reserved. w (SBQIJDT w

    TUBUJDCBUDIJOHΛ༗ޮʹ w EZOBNJDCBUDIJOHΛ༗ޮʹ͢Δҝͷॾ৚݅Λຬͨ͢ w ϐΫηϧϥΠςΟϯάΛ࢖Θͳ͍ w ͦ΋ͦ΋ϦΞϧλΠϜϥΠςΟϯάΛͳΔ΂͘ݮΒ͢ w ςΫενϟѹॖ w ΞϧϑΝςετɺΞϧϑΝϒϨϯσΟϯά࠷খԽ w 4DSJQUT w 0CKFDU1PPMJOHͰ*OTUBOUJBUF Λආ͚Δ w OFXΛݮΒͯ͠($ΛݮΒ͢ w 1IZTJDT w $PMMJEFS͸ͳΔ΂͘ϓϦϛςΟϒίϥΠμΛ૊Έ߹ΘͤΔ w pYFE%FMUB5JNF͸ՄೳͳൣғͰখ͘͞ 基本のおさらい
  6. Copyright © GREE, Inc. All Rights Reserved. Sprites/Default • Sprite⽤用シェーダの不不要な処

    理理を削ってみたりもしたもの の、フラグメントシェーダは 削れなかったのでほぼ効果無 し • 検証環境: SC-‐‑‒04E/Android4.4.2 • フラグメントシェーダのColor 処理理も削りたかったが、雲出 現時にフェードインさせる必 要があった為削れず
  7. Copyright © GREE, Inc. All Rights Reserved. まとめ w ӢͷΑ͏ʹɺΞϧϑΝϒϨϯσΟϯά͕ൃੜ͢Δ4QSJUF

    1BSUJDMF ؚΉʣͰը໘ΛຒΊΔ৔߹ɺ0WFSESBXΛ͍͔ʹݮΒ͔͢޻෉͢ Δ w ֆ͕νʔϓʹͳΒͳ͍ൣғͰຕ͋ͨΓͷ4QSJUFΛେ͖͘͠ɺຕ ਺ΛݮΒ͢
  8. Copyright © GREE, Inc. All Rights Reserved. ライトマップを直接編集 w "TTFU4UPSFͷ%എܠૉࡐ͸ɺϥΠ

    τϚοϓʹ࢖ΘΕͨ-JHIU͕࡟আ͞Ε ͍ͯΔࣄ͕͋Δ w ͔Β-JHIUΛ഑ஔ͠௚͢ͷ͸͠ΜͲ ͍ͷͰɺϥΠτϚοϓςΫενϟࣗମ Λௐ੔͢Δͱָ
  9. Copyright © GREE, Inc. All Rights Reserved. 動的にライトマップ解除 • lightmapIndexはLightmapSettings.lightmapsのインデックスだが、-‐‑‒1は

    ライトマップが割り当てられていない事を表す初期値 • どこかのバージョンで1バイトから2バイトに変更更された模様
  10. Copyright © GREE, Inc. All Rights Reserved. その他Lightingについて w ఢΩϟϥΫλʔ͸௖఺ϥΠςΟϯάͷΈ

    w ৗʹಈ͖·Θͬͯͯɺ͔͠΋ԕ໨ͳͷͰͦ͜·ͰؾʹͳΒͳ͍ w Ͱ΋·͙ͬ͢%JSFDUJPOBM-JHIUΛ౰ͯΔ͚ͩͩͱ҆ͬΆ͍ͷͰɺ 1PJOU-JHIUΛෳ਺࢖͏ w -JHIU1SPCFT͸࢖Θͣ w ϥΠτϚοϓ͸QY ,# ºຕલޙºγʔϯ਺ w ͋Μ·ΓഎܠͷҰՕॴΛݟͭΊΔػձͷແ͍ήʔϜͳͷͰ
  11. Copyright © GREE, Inc. All Rights Reserved. 検証 w (BMBYZ4

    4$& "OESPJE w 6OJUZ w ສճϧʔϓͤͯ͞ܭଌ w JGจͷΦʔόϔου͸ແࢹͰ͖Δఔ౓
  12. Copyright © GREE, Inc. All Rights Reserved. DBDIFE5SBOTGPSN USBOTGPSN (FU$PNQPOFOU

    UZQFPG 5SBOTGPSN    0.0005000 0.0002500 0.0007500 0.0010000 sec (loop:100k)
  13. Copyright © GREE, Inc. All Rights Reserved. (FU$PNQPOFOU UZQFPG 5SBOTGPSN

    'VODUJPO 'JOE 3BZDBTU 0.0005000 0.0002500 0.0007500 0.0010000 sec (loop:100k) (無視できるレベル)
  14. Copyright © GREE, Inc. All Rights Reserved. Raycast() w ٷ͸6OJUZͷিಥ൑ఆΛ࢖Θͣɺ

    ຖϑϨʔϜ3BZDBTU Ͱॲཧ w 3BZDBTU"MMܥ͸ɺিಥ͢Δॱʹฦ ͯ͘͠ΕΔΘ͚Ͱ͸ͳ͍఺ʹ஫ҙ w ౰ήʔϜͰ͸࢓্༷ɺ౎౓3BZDBTU)JU<>Λ ιʔτͰे෼ʹϫʔΫ
  15. Copyright © GREE, Inc. All Rights Reserved. 検証 w ॏ͍ͨͱ͞ΕΔ'JOE

    ܥͷதͰ΋ɺ'JOE0CKFDUT0G5ZQF ͕ஈ ҧ͍ʹॏ͔ͬͨʢdNTDBMM  w 3BZDBTU ͸$PMMJEFSͷ਺ɺ'JOE ܥ͸ώΤϥϧΩʔʹӨڹ͞Ε Δ͸ͣͳͷͰɺ࣮ࡍʹ࢖͏4DFOF্Ͱ࣮ଌͯ͠ΈΔ
  16. Copyright © GREE, Inc. All Rights Reserved. Enemy Move w

    ఢͷಈ͖͕੩తͳ৔߹ͬͯͲΜͳ࣮૷͕ϝδϟʔͳΜͰ͠ΐ͏ Ͷʁ w ͱΓ͋͑ͣख෇͚Ͱ੍ޚ఺ஔ͍ͯ͘Α͏ͳ࡞ۀ͸ͨ͘͠ͳ͔ͬ ͨ w Ͱ΋೉қ౓ઃܭ্ɺগ͠ෳࡶͳಈ͖΋͍ͤͨ͞
  17. Copyright © GREE, Inc. All Rights Reserved. Enemy Move 線分(-‐‑‒5,0,10)(5,0,10)

    + = 中⼼心(5,0,10)の円 Player(Camera) Player(Camera) Player(Camera)
  18. Copyright © GREE, Inc. All Rights Reserved. Enemy Move 中⼼心(0,0,50),

    半径10の円 + 中⼼心(0,0,10), 半径1の円 (θ:0→1080°) = Player(Camera)
  19. Copyright © GREE, Inc. All Rights Reserved. Enemy Move w

    ϑΥʔϝʔγϣϯΛ૊ΜͰΔΑ͏ͳಈ͖͸ɺಉ͡يಓͷఢͰग़ ݱ࠲ඪΛͣΒͤ͹0, w ಉ͡يಓͱಉ͡ग़ݱҐஔͰɺग़ݱ࣌ؒΛͣΒͤ͹ɺͭͷيಓ্ Λ࿈ͳͬͯಈ͘දݱ w ิॿػೳΛ༻ҙͯ͠ੜ࢈ੑ͸্͕͕ͬͨɺ௚ײతʹઃఆͮ͠Β ͍ͷͰɺ׳ΕΔͷʹ͸͕͔͔࣌ؒΔ