We've Got Game! - Computer Science

advertisement
“We’ve Got Game!”
Teaching and Researching
Computer Games at WPI
Mark Claypool
Assistant Professor
Computer Science Department
Worcester Polytechnic Institute
Worcester, MA, USA
http://www.cs.wpi.edu/~claypool
Outline
• Interactive Media and Game Development
• Aspects of Networking
• Latency and Warcraft III
Gamestock, WPI, Worcester, MA, USA
2
January 2004
A Proposal for a New Major
Interactive Media and Game
Development
David Finkel, Computer Science
Frederick Bianchi, Humanities and Arts
Mark Claypool, Computer Science
Michael Gennert, Computer Science
Patrick Quinn, Humanities and Arts
Opportunity
•
Games are growing
– In 2000, U.S. economy grew by 7% while computer
game industry grew by 15%
(International Digital Software Association, 2001)
– 60% of Americans age 6+ play computer games
(International Digital Software Association, 2001)
• 221+ million computer games sold in 2002
• 2 games for every household in America
•
Exact labor statistics are difficult to obtain
•
Not many 4-year technical degree programs
– But indicators are that game companies are hiring
– Recent ad by Electronic Arts say “triple digits”
Gamestock, WPI, Worcester, MA, USA
4
January 2004
Related Programs
• Over 60 different academic programs
(Game Developer’s Magazine, Game Career Guide 2003)
– Many at art schools (no technical component)
– Many certificate or 2-year programs
• CMU offers MA in Entertainment Technology
• SMU offers 18-month certificate (Guildhall)
• USC announced minor in game development
• Few full undergraduate majors at 4-year
universities
Gamestock, WPI, Worcester, MA, USA
5
January 2004
A Proposal for a New Major
• A Proposal
• Offered with many existing courses
– Some new, core courses
• Offered with many existing resources
– Some new dedicated faculty
– Some new gaming labs
• Benefits of
– Attracting new students
– Solidifying education of game developers
– Future extension to minor and graduate
programs
Gamestock, WPI, Worcester, MA, USA
6
January 2004
The Undergraduate Major
•
•
•
•
Based on:
– IGDA Curriculum Framework (Feb 2003)
– Examination of other programs
– Consultation with GDC, other academics,
administration, marketing …
Core courses with fundamental ideas for game
development
Two tracks:
– Technical
– Artistic
Emphasize well-rounded B.S. with game
development strength
Gamestock, WPI, Worcester, MA, USA
7
January 2004
Core Courses
•
Critical Game Studies
•
Game Development Process
•
Social Issues in Game Development
– Non-technical study of use, history, and industry of
games. Develop vocabulary, analyze merits and tools
and why some games are successful.
– Discuss roles of participants, artistic and technical.
Importance of testing and play testing. Students
will develop games or parts of games.
– Human need for play, philosophy of games, social
interactions in multiplayer games, role of violence
and ethical and legal issues for games
Gamestock, WPI, Worcester, MA, USA
8
January 2004
Technical Track
• 3 core courses
• 5 math (Lin Alg, Prob and Stats)
• 3 science (Physics and Bio)
• 11 computer science (HCI, Soft Eng, Arch,
•
•
•
Networks, Graphics, Animation, AI)
2 advanced technical
3 humanities (Writing, Studio Art)
Sufficiency, IQP, MQP
Gamestock, WPI, Worcester, MA, USA
9
January 2004
Artistic Track
• 3 core courses
• 2 science (Physics and Bio)
• 1 math
• 3 writing
• 3 studio art
• 2 computer art
• 2 drama or music
• Sufficiency, IQP, MQP
Gamestock, WPI, Worcester, MA, USA
10
January 2004
Advanced Courses
• Two Technical
– Programming of games, 2d and 3d game
engines, sound and music implementations,
networking, latency compensation…
• Artistic
– Visual arts, music, sound and writing for
game play, aspects of interactivity…
Gamestock, WPI, Worcester, MA, USA
11
January 2004
Resources Required
• Directors for technical an artistic tracks
– Could be appointed from WPI faculty
• Three (new) dedicated faculty
– 2 in Humanities
– 1 in Computer Science
• Game development environment
– Software (develop some in-house)
– Equipment (general and special purpose)
– Space
Gamestock, WPI, Worcester, MA, USA
12
January 2004
•
•
•
•
•
•
When Might This All Happen?
Spring 2004
– Approval by administration and faculty
If successful … Summer 2004
– Prepare core courses
Academic year 2004-2005
– Core course offerings (experimental)
– Marketing
– Development of game laboratory
Summer 2005
– Advance course preparation
Academic year 2005-2006
– All new courses in place
– New major in place
– New tenure-track faculty hired
Academic year 2007+
– Minor, grad program, additional faculty …
Gamestock, WPI, Worcester, MA, USA
13
January 2004
Outline
• Interactive Media and Game Development
• Aspects of Networking
– Network Resource Limitations
– Compensation Techniques
– Security and Cheating
• Latency and Warcraft III
Gamestock, WPI, Worcester, MA, USA
14
January 2004
Network Resource Limitations
• Distributed simulations face three
resource limitations
– Network bandwidth
– Network latency
– Host processing power (to handle network)
• Physical restrictions that the system
cannot overcome
– Must be considered in the design of the
application
(More on each, next)
Gamestock, WPI, Worcester, MA, USA
15
January 2004
Capacity
• Data sent/received per time
• LAN – 10 Mbps to 10 Gbps
– Limited size and scope
• WANs – tens of kbps from modems, to 1.5
Mbps (T1, broadband), to 55 Mbps (T3)
– Potentially enormous, Global in scope
• Number of users, size and frequency of
•
messages determines capacity
As does transmission technique
– Multicast, Unicast, Broadcast
Gamestock, WPI, Worcester, MA, USA
16
January 2004
Latency
•
Delay when message sent until received
•
Cannot be totally eliminated
•
Application tolerances:
•
MCG latencies tolerance depends upon game
– Variation (jitter) also matters
– Speed of light propagation yields 25-30 ms across
Atlantic
– With routing and queuing, usually 80 ms
– File download – minutes
– Web page download – up to 10 seconds
– Interactive audio – 100s of ms
– First-Person Shooters – 100s of ms
– Real-Time Strategy – up to 1 second
– Other games
Gamestock, WPI, Worcester, MA, USA
17
January 2004
Computational Power
• Processing to send/receive packets
• Most devices powerful enough for raw
sending
– Can saturate LAN
• Rather, application must process state in
•
each packet
Especially critical on resource-constrained
devices
– i.e.- hand-held console, cell phone, PDA,
Gamestock, WPI, Worcester, MA, USA
18
January 2004
Outline
• Interactive Media and Game Development
• Aspects of Networking
– Network Resource Limitations
– Compensation Techniques
– Security and Cheating
• Latency and Warcraft III
Gamestock, WPI, Worcester, MA, USA
19
January 2004
Data and Control Architectures
• Want consistency
– Same state on each node
– Needs tightly coupled, low latency, small
nodes
• Want responsiveness
– More computation locally to reduce network
– Loosely coupled
• In general, cannot do both.
Gamestock, WPI, Worcester, MA, USA
20
Tradeoffs.
January 2004
Networked Multiplayer Game
Architectures
•
Centralized
•
Distributed and Replicated
– Use only two-way relay (no short-circuit)
– One node holds data so view is consistent at all
times
– Lacks responsiveness
– Allow short-circuit relay
– Replicated has copies, used when predictable (ienon-player characters)
– Distributed has local node only, used when
unpredictable (ie- players)
– May be inconsistent
Gamestock, WPI, Worcester, MA, USA
21
January 2004
Interest Management – Auras
• Nodes express area of interest to them
– Do not get messages for outside areas
- Only circle sent even if
world is larger.
- Can implement with
square to make simpler
Gamestock, WPI, Worcester, MA, USA
22
January 2004
Interest Management- Focus and
Nimbus
-nimbus must intersect with focus to receive
-Example: Hider has smaller nimbus, so Seeker
cannot see, while Hider can see Seeker since
Seeker’s nimbus intersects Hider’s focus
Gamestock, WPI, Worcester, MA, USA
23
January 2004
•
•
Dead Reckoning
Based on ocean navigation techniques
Predict position based on last known position plus
direction
– Can also only send updates when deviates past a
threshold
(predicted position)
(“warp”)
(actual position)
•
When prediction differs, get “warping” or
“rubber-banding” effect
Gamestock, WPI, Worcester, MA, USA
24
January 2004
Security and Cheating
• Unique to games
– Other multi-person applications typically
don’t have same type of cheating problems
• Cheaters want:
– Vandalism – create havoc (relatively few)
– Dominance – gain advantage (more)
Gamestock, WPI, Worcester, MA, USA
25
January 2004
Packet and Traffic Tampering
• Reflex augmentation - enhance cheater’s
reactions
– Example: aiming proxy monitors opponents
movement packets, when cheater fires,
improve aim
• Packet interception – prevent some packets
from reaching cheater
– Example: suppress damage packets, so
cheater is invulnerable
• Packet replay – repeat event over for
added advantage
– Example: multiple bullets or rockets if
otherwise limited
Gamestock, WPI, Worcester, MA, USA
26
January 2004
Preventing Packet Tampering
• Cheaters figure out by changing bytes and
observing effects
– Prevent by MD5 checksums (fast, public)
• Still cheaters can:
– Reverse engineer checksums
– Attack with packet replay
• So:
– Encrypt packets
– Add sequence numbers (or encoded sequence
numbers) to prevent replay
Gamestock, WPI, Worcester, MA, USA
27
January 2004
•
•
•
Information Exposure
Allows cheater to gain access to replicated, hidden
game data (i.e. status of other players)
– Passive, since does not alter traffic
– Example: defeat “fog of war” in RTS, see through
walls in FPS
Cannot be defeated by network alone
Instead:
– Sensitive data should be encoded
– Kept in hard-to-detect memory location
– Centralized server may detect cheating (example:
attack enemy could not have seen)
• Harder in replicated system, but can still share
Gamestock, WPI, Worcester, MA, USA
28
January 2004
Outline
• Interactive Media and Game Development
• Aspects of Networking
• Latency and Warcraft III
Gamestock, WPI, Worcester, MA, USA
29
January 2004
The Effects of Latency
on User Performance in
Warcraft III
Nathan Sheldon, Eric Gerard, Seth
Borg, Mark Claypool, Emmanuel Agu
ACM NetGames Workshop
Redwood City, CA, USA
May 2003
http://www.cs.wpi.edu/~claypool/papers/war3/
Why Study Warcraft III?
• Top selling computer game genres
–
–
–
–
Strategy (27.4%)
“Top Ten Industry Facts”, Interactive
Digital Software Association, May 2003.
Children’s (15.9%)
Shooter (11.5%)
Family Entertainment (9.6%)
• Warcraft III set sales record
– Fastest to sell 1 million copies
“Warcraft III - Shatters Sales Records Worldwide...”,
Blizzard Press Release, October 2002
Gamestock, WPI, Worcester, MA, USA
31
January 2004
Network Games and Latency
•
Latency degrades performance of interactive
applications
– Web-browsing – seconds
– Internet phone – 100’s of milliseconds
– First Person Shooters (FPS) – 100’s of milliseconds
•
• Real-Time Strategy (RTS)?
Knowing effects of latency useful for
– Building better network games
– Building better networks to support games (QoS)
 Effects of Latency on Warcraft III (RTS)
