60
白猫プロジェクトの裏側! ~パフォーマンスチューニングとリアルタイム通信のすべて~

白猫プロジェクトの裏側! - colopl.co.jp · カットシーンでのロードは1ファイルずつCloseしOnComplete で何もわないようにした 31 COLOPL, Inc

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

  • COPYRIGHT 2014 @ UNITY TECHNOLOGIES

    ~~

    1

  • COPYRIGHT 2014 @ UNITY TECHNOLOGIES

    2

  • COLOPL, Inc. All Rights Reserved

    3

  • COLOPL, Inc. All Rights Reserved

    4

  • COPYRIGHT 2014 @ UNITY TECHNOLOGIES

    5

  • COLOPL, Inc. All Rights Reserved

    6

  • COLOPL, Inc. All Rights Reserved

    Instantiate

    if( action.hit ){ // Instantiate(DamageNumber);}

    7

  • COLOPL, Inc. All Rights Reserved

    void Start(){ // CachedObjectManager.Instance.PreCache(obj, num);}

    // if( action.hit ){ CachedObjectManager.Instance.Borrow(obj);}

    8

  • COLOPL, Inc. All Rights Reserved

    AudioClip Load

    if(useAssetBundle(audio)){ clip = assetbundle.Load(audio);}else{ clip = Resources.Load(audio);}

    9

  • COLOPL, Inc. All Rights Reserved

    AudioClip

    if(cachedClips.Contains(audio)){ clip = cachedClips[audio];}else{ cachedClips.Add(audio, clip);}

    10

  • COLOPL, Inc. All Rights Reserved

    Active ParticleSystems

    11

  • COLOPL, Inc. All Rights Reserved

    GPU

    12

  • COLOPL, Inc. All Rights Reserved

    13

  • COLOPL, Inc. All Rights Reserved

    float4 frag (v2f i) : COLOR { float2 coord1 = i.texcoord.zw*12; float2 coord2 = i.texcoord.zw*2*12; coord2.y -= _Timer / 16; coord1.x += sin( i.texcoord.w * 2 + radians( _Timer * 45 ) )/6; coord2.x -= sin( i.texcoord.w * 8 + i.ref.w )/3;

    14

  • COLOPL, Inc. All Rights Reserved

    float4 frag (v2f i) : COLOR { float2 coord1 = i.texcoord.zw*12; float2 coord2 = i.texcoord.zw*2*12; coord2.y -= _Timer / 16; coord1.x += sin( i.texcoord.w * 2 + radians( _Timer * 45 ) )/6; coord2.x -= sin( i.texcoord.w * 8 + i.ref.w )/3;

    15

  • COLOPL, Inc. All Rights Reserved

    v2f vert (appdata_img v) { o.coord.xy = o.texcoord.zw*12; o.coord.zw = o.coord.xy*2; o.coord.w -= _Timer * 0.0625; o.coord.x += sin( o.texcoord.w * 0.333 + radians( _Timer * 7.5 ) ); o.coord.z -= sin( o.texcoord.w * 2.666 + o.ref.w * 0.3333);

    16

  • COLOPL, Inc. All Rights Reserved

    PC

    ColorColorColor

    17

  • COLOPL, Inc. All Rights Reserved

    Android25 iOS

    18

  • COLOPL, Inc. All Rights Reserved

    Android25 iOS

    AssetBundle Caching.ready

    19

  • COLOPL, Inc. All Rights Reserved

    Caching.readywww.LoadFromCacheOrDownloadAssetBundle

    20

  • COLOPL, Inc. All Rights Reserved

    AssetVersionPlayerPrefsVersionPlayerPrefs

    21

  • COLOPL, Inc. All Rights Reserved

    AssetVersionPlayerPrefsVersionPlayerPrefs

    22

  • COLOPL, Inc. All Rights Reserved

    AssetVersionListPath,VersionNumberAssetBundle

    23

  • COLOPL, Inc. All Rights Reserved

    AssetVersionList

    24

  • COLOPL, Inc. All Rights Reserved

    AssetVersionList

    AssetBundle Build

    25

  • COLOPL, Inc. All Rights Reserved

    AssetVersionList

    AssetBundle Build

    AssetVersionList

    26

  • COLOPL, Inc. All Rights Reserved

    AssetVersionList

    AssetBundle Build

    AssetVersionList

    27

  • COLOPL, Inc. All Rights Reserved

    iOS256

    AssetBundle

    28

  • COLOPL, Inc. All Rights Reserved

    RequestAssetsCoroutine( List paths, Action onComplete );

    pathsDictionary

    29

  • COLOPL, Inc. All Rights Reserved

    RequestAssetsCoroutine( List paths, 256 Action onComplete );

    pathsDictionary

    30

  • COLOPL, Inc. All Rights Reserved

    CloseOnComplete

    31

  • COLOPL, Inc. All Rights Reserved

    DLL StrippingLevel AssetBundle

    32

  • COLOPL, Inc. All Rights Reserved

    dll, AssetStoreEditor

    dll

    1.jsBoo.Lang.dll

    33

  • COLOPL, Inc. All Rights Reserved

    StrippingLevel UnityEngineStrip

    AssetBundle

    34

  • COLOPL, Inc. All Rights Reserved

    Linker

    GameObject

    AwakeDestroy

    35

  • COLOPL, Inc. All Rights Reserved

    AssetBundle Relese

    AssetBundle

    Owner Owner Owner

    36

  • COLOPL, Inc. All Rights Reserved

    AssetBundle Relese

    AssetBundle

    Owner Owner Owner

    Release

    37

  • COLOPL, Inc. All Rights Reserved

    AssetBundle Relese

    AssetBundle

    Owner Owner Owner

    Release Release

    38

  • COLOPL, Inc. All Rights Reserved

    AssetBundle Relese

    Owner Owner Owner

    Release Release Release

    Unload

    39

  • COLOPL, Inc. All Rights Reserved

    AssetBundle

    AssetBundle

    Owner Owner Owner

    40

  • COLOPL, Inc. All Rights Reserved

    AssetBundle

    AssetBundle

    Owner Owner

    Release Release Destroy

    ReleaseDestroy AssetBundle

    41

  • COLOPL, Inc. All Rights Reserved

    Xcode

    FrameDebuggerVRAM

    42

  • COLOPL, Inc. All Rights Reserved

    CharacterController UI2D

    43

  • COPYRIGHT 2014 @ UNITY TECHNOLOGIES

    44

  • COLOPL, Inc. All Rights Reserved

    45

  • COLOPL, Inc. All Rights Reserved

    46

  • COLOPL, Inc. All Rights Reserved

    Web Server (API)

    EC2

    Load Balancer(ELB)

    Web Socket Server

    EC2

    Batch Server EC2

    Admin Server EC2

    Cache Server EC2

    DB Server EC2

    web socket (Best HTTP)

    hMp(WWW) APNS/GCM noSficaSon

    mulS play 47

  • COLOPL, Inc. All Rights Reserved

    48

  • COLOPL, Inc. All Rights Reserved

    49

  • COLOPL, Inc. All Rights Reserved

    Web Server (API)

    EC2

    Load Balancer(ELB)

    Web Socket Server

    EC2

    Batch Server EC2

    Admin Server EC2

    Cache Server EC2

    DB Server EC2

    web socket (Best HTTP)

    hMp(WWW) APNS/GCM noSficaSon

    mulS play 50

  • COLOPL, Inc. All Rights Reserved

    Web Socket Server

    Batch

    MQ

    Web Socket Server

    EC2

    Web Socket Proxy

    EC2

    host user guest user

    DB

    51

  • COLOPL, Inc. All Rights Reserved

    Web Socket Server

    host user guest user

    host() Boss(AI etc) - - (,) - (,)

    guest() - - (,) - (,) host

    52

  • COLOPL, Inc. All Rights Reserved

    B B

    B B

    ping ping

    User A User B

    Web Socket Server

    53

  • COLOPL, Inc. All Rights Reserved

    54

  • COLOPL, Inc. All Rights Reserved

    Web Server

    User A Item X 5

    request(2)

    response

    update etc

    user_id item_id Num

    A X 5->3

    55

  • COLOPL, Inc. All Rights Reserved

    56

  • COLOPL, Inc. All Rights Reserved

    57

  • COLOPL, Inc. All Rights Reserved

    token

    1token

    58

  • COLOPL, Inc. All Rights Reserved

    DB-

    59

    int(System.Int32)21 Bigint( 922) id(bigint) Foo bar

    2,147,483,647

    Int

  • COLOPL, Inc. All Rights Reserved

    60