-
Notifications
You must be signed in to change notification settings - Fork 48
/
506.srt
5376 lines (3940 loc) · 118 KB
/
506.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:00.506 --> 00:00:09.516 A:middle
[ Silence ]
00:00:10.016 --> 00:00:15.000 A:middle
[ Applause ]
00:00:15.866 --> 00:00:16.346 A:middle
>> Good morning.
00:00:17.016 --> 00:00:18.036 A:middle
I'm Nathan Taylor.
00:00:18.226 --> 00:00:21.186 A:middle
I manage the iOS Game Center
team and today, I want to talk
00:00:21.186 --> 00:00:23.676 A:middle
to you about Turn-Based
Gaming in Game Center.
00:00:24.926 --> 00:00:28.496 A:middle
So, here are the things
I'm going to cover today.
00:00:28.496 --> 00:00:29.966 A:middle
I'm going to talk
about turn-based gaming
00:00:29.966 --> 00:00:30.826 A:middle
for the most part of this talk.
00:00:30.826 --> 00:00:32.906 A:middle
I'm going to start with a
brief overview, you know,
00:00:33.036 --> 00:00:35.646 A:middle
what is turn-based gaming and
what other multiplayer types
00:00:35.826 --> 00:00:37.126 A:middle
of gaming does Game
Center provide?
00:00:38.186 --> 00:00:39.576 A:middle
Throughout the talk, I'm going
00:00:39.576 --> 00:00:41.466 A:middle
to cover some new features,
will be interspersed.
00:00:41.946 --> 00:00:44.016 A:middle
Let me give you a little load
on what they are in a bit.
00:00:45.026 --> 00:00:46.496 A:middle
Then I'm going to cover
the basic scenarios
00:00:46.496 --> 00:00:49.116 A:middle
of turn-based gaming and this
is sort of all the scenarios
00:00:49.456 --> 00:00:51.986 A:middle
that you need to cover to
make a good turn-based game.
00:00:52.986 --> 00:00:55.846 A:middle
And in doing this, you know, I'm
going to show a lot of code and,
00:00:55.846 --> 00:00:57.806 A:middle
you know, kind of go over some
of the decisions that you have
00:00:57.806 --> 00:00:59.436 A:middle
to make when you're handling
some of the events you get.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:00.406 --> 00:01:01.156 A:middle
And then I'm going to go
00:01:01.156 --> 00:01:03.376 A:middle
into advance scenarios
of turn-based gaming.
00:01:03.756 --> 00:01:06.226 A:middle
These are some of the things
that are difficult to do
00:01:06.456 --> 00:01:09.966 A:middle
with turn-based gaming today
and show you a solution
00:01:09.966 --> 00:01:14.566 A:middle
that we're offering in iOS
7 to help you solve this.
00:01:14.726 --> 00:01:18.346 A:middle
Game Center has three ways
to do multiplayer and play
00:01:18.346 --> 00:01:19.366 A:middle
with your friends, all right.
00:01:19.786 --> 00:01:22.746 A:middle
The first that we offered
is peer-to-peer multiplayer,
00:01:23.416 --> 00:01:25.006 A:middle
you know, and this
is, you know, device--
00:01:25.006 --> 00:01:27.246 A:middle
a device multiplayer
up to four players,
00:01:27.576 --> 00:01:29.426 A:middle
Game Center provides
auto-matching
00:01:29.426 --> 00:01:31.936 A:middle
and invitations and, you
know, we connect the devices
00:01:31.936 --> 00:01:34.126 A:middle
and provide the networking
layer and allow players
00:01:34.126 --> 00:01:35.256 A:middle
to play a synchronous game.
00:01:36.476 --> 00:01:37.736 A:middle
Similarly, we offer, you know,
00:01:37.736 --> 00:01:40.936 A:middle
through the same auto-matching
invitation mechanism a
00:01:40.936 --> 00:01:42.716 A:middle
server-hosted multiplayer.
00:01:42.836 --> 00:01:44.996 A:middle
And this is where you use
Game Center's auto-matching
00:01:44.996 --> 00:01:47.216 A:middle
and invitations you
bring your own server
00:01:47.216 --> 00:01:49.546 A:middle
into your own networking through
your server between the devices.
00:01:49.856 --> 00:01:51.626 A:middle
And this will allow
up to 16 players.
00:01:52.416 --> 00:01:54.146 A:middle
And the topic of
today's session,
00:01:54.306 --> 00:01:56.786 A:middle
turn-based multiplayers
relatively new compared
00:01:56.786 --> 00:01:58.026 A:middle
to this others in Game Center.
00:01:58.026 --> 00:02:00.436 A:middle
And we think it's going
to be ideal solution
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:58.026 --> 00:02:00.436 A:middle
And we think it's going
to be ideal solution
00:02:00.526 --> 00:02:04.076 A:middle
in multiplayer allows, you know,
up to 16 players to take turns
00:02:04.336 --> 00:02:05.836 A:middle
and passing the turn, you know,
00:02:06.356 --> 00:02:08.856 A:middle
device in a fully
asynchronous manner.
00:02:09.656 --> 00:02:12.006 A:middle
And this is sort of how
turn-based gaming works,
00:02:12.006 --> 00:02:14.476 A:middle
you know, so we sort of have
this table and people see it
00:02:14.476 --> 00:02:17.036 A:middle
around the table and its kind
of like a board game, right?
00:02:17.386 --> 00:02:19.106 A:middle
Everybody's going to take their
turn and the turn will move
00:02:19.106 --> 00:02:19.966 A:middle
on to the next person.
00:02:20.376 --> 00:02:23.586 A:middle
So, you'll take your turn,
indicate to Game Center
00:02:23.586 --> 00:02:27.486 A:middle
to pass it turn to Sue, Sue will
take her turn, pass it to Bob,
00:02:28.146 --> 00:02:30.306 A:middle
and then we've got an empty
seat here and this is kind
00:02:30.306 --> 00:02:31.976 A:middle
of represents the seat that
we're going to auto-match
00:02:31.976 --> 00:02:33.706 A:middle
and fill with somebody else
who wants to play with us.
00:02:34.186 --> 00:02:37.036 A:middle
So, when the turn passes to the
empty seat we will auto-match
00:02:37.036 --> 00:02:39.816 A:middle
in a new player Meg here,
Meg will take her turn.
00:02:40.396 --> 00:02:43.296 A:middle
And then, the other thing
about turn-based gaming is
00:02:43.296 --> 00:02:45.546 A:middle
that the turn sequence is
entirely determined by you.
00:02:45.546 --> 00:02:47.386 A:middle
It's not purely sequential.
00:02:47.786 --> 00:02:49.516 A:middle
So, you can send the
turn to whoever you need
00:02:49.516 --> 00:02:50.596 A:middle
to base on your game rules.
00:02:50.966 --> 00:02:53.616 A:middle
So, here, you know, Meg
will then turn to Sam, Sam--
00:02:53.616 --> 00:02:55.456 A:middle
sorry, let me start that over.
00:02:55.456 --> 00:02:57.856 A:middle
Sam will send it back to Meg,
00:02:57.856 --> 00:03:00.966 A:middle
and then Meg can
send it back to you.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:02:57.856 --> 00:03:00.966 A:middle
and then Meg can
send it back to you.
00:03:02.176 --> 00:03:05.226 A:middle
And this will proceed however
your game [inaudible] needs
00:03:05.226 --> 00:03:05.576 A:middle
to go.
00:03:05.576 --> 00:03:09.086 A:middle
You can implement, you know,
skips, reverses, whatever type--
00:03:09.456 --> 00:03:10.416 A:middle
whatever your game needs.
00:03:10.416 --> 00:03:15.076 A:middle
So, Game Center turn-based
multiplayer provides all the
00:03:15.076 --> 00:03:16.596 A:middle
matchmaking in invitation
services.
00:03:16.596 --> 00:03:19.736 A:middle
Your users can invite their
friends to play or they can pick
00:03:19.736 --> 00:03:21.486 A:middle
up and play an auto-match game
00:03:21.486 --> 00:03:22.976 A:middle
with other players
around the world.
00:03:23.846 --> 00:03:25.926 A:middle
The important part to
remember is the matching
00:03:25.926 --> 00:03:27.536 A:middle
and invites are asynchronous.
00:03:27.806 --> 00:03:30.636 A:middle
You know, invites do not
go out until the turn moves
00:03:31.226 --> 00:03:33.326 A:middle
to the participant that had--
00:03:33.326 --> 00:03:34.446 A:middle
you know, that's
waiting to be invited,
00:03:34.776 --> 00:03:36.696 A:middle
and then when they get the
invitations immediately
00:03:36.696 --> 00:03:37.276 A:middle
their turn.
00:03:38.636 --> 00:03:41.286 A:middle
Game Center, also, provides all
the storage of the game save,
00:03:42.126 --> 00:03:44.266 A:middle
you know, we also do
the synchronization
00:03:44.266 --> 00:03:45.316 A:middle
and the updating of clients.
00:03:45.316 --> 00:03:46.536 A:middle
So, we use push notifications
00:03:46.536 --> 00:03:48.816 A:middle
when you pass the turn
to the next player.
00:03:49.406 --> 00:03:52.446 A:middle
They get notified on their
devices and then they can pull
00:03:52.446 --> 00:03:54.236 A:middle
down the game state and take
their turn and upload it.
00:03:55.126 --> 00:03:56.366 A:middle
The turn-based game scenario
00:03:57.266 --> 00:03:59.626 A:middle
in Game Center also
covers player status.
00:03:59.986 --> 00:04:01.756 A:middle
So, this is where you know,
if hey, this person is
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:59.986 --> 00:04:01.756 A:middle
So, this is where you know,
if hey, this person is
00:04:01.756 --> 00:04:04.736 A:middle
on auto-match, he's invited,
he's actively playing,
00:04:05.226 --> 00:04:07.776 A:middle
has quit the game, or
when the game is over.
00:04:10.026 --> 00:04:11.836 A:middle
With all this, you
know, we kind of feel
00:04:11.836 --> 00:04:14.686 A:middle
that turn-based game is
really the ideal solution
00:04:14.686 --> 00:04:17.136 A:middle
for multiplayer gaming
on a mobile platform.
00:04:17.315 --> 00:04:20.086 A:middle
Users can play whenever
they have spare time.
00:04:20.086 --> 00:04:22.516 A:middle
You know, we always have
our iPhones with us,
00:04:22.516 --> 00:04:23.636 A:middle
our devices in our pocket.
00:04:24.236 --> 00:04:27.116 A:middle
And, you know, we don't
actually have, you know,
00:04:27.116 --> 00:04:30.836 A:middle
10 minutes to sit together with
somebody and play and, you know,
00:04:31.346 --> 00:04:34.166 A:middle
be involved for a real time
game but we have a spare
00:04:34.166 --> 00:04:36.236 A:middle
of minute here, we're
online, we're on the bus
00:04:36.236 --> 00:04:38.806 A:middle
and we can take a couple of
turns then get on with our life.
00:04:40.216 --> 00:04:42.116 A:middle
So, here's a breakdown
00:04:42.116 --> 00:04:43.636 A:middle
of the capabilities
of turn-based gaming.
00:04:44.676 --> 00:04:47.196 A:middle
Users can have up to
30 simultaneous matches
00:04:47.326 --> 00:04:49.806 A:middle
for your game, so they can
be playing with, you know,
00:04:49.856 --> 00:04:52.736 A:middle
30 different games with
however many game friends
00:04:52.836 --> 00:04:53.656 A:middle
that your game allows.
00:04:55.466 --> 00:04:57.446 A:middle
There's up to 16
players per game.
00:04:59.446 --> 00:05:01.926 A:middle
Gameplay as well as invitations
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:04:59.446 --> 00:05:01.926 A:middle
Gameplay as well as invitations
00:05:01.926 --> 00:05:04.266 A:middle
in auto-matching is fully
asynchronous, right?
00:05:05.396 --> 00:05:08.846 A:middle
Player one is taking their turn,
the other players two, three,
00:05:08.846 --> 00:05:11.526 A:middle
four don't know anything
about it until it's completed.
00:05:12.936 --> 00:05:15.836 A:middle
The game data can be
up to 64 kilobytes.
00:05:15.836 --> 00:05:18.286 A:middle
You know, a little a while
ago we increased this
00:05:18.286 --> 00:05:19.426 A:middle
from the initial 4 kilobyte.
00:05:19.426 --> 00:05:21.076 A:middle
We offer 64 kilobytes
of storage.
00:05:22.716 --> 00:05:25.026 A:middle
Seats are filled as I
said through invitations
00:05:25.026 --> 00:05:27.196 A:middle
and auto-matching and
it's fully asynchronous.
00:05:29.116 --> 00:05:31.306 A:middle
The turn order is
entirely up to you.
00:05:32.126 --> 00:05:35.056 A:middle
Game Center doesn't take
any part in the turn order.
00:05:35.056 --> 00:05:37.786 A:middle
You specify who the turn
goes to and you can tell us
00:05:37.786 --> 00:05:39.716 A:middle
who it should we go to next
if that person is unavailable.
00:05:42.096 --> 00:05:44.846 A:middle
And to that effect we
have this fallback list
00:05:44.846 --> 00:05:46.276 A:middle
so you can specify
a complete list;
00:05:46.276 --> 00:05:48.896 A:middle
it could be all the players in
the game of who we should go
00:05:48.896 --> 00:05:52.446 A:middle
to in case the next person is
not available and the person
00:05:52.446 --> 00:05:53.436 A:middle
after that's not available.
00:05:53.846 --> 00:05:56.236 A:middle
So, it provides a recovery
mechanism for games
00:05:56.586 --> 00:05:59.016 A:middle
or people are away or
forget about their game.
00:05:59.016 --> 00:06:03.156 A:middle
And finally, we give time outs.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:05:59.016 --> 00:06:03.156 A:middle
And finally, we give time outs.
00:06:03.226 --> 00:06:06.196 A:middle
You can specify a time
out but the default time
00:06:06.196 --> 00:06:07.916 A:middle
of the game center
uses these two weeks.
00:06:10.726 --> 00:06:13.086 A:middle
So, let's take a look
at what actually happens
00:06:13.416 --> 00:06:14.096 A:middle
with the game data.
00:06:14.536 --> 00:06:16.836 A:middle
The way game center
does synchronization
00:06:16.836 --> 00:06:17.816 A:middle
of term based game data is
00:06:17.816 --> 00:06:20.446 A:middle
that the person whose turn
it is is the only person
00:06:20.446 --> 00:06:21.486 A:middle
who can write the game data.
00:06:22.076 --> 00:06:24.746 A:middle
All other players can, you
know, download from the server,
00:06:24.976 --> 00:06:27.276 A:middle
read from it and view the
game state but only the person
00:06:27.276 --> 00:06:29.956 A:middle
who knows the term can write
new data to the servers.
00:06:30.496 --> 00:06:32.276 A:middle
So, you have to turn
here and you're going
00:06:32.276 --> 00:06:34.486 A:middle
to write the data send it up
to the Game Center servers
00:06:34.866 --> 00:06:35.906 A:middle
and pass to turn to Sue.
00:06:36.576 --> 00:06:37.756 A:middle
Sue gets notified.
00:06:38.216 --> 00:06:40.256 A:middle
We badge your application
on Sue's devices,
00:06:40.646 --> 00:06:43.096 A:middle
and then when Sue decides to
launch a game and play it,
00:06:43.096 --> 00:06:46.766 A:middle
he will pull down the game data
and then Sue can take her turn,
00:06:47.976 --> 00:06:50.746 A:middle
move it, pass the turn to
Bob and Bob gets notified.
00:06:51.746 --> 00:06:53.206 A:middle
But Bob is on vacation
and can't play.
00:06:54.006 --> 00:06:55.626 A:middle
So, your time out
comes into effect.
00:06:56.226 --> 00:06:58.366 A:middle
You fallbacks fall
and also take place
00:06:59.216 --> 00:07:02.366 A:middle
and we automatically will
notify Meg who can then pull
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:06:59.216 --> 00:07:02.366 A:middle
and we automatically will
notify Meg who can then pull
00:07:02.366 --> 00:07:04.096 A:middle
down the turn data
and take her turn.
00:07:04.256 --> 00:07:05.356 A:middle
And then, it's up to you.
00:07:05.566 --> 00:07:06.736 A:middle
Do you want to let Meg choose?
00:07:06.736 --> 00:07:09.726 A:middle
Do you want to give Bob another
chance to take his turn later?
00:07:10.356 --> 00:07:12.006 A:middle
Or, do you drop Bob
from the match?
00:07:12.566 --> 00:07:14.166 A:middle
It's up to you and your users
00:07:14.166 --> 00:07:15.726 A:middle
on how your game should
proceed in the state.
00:07:17.826 --> 00:07:22.126 A:middle
So, let's take a quick look at
what the match data is, right?
00:07:22.296 --> 00:07:23.986 A:middle
This is basically
an NSData object.
00:07:24.066 --> 00:07:25.796 A:middle
It's completely opaque
to Game Center.
00:07:25.866 --> 00:07:27.036 A:middle
We don't write anything to it.
00:07:27.096 --> 00:07:27.896 A:middle
We don't read it.
00:07:28.326 --> 00:07:31.596 A:middle
It's just a blob that we pass
it to servers, store for you
00:07:31.796 --> 00:07:33.996 A:middle
and it will let you
download onto--
00:07:33.996 --> 00:07:35.436 A:middle
into the game so you
can show your data.
00:07:36.216 --> 00:07:38.386 A:middle
You completely define
the contents.
00:07:38.386 --> 00:07:40.416 A:middle
Only the current player
can upload new data.
00:07:40.416 --> 00:07:43.576 A:middle
And they can upload new data
with an intermediate upload
00:07:43.576 --> 00:07:45.906 A:middle
and they upload new data
when they finish their turn
00:07:45.906 --> 00:07:47.746 A:middle
and at the end of the game,
you upload the final state.
00:07:48.966 --> 00:07:51.346 A:middle
All other players can read
this data at any time.
00:07:51.436 --> 00:07:53.696 A:middle
The can pull down,
view the current state.
00:07:53.736 --> 00:07:56.276 A:middle
So, if there's stuff you want
them ask in there about turn,
00:07:56.276 --> 00:07:58.936 A:middle
well, you know, sets some flags
in the data so they can see,
00:07:59.236 --> 00:08:01.026 A:middle
hey, you know, this
guy is taking his turn.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:07:59.236 --> 00:08:01.026 A:middle
hey, you know, this
guy is taking his turn.
00:08:01.026 --> 00:08:02.236 A:middle
I don't want to show you
what he's done, you know,
00:08:02.236 --> 00:08:05.426 A:middle
fog of war type of stuff.
00:08:05.426 --> 00:08:08.696 A:middle
Remember that it's
limited size, 64 kilobytes.
00:08:08.696 --> 00:08:10.716 A:middle
It's not a whole lot, you know.
00:08:11.516 --> 00:08:15.966 A:middle
But you can do a quite a bit
with it as long as you are smart
00:08:15.966 --> 00:08:17.376 A:middle
and you use and, you know,
00:08:17.376 --> 00:08:18.916 A:middle
efficient data packing
strategies.
00:08:19.806 --> 00:08:21.686 A:middle
You know, small games
might be able to get away
00:08:21.686 --> 00:08:23.996 A:middle
with encoding a P-list
or, you know,
00:08:23.996 --> 00:08:26.656 A:middle
serializing our objects
directly into this.
00:08:27.026 --> 00:08:30.476 A:middle
But if you got a more complex
game, you going to want to think
00:08:30.476 --> 00:08:33.746 A:middle
about this, you know, turn your
games into some [inaudible],
00:08:33.885 --> 00:08:36.696 A:middle
use some bit fields, do what you
need to to pack data tightly.
00:08:37.296 --> 00:08:40.395 A:middle
If you need more,
you can always point
00:08:40.816 --> 00:08:43.336 A:middle
to data stored on
your own servers.
00:08:43.936 --> 00:08:46.946 A:middle
And to do this you can either
store reference inside the match
00:08:46.946 --> 00:08:49.916 A:middle
data, or you can
just use the match--
00:08:50.116 --> 00:08:51.996 A:middle
session ID to reference it.
00:08:54.786 --> 00:08:56.616 A:middle
So, users have some
interesting expectations
00:08:56.616 --> 00:08:58.116 A:middle
of turn-based games, right?
00:08:58.676 --> 00:08:59.556 A:middle
It's a little bit different
00:08:59.556 --> 00:09:01.196 A:middle
when they're playing
peer-to-peer game,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:08:59.556 --> 00:09:01.196 A:middle
when they're playing
peer-to-peer game,
00:09:01.196 --> 00:09:03.286 A:middle
you're playing one game
and that's all there is.
00:09:04.126 --> 00:09:05.076 A:middle
You know, you can't
really do anything else.
00:09:05.076 --> 00:09:07.126 A:middle
But with turn-based games
it's always asynchronous,
00:09:07.126 --> 00:09:08.326 A:middle
they can come and
go as they want.
00:09:09.596 --> 00:09:11.076 A:middle
So, to get this, they
expect to be able
00:09:11.076 --> 00:09:12.566 A:middle
to have multiple
simultaneous matches.
00:09:12.566 --> 00:09:16.786 A:middle
So, your game needs to be
able to handle the scenario.
00:09:17.016 --> 00:09:18.386 A:middle
You now, you don't want to be
in this case with the user,
00:09:18.386 --> 00:09:20.686 A:middle
you can just have one match
but somehow get a second
00:09:20.686 --> 00:09:23.096 A:middle
and there's no way to
manage it in your game,
00:09:23.096 --> 00:09:24.706 A:middle
that's a problem, right?
00:09:24.706 --> 00:09:26.076 A:middle
How do they find the match
00:09:26.076 --> 00:09:27.236 A:middle
with the other friend
if they're playing?
00:09:28.206 --> 00:09:31.476 A:middle
Each game has its own
state, its own players,
00:09:31.636 --> 00:09:33.536 A:middle
and in the end, its own outcome.
00:09:34.066 --> 00:09:36.616 A:middle
And some users like to keep
the match around and be able
00:09:36.616 --> 00:09:38.366 A:middle
to show it to their
friends when they've won.
00:09:38.586 --> 00:09:40.776 A:middle
You know, when they got all the
work, all the titles filled,
00:09:41.346 --> 00:09:42.566 A:middle
they can show off
to their friends.
00:09:44.716 --> 00:09:45.996 A:middle
One player at a time, right?
00:09:46.426 --> 00:09:47.306 A:middle
It's turn-based.
00:09:47.526 --> 00:09:48.966 A:middle
There's only one
person taking the turn
00:09:49.756 --> 00:09:51.536 A:middle
and they're the only person
who can upload the game state.
00:09:51.976 --> 00:09:54.496 A:middle
Other players are observers
until it becomes their turn.
00:09:54.816 --> 00:09:58.966 A:middle
And the other thing in
your mind is your game
00:09:58.966 --> 00:09:59.976 A:middle
on the other device
is not running, right?
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:10:01.066 --> 00:10:02.716 A:middle
These things are handled
through notifications
00:10:02.716 --> 00:10:03.906 A:middle
that game center handles.
00:10:04.336 --> 00:10:07.316 A:middle
We will tell you-- your game
will launch when we needed to
00:10:07.466 --> 00:10:09.816 A:middle
and the user going to take,
you know, choose a match,
00:10:10.346 --> 00:10:15.906 A:middle
take their turn, exit, go back
to, you know, doing work and,
00:10:16.076 --> 00:10:17.986 A:middle
you know, whenever they get
a notification they'll take
00:10:17.986 --> 00:10:18.576 A:middle
another turn.
00:10:19.826 --> 00:10:21.576 A:middle
And the tricky part with
turn-based gaming is
00:10:21.576 --> 00:10:24.006 A:middle
because it is asynchronous.
00:10:24.006 --> 00:10:27.136 A:middle
You can get notified about
any of these other 30 matches
00:10:27.136 --> 00:10:29.886 A:middle
that the user might have in
their game at any time, right?
00:10:30.126 --> 00:10:31.316 A:middle
User's playing one match
00:10:31.936 --> 00:10:33.916 A:middle
and gets a new turn
in another match.
00:10:34.836 --> 00:10:36.996 A:middle
Sometimes the right
answer here is take them
00:10:36.996 --> 00:10:37.866 A:middle
to that other match.
00:10:38.026 --> 00:10:39.886 A:middle