Gamestock, WPI, Worcester, MA, USA
32
January 2004
Outline
• Introduction

• Experiments

• Analysis
• Conclusions
Gamestock, WPI, Worcester, MA, USA
33
January 2004
Warcraft III Overview
RTS User Interaction
Components:
• Exploration
• Building
• Combat
Gamestock, WPI, Worcester, MA, USA
34
January 2004
Exploration Map
Performance?
• Time
(to reach end)
Gamestock, WPI, Worcester, MA, USA
35
January 2004
Building Map
Performance?
• Time
(to build technology tree)
Gamestock, WPI, Worcester, MA, USA
36
January 2004
Combat Map
Performance?
• Games Won
• Unit Scores
Gamestock, WPI, Worcester, MA, USA
37
January 2004
Controlling Latency
• Warcraft III uses client-server
– Set computer B as server (also a client)
– Set computer C or D as client
• NIST Net on computer A
– Induce latency [0 ms to 3500 ms]
Gamestock, WPI, Worcester, MA, USA
38
January 2004
Outline
• Introduction

• Experiments

• Analysis
– Application Level
– Network Level
– User Level

• Conclusions
Gamestock, WPI, Worcester, MA, USA
39
January 2004
Building and Latency
Build Time vs. Latency
9:36
Linear (Time To Build)
R2 = 0.0516
9:21
Build Time (m:s)
Time To Build
9:07
8:52
8:38
8:24
8:09
7:55
7:40
0
500
1000
1500
2000
2500
3000
3500
Latency (ms)
Gamestock, WPI, Worcester, MA, USA
40
January 2004
4000
Exploration and Latency
Time To Complete
Linear (Time To Complete)
Explore Time vs Latency
5:31
Explore Time (m:s)
2
R = 0.6334
5:16
5:02
4:48
4:33
4:19
4:04
3:50
0
200
400
600
800
1000
Latency (ms)
Gamestock, WPI, Worcester, MA, USA
41
January 2004
1200
Combat and Latency (1)
Unit Score Difference
Unit Score Difference vs. Latency
3000
2000
1000
0
-1000
-2000
-3000
R2 = 0.0138
0
200
400
600
800
1000
1200
1400
Latency (ms)
Gamestock, WPI, Worcester, MA, USA
42
January 2004
1600
Combat and Latency (2)
Gamestock, WPI, Worcester, MA, USA
43
January 2004
Outline
• Introduction

