annotate Slide/master-slide.html @ 55:eb6cedaa62cc

slide update
author riono <e165729@ie.u-ryukyu.ac.jp>
date Sun, 13 Feb 2022 21:02:47 +0900
parents 3f1a4ab62e2e
children 01087d212c1a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 <!DOCTYPE html>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 <html>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 <head>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 <meta http-equiv="content-type" content="text/html;charset=utf-8">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 <title>継続を使用する並列分散フレームワークのUnity実装</title>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 <meta name="generator" content="Slide Show (S9) v4.1.0 on Ruby 2.6.3 (2019-04-16) [universal.x86_64-darwin19]">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 <meta name="author" content="Ryo Yasuda, Shinji Kono" >
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 <!-- style sheet links -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 <link rel="stylesheet" href="s6/themes/projection.css" media="screen,projection">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 <link rel="stylesheet" href="s6/themes/screen.css" media="screen">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <link rel="stylesheet" href="s6/themes/print.css" media="print">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <!-- JS -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 <script src="s6/js/jquery-1.11.3.min.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 <script src="s6/js/jquery.slideshow.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <script src="s6/js/jquery.slideshow.counter.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 <script src="s6/js/jquery.slideshow.controls.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <script src="s6/js/jquery.slideshow.footer.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 <!-- prettify -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 <link rel="stylesheet" href="scripts/prettify.css">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 <script src="scripts/prettify.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 <script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 $(document).ready( function() {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 Slideshow.init();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 $('code').each(function(_, el) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 if (!el.classList.contains('noprettyprint')) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 el.classList.add('prettyprint');
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 });
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 prettyPrint();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 } );
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 </script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 <!--[if IE]>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 <script src="s6/js/jquery.microsoft.js"></script>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 <![endif]-->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 </head>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 <body>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 <div class="layout">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 <div id="header"></div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 <div id="footer">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 <div align="right">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 <img src="s6/images/logo.svg" width="200px">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 <div class="presentation">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 <div class='slide cover'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 <table width="90%" height="90%" border="0" align="center">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 <td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 <div align="center">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 <h1><font color="#808db5">継続を使用する並列分散フレームワークのUnity実装</font></h1>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 </td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 <td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 <div align="left">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 Ryo Yasuda, Shinji Kono
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 並列信頼研
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 </td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 </table>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 <div class='slide'>
55
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
92 <h3 id="本研究における成果">本研究における成果</h3>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
93 <ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
94 <li>並列分散フレームワークChristieをUnityで動作可能に
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
95 <ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
96 <li>Unity上でp2pを基礎としたオンラインゲームの開発が可能に</li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
97 </ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
98 </li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
99 <li>Christie Sharpと既存のUnityの通信フレームワークとの機能的な比較を行った
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
100 <ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
101 <li>Christie Sharpの利点
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
102 <ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
103 <li>単体でも並列ライブラリとして機能する</li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
104 <li>通信切断が起こった場合でもゲームロジックが停止しない</li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
105 </ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
106 </li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
107 </ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
108 </li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
109 </ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
110
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
111
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
112
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
113 </div>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
114
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
115 <div class='slide'>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
116 <!-- _S9SLIDE_ -->
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
117
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
118
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
119 <h3 id="概要">概要</h3>
54
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 <li>オンラインゲームにおける通信にはクライアントサーバ方式が主流
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 <li>データの共有はサーバを経由するため低速</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 <li>当研究室で開発を行っているChristie の分散計算を使用することで、高速かつ安全に通信できると考えた</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 <li>Christie をUnity で使用するためにC# で書き換えを行った</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 <li>実装としては、localDataGearManager を用いた同一プロセスで複数インスタンス立ち上げによる通信が可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 <h3 id="オンラインゲームにおけるデータ通信">オンラインゲームにおけるデータ通信</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 <li>オンラインゲームは複数のプレイヤーが関与する分散プログラム
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 <ul>
55
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
143 <li>分散プログラムを正しく書くことは難しい
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
144 <ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
145 <li>ネットワークの変化、故障、性能の多様性を吸収する</li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
146 <li>スケーラビリティー リソースの追加のみでサービスの質の直感的に維持できる性能基準</li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
147 </ul>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
148 </li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
149 <li>Debugも困難な場合が多い</li>
54
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 <li>クライアントの負荷軽減やチート対策のため、クライアントサーバ方式が主流
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 <ul>
55
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
154 <li>データの同期にはサーバを経由するためp2pに比べ低速</li>
54
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 <h3 id="オンラインゲームにおけるデータ通信-1">オンラインゲームにおけるデータ通信</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 <li>当研究室では並列分散通信フレームワークChristie を開発中である
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 <li>型のあるDataGear とKey を持つストリーム、DataGearManager として格納している</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 <li>他のノードはDGM のproxyを持っており、proxy に書き込むことで通信を実現している</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 <li>DGM はトポロジーマネージャーによって自動的に構築される
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 <li>プログラム自体はDGM の名前を知っていれば良い</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 <li>他のノードのIP addressなどを知る必要はない</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 <li>ネットワークが切断されてもゲームは継続可能</li>
55
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
182 <li>
eb6cedaa62cc slide update
riono <e165729@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
183 <p>ノードが接続している対象を直接知ることはできない</p>
54
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 <li>本研究ではJava で書かれたChristieとC# で書き換えを行ったChristie #を説明し、その機能と実装の差について考察を行う</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 <h3 id="christie-の基礎概念">Christie の基礎概念</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 <li>Christie は当研究室で開発をしている並列分散通信フレームワークである
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 <li>同じく当研究室で開発しているGearsOS に導入予定のため次のような概念を持っている</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 <li>CodeGear (クラスやスレッド)</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 <li>DataGear (変数データ)</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 <li>CodeGearManager (CG,DG,DGMを管理)</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 <li>DataGearManager (DGを管理,localとremoteの2種類がある, put操作によりDGを格納)</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
212
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 <h3 id="christie-の基礎概念-1">Christie の基礎概念</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 <center><img src="https://i.imgur.com/ZvpoXGd.png" alt="message" width="450" height="300" /></center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 <center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 Christie を同一プロセスで複数インスタンス立ち上げた際の接続の構造図
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 </center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
222
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 <li>全てのCGM はThreadPool と他のCGM をList として共有している</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 <li>ThreadPool はCPU に合わせた並列度でqueue に入ったThread を逐次実行していく
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 <li>1つのThreadPool で処理を行うことでCPU のコア数に適したThread を管理でき、並列度を下げ流ことを防ぐ</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 <li>ThreadPoolを共有することメタレベルで全てのCG/DG にアクセス可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
232
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
233
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 <h3 id="christie-の基礎概念-annotationについて">Christie の基礎概念 annotationについて</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 <p>DG を取り出すためにCG内に宣言した変数データにannotation をつける。annotationには以下の4つがある。</p>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
243
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 <li>Take
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 <li>先頭のDG を読み込み、そのDG を削除する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 <li>DG が複数ある場合Take を使用する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 <li>Peek
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 <li>先頭のDG を読み込むがDG を削除しない</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 <li>操作をしない場合は同じデータを参照し続ける</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 <li>TakeFrom
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 <li>Take と同じ動作だが、remote 先のDGMを指定できる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 <li>PeekFrom
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 <li>Peek と同じ動作だが、remote 先のDGMを指定できる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
268
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
272
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
275
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
276
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 <h3 id="topology-manager">Topology Manager</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 <li>Christie 上でNetwork Topology を形成する
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 <li>参加を表明したノードに名前を与える</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 <li>必要があればノード同士の配線を自動で行う</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 <li>静的Topology と動的Topology 2種類がある</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
288
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
294
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 <h3 id="topology-manager-1">Topology Manager</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 <li>静的Topology は以下のようなdot ファイルを与えることでNode の関係を構築できる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 <li>それぞれのNode への通信にはIP address などは使用せずright というlabel を使用することで接続できる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 <pre><code class="language-ring.dot">digraph test {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 node0 -&gt; node1 [label="right"]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 node1 -&gt; node2 [label="right"]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 node2 -&gt; node0 [label="right"]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 <center><img src="https://i.imgur.com/pCCHo2W.png" alt="message" width="200" height="300" /></center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 <center></center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
311
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 <!---
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
313
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 ---
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 ### Christie のコード例
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
317
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 ``` java:StartHelloWorld.java
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 public class StartHelloWorld extends StartCodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
320
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 public StartHelloWorld(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 super(cgm);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
324
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 public static void main(String[] args){
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 CodeGearManager cgm = createCGM(10000);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 cgm.setup(new HelloWorldCodeGear());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 cgm.setup(new FinishHelloWorld());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 cgm.getLocalDGM().put("helloWorld","hello");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 cgm.getLocalDGM().put("helloWorld","world");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 ```
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
334
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 ```java:HelloWorldCodeGear.java
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 public class HelloWorldCodeGear extends CodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
337
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 @Take String helloWorld;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
339
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 @Override
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 protected void run(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 System.out.print(helloWorld + " ");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 cgm.setup(new HelloWorldCodeGear());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 cgm.getLocalDGM().put(helloWorld,helloWorld);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 ```
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 ```java:FinishHelloWorld.java
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 public class FinishHelloWorld extends CodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 @Take String hello;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 @Take String world;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
353
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 @Override
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 protected void run(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 cgm.getLocalDGM().finish();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 ```
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 --->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
361
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
362
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
363
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
365
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
368
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
369
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 <h3 id="java-からの変更点">Java からの変更点</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 <li>Java とC# は基本的に書き方は変わらない</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
374
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 <pre><code class="language-java:ex.java">Java
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 public class StartHelloWorld extends StartCodeGear { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
377
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 @Override
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 protected void run(CodeGearManager cgm) { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
380
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 @Take String helloWorld;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
383
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 <pre><code class="language-cs:ex.cs">C#
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 public class StartHelloWorld : StartCodeGear { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
386
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 public override void Run(CodeGearManager cgm) { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
388
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 [Take] string helloWorld;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
391
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
392
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
393
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
395
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
396 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
398
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
399
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
400 <h3 id="christie--のコード例">Christie # のコード例</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 <pre><code class="language-cs:StartHelloWorld.cs">public class StartHelloWorld : StartCodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
402
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
403 public StartHelloWorld(CodeGearManager cgm) : base(cgm) { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
404
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
405 public static void Main(string[] args) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 CodeGearManager cgm = CreateCgm(10000);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 cgm.Setup(new HelloWorldCodeGear());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 cgm.Setup(new FinishHelloWorld());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 cgm.GetLocalDGM().Put("helloWorld", "hello");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 cgm.GetLocalDGM().Put("helloWorld", "world");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
414
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 <pre><code class="language-cs:HelloWorldCodeGear.cs">public class HelloWorldCodeGear : CodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
416 [Take] string helloWorld;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
417
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
418 public override void Run(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
419 Console.Write(helloWorld + " ");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 cgm.Setup(new HelloWorldCodeGear());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
421 cgm.GetLocalDGM().Put(helloWorld, helloWorld);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
422 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
424 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
425
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
426 <pre><code class="language-cs:FinishHelloWorld.cs">public class FinishHelloWorld : CodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
427 [Take] private string hello;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 [Take] private string world;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
429
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 public override void Run(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
431 cgm.GetLocalDGM().Finish();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
432 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
433 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
435
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
436 <ol>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
437 <li>Main関数でCGM のインスタンス生成</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
438 <li>2つのCG をsetupして待ち状態にする</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
439 <li>key:hellowWorld data:”hello” がTake される</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 <li>変数が揃ったためStartHelloWorld のRun が実行される</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 <li>“hello” がprintされ、再び待ち状態になる。 key:hellow data:”hello”がput される</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
442 <li>key:hellowWorld data:”world” がTake され、4,5と同様に処理される</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
443 <li>変数hello とworld がput され揃ったため、FinishHelloWorld のRun が実行され、プログラムは終了する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
444 </ol>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
445
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
446 <h3 id="unity">Unity</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
447 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
448 <li>UnityはUnity Technologies が開発を行っているゲームエンジンである
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
449 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
450 <li>世界で最も使用されているゲームエンジン</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
451 <li>非常に軽く、スペックが低いノートPCでもゲーム開発が可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
452 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
453 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
454 <li>プログラミング言語にはC# が採用されている
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
455 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 <li>C# のAPI やUnity 向けに拡張されたAPIも使用可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
457 <li>開発した機能をUnity に組み込むことも可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
458 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
459 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
460 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
461
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
462
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
463
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
465
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
466 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
468
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
469
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
470 <h3 id="christie--on-unityのコード例">Christie # on Unityのコード例</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
471 <pre><code class="language-cs:UnityStartHelloWorld.cs">public class StartHelloWorld : StartCodeGear {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
472
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
473 public StartHelloWorld(CodeGearManager cgm) : base(cgm) { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
474
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
475 public void RunCodeGear(CodeGearManager cgm) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
476 cgm.Setup(new HelloWorldCodeGear());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
477 cgm.Setup(new FinishHelloWorld());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
478 cgm.GetLocalDGM().Put("helloWorld", "hello");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
479 cgm.GetLocalDGM().Put("helloWorld", "world");
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
480 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
483
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
484 <pre><code class="language-cs:UnityHelloWorld.cs">public class HelloWorld : MonoBehaviour {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
485 void Start() {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
486 CodeGearManager cgm = StartCodeGear.CreateCgm(10000);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
487 var helloWorld = new StartHelloWorld(cgm);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 helloWorld.RunCodeGear(cgm);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
491 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
493 <li>HelloWorldCodeGearと、FinishHelloWorld はそのまま使用</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
494 <li>StartHelloWorld をUnity で使用できるように書き換え
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
495 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 <li>Unity ではMonoBehaviour 継承したクラスが動作可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 <li>ゲーム開始時に1度だけ呼ばれるStart 関数</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
498 <li>Start 関数でCGM のインスタンスを生成</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 <li>Main 関数を名前を変えたRunCodeGear 関数を実行</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
502 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
503
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
504
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
505
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
507
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
509 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
510
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
511
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
512 <h3 id="take-annotationの実装">Take annotationの実装</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
513 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 <li>Christie ではDGを取得するためにannotation を使用している
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 <li>C# ではannotation と同様の機能にattribute があり、Take をattribute で実装した</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
517 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 <li>Take はフィールド変数に対して適用する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
521
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 <pre><code class="language-java:Take.java">@Target(ElementType.FIELD)
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
523 @Retention(RetentionPolicy.RUNTIME)
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
524 public @interface Take { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
525 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
526
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
527 <pre><code class="language-cs:Take.cs">[AttributeUsage(AttributeTargets.Field)]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 public class Take : Attribute { }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
530
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
531
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
532
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
533 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
534
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
537
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
538
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 <h3 id="messagepackの相違点">MessagePackの相違点</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
540 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 <li>Christie ではMessagePack を使用してデータを圧縮し送受信している
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
542 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 <li>インスタンス内のpublic 変数に対して圧縮可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 <li>バージョンが古いため、現在はサポートされていない
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
547 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 <li>そのため、最新版とは記述方法が異なる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
551 <li>圧縮するクラスには@Message annotatoinをつける</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 <li>MessagePack インスタンスを作成後、write、read することでデータの圧縮解凍が可能
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
554 <li>圧縮されたデータはbyte[] 型になる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
555 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
556 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
558
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 <pre><code class="language-java:MessagePackEx.java">public class MessagePackExample {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 @Message
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 public static class MyMessage {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
562 public String name;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 public double version;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
564 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
565
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
566 public static void main(String[] args) throws Exception {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 MyMessage src = new MyMessage();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
568 src.name = "msgpack";
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 src.version = 0.6;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
570
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 MessagePack msgpack = new MessagePack();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
572 // Serialize
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
573 byte[] bytes = msgpack.write(src);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
574 // Deserialize
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
575 MyMessage dst = msgpack.read(bytes, MyMessage.class);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
576 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
577 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
578 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
579
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
580
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
581
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
583
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
585 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
586
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
587
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
588 <h3 id="messagepackの相違点-1">MessagePackの相違点</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
590 <li>C# のMessagePack は複数存在している
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
592 <li>java 版と似たような書き方をするMessagePack-CSharp を選択した</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 <li>圧縮を行いたいクラスに対してMessagePackObject attribute を付ける</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 <li>圧縮する変数に対してkey を設定できる
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
598 <li>解凍時にjson として展開できる</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
599 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
601 <li>データの圧縮にはMessagePackSerializer.Serialize 関数を用い、byte[] に圧縮される</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
602 <li>データの解凍にはMessagePackSerializer.Deserialize 関数を使用する
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
603 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
604 <li>Deserialize 関数はジェネリスク関数であるため&lt;&gt;内に解凍するデータの型情報を記述する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
605 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
606 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
607 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
608
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
609 <pre><code class="language-cs.MessagePackEx.cs">[MessagePackObject]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 public class MyClass {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
611 [Key(0)]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
612 public int Age { get; set; }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
613 [Key(1)]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
614 public string FirstName { get; set; }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 [Key(2)]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
616 public string LastName { get; set; }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
617
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 static void Main(string[] args) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
619 var mc = new MyClass {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
620 Age = 99,
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
621 FirstName = "hoge",
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
622 LastName = "huga",
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
623 };
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
624
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 byte[] bytes = MessagePackSerializer.Serialize(mc);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
626 MyClass mc2 = MessagePackSerializer.Deserialize&lt;MyClass&gt;(bytes);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
627
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
628 // [99,"hoge","huga"]
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
629 var json = MessagePackSerializer.ConvertToJson(bytes);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
630 Console.WriteLine(json);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
631 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
632 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
633 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
634
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
635
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
636
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
637 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
638
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
640 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
641
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
642
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
643 <h3 id="threadpoolからtaskへの書き換え">ThreadPoolからTaskへの書き換え</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
644 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
645 <li>Christie ではThreadPool を使用していた
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
646 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
647 <li>Christie # ではThreadPoolより高機能なTask を用いて書き換えを行った</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
648 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
649 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
650 <li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
651 <p>Task は複雑な非同期処理を通常のコーディングと同じ感覚で直感的に記述できる</p>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
652 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
653 <li>裏でThreadPool が動くようになっている
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
654 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
655 <li>大きく動作は変わらない</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
656 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
657 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
658 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
659
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
660
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
661
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
662 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
663
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
664 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
665 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
666
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
667
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 <h3 id="threadpoolからtaskへの書き換え-1">ThreadPoolからTaskへの書き換え</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
669
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
670 <pre><code class="language-java:PriorityThreadPoolExecutors.java">public class PriorityThreadPoolExecutors {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
671
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
672 private static class PriorityThreadPoolExecutor extends ThreadPoolExecutor {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
673 private static final int DEFAULT_PRIORITY = 0;
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
674 private static AtomicLong instanceCounter = new AtomicLong();
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
675
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
676 public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize,
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 int keepAliveTime, TimeUnit unit) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
678 super(corePoolSize, maximumPoolSize, keepAliveTime, unit, (BlockingQueue) new PriorityBlockingQueue&lt;ComparableTask&gt;(10,
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
679 ComparableTask.comparatorByPriorityAndSequentialOrder()));
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
680 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
681
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
682 @Override
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
683 public void execute(Runnable command) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
684 super.execute(command);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
685 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
686 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
687 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
688 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
689
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
690 <pre><code class="language-cs:ThreadPoolExecuters.cs">public class ThreadPoolExecutors {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
691
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
692 public ThreadPoolExecutors(int nWorkerThreads, int nIOThreads) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
693 ThreadPool.SetMinThreads(nWorkerThreads, nIOThreads);
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
694 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
695
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
696 public void Execute(CodeGearExecutor command) {
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
697 Task.Factory.StartNew(() =&gt; command.Run());
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
698 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
699 }
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 </code></pre>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
701
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
702
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
703
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
704 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
705
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
706 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
707 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
708
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
709
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
710 <h3 id="unityで使用されているライブラリとの比較">Unityで使用されているライブラリとの比較</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
711 <p>Unityで使用されている既存のライブラリとして、Photon Unity Networking 2(PUN2)、MLAPIと、Christie # の比較を行う。</p>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
712
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
713 <table>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
714 <thead>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
715 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
716 <th> </th>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
717 <th>Christie #</th>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
718 <th>PUN2</th>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
719 <th>MLAPI</th>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
720 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
721 </thead>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
722 <tbody>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
723 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
724 <td>通信方式</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
725 <td>p2p</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
726 <td>クライアントサーバ方式</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 <td>クライアントサーバ方式</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
728 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
729 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
730 <td>プロトコル</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
731 <td>TCP</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
732 <td>TCP</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
733 <td>TCP</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
734 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
735 <tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
736 <td>特徴</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
737 <td>通信のためのIP address がプログラム直接記述されていない</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
738 <td>Photon Cloud でサーバを自前で用意する必要がない</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
739 <td>Unity公式でサポートされている RPC が使用可能</td>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
740 </tr>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
741 </tbody>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
742 </table>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
743
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
744
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
745
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
746 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
747
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
748 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
750
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
751
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
752 <h3 id="チート対策について">チート対策について</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
753 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
754 <li>オンラインゲームにおいてチート対策は必須</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
755 <li>通常のオンラインゲームでのチート対策
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
756 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
757 <li>クライアントをモニタリングする</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
758 <li>ダメージ計算などは全てサーバで行う</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
759 <li>ユーザからの通報</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
760 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
761 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
762 <li>Christie では型があるDataGear をkey と合わせてDGMに格納する方式を取っている
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
763 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
764 <li>他のノードとの通信にはDGM のporxy に書き込むことで可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
765 <li>DGM の構成にはTopology Manager が自動的に構成する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
766 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
768 <li>Topology Manager を使用することでクライアントは接続先を直接知る必要がない
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
769 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
770 <li>IP address などチートに使用される情報をプログラムに含めることなく通信可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
771 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
772 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
773 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
774
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 <center><img src="https://i.imgur.com/L8GVFdL.png" alt="message" width="450" height="260" /></center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
776 <center>label を使用したデータ通信</center>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
777
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
778 <h3 id="実装の現状">実装の現状</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
779 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
780 <li>Local DGMを使用してUnity 上でデータ通信を行うことができている</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
781 <li>Scketo とMessagePack を用いた通信に関しては、書き換え途中
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
782 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
783 <li>独自クラスをMessagePack でserialize できない</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
784 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
785 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
786 <li>今後の予定
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
787 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
788 <li>Christie で実装されている例題</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
789 <li>Alice からChristie に書き換えた際に取り除かれた機能の洗い出しを行う</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
790 <li>Unity でChristie #の検証として100人規模のFPS の作成</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
791 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
792 </li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
793 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
794
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
795
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
796
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
797 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
798
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
799 <div class='slide'>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
800 <!-- _S9SLIDE_ -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
801
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
802
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
803 <h3 id="まとめ">まとめ</h3>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
804 <ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
805 <li>Christie をUnity で使用するためにC# に書き換えを行った</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
806 <li>書き換え方針としては、attribute やMessagePack などC# 独自の機能に対応しつつ元のソースコードと同一になるようにした</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
807 <li>実装としては、localDataGearManager を用いた同一プロセスで複数インスタンス立ち上げによる通信が可能</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
808 <li>Remote DataGearManager を使用した複数台の通信については書き換え途中であり、引き続き行っていく</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
809 <li>Christie の検証のためUnity で100人規模のFPS を作成する</li>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
810 </ul>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
811
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
812
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
813 </div>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
814
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
815
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
816 </div><!-- presentation -->
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
817 </body>
3f1a4ab62e2e add slide
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
818 </html>