• Experiments

• Analysis
– Application Level
– Network Level
– User Level


• Conclusions
Gamestock, WPI, Worcester, MA, USA
44
January 2004
Bandwidth
3.8 Kbps
4.0 Kbps
6.8 Kbps
Gamestock, WPI, Worcester, MA, USA
45
January 2004
Inter-Packet Times
Gamestock, WPI, Worcester, MA, USA
46
January 2004
Payload Distributions
Gamestock, WPI, Worcester, MA, USA
47
January 2004
Payload Distributions and Latency
Gamestock, WPI, Worcester, MA, USA
48
January 2004
Commands and Latency
• Pilot studies suggest 6 bytes of overhead
•
•
per command
Remove 6 bytes from each packet payload
Add up remaining command payloads
Gamestock, WPI, Worcester, MA, USA
49
January 2004
Outline
• Introduction

• Experiments

• Analysis
– Application Level
– Network Level
– User Level
• Conclusions
Gamestock, WPI, Worcester, MA, USA



50
January 2004
User-Level Analysis
• 0-500 ms latency, users could easily adjust
• 800+ ms, game appeared erratic
– Degradation in gaming experience
• 500-800 ms degradation depended upon
– User
• More skilled were more sensitive
– Strategy
• Micro managers were more sensitive
• Combat managers were more sensitive
Gamestock, WPI, Worcester, MA, USA
51
January 2004
•
•
Conclusions
Typical Internet latencies do not significantly
affect user performance in Warcraft III
– Some effect on exploration
– No statistical effect on building or combat
•
RTS game play emphasizes “strategy” (which takes
10s of seconds or minutes), not “real-time”
RTS games less sensitive to latency than are FPS
•
At the network level:
– RTS in QoS class similar to that of Web browsing
– Small packets with low bandwidth
– Command aggregation at higher latencies
Gamestock, WPI, Worcester, MA, USA
52
January 2004
Ongoing Work
• Effects of latency on user strategies
• Other RTS games (done!)
– Age of Mythology
– Command and Conquer: Generals
• Effects of latency on other genres
– First Person Shooter (UT 2003)
– Multiplayer Role Playing Game
• Effects of loss
Gamestock, WPI, Worcester, MA, USA
53
January 2004
“We’ve Got Game!”
Teaching and Researching
Computer Games at WPI
Mark Claypool
Assistant Professor
Computer Science Department
Worcester Polytechnic Institute
Worcester, MA, USA
http://www.cs.wpi.edu/~claypool
Download