Microsoft PowerPoint - 01_Intro_ by fjzhangweiqun

VIEWS: 9 PAGES: 40

									Tomb Raider 3 (Eidos Interactive)     The Legend of Zelda (Nintendo)   Final Fantasy VIII (SquareSoft)




     15-466 : Game Programming
                                    Spring 2007
                                     (Lecture 1)


                          James Kuffner
                    Carnegie Mellon University
                                                    Today’s Overview
                    Course Administration
                    History of Computer Games
                       – Input Devices and User Interfaces
                       – Commercial Game Systems

                    Software Tools and Technology
                       – Modeling, Simulation, Graphics,
                       – Programming and Common APIs

                    Games and Society
                    The Future of Games

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                              Course Topics
                      C++ Based
                      Modeling and Animation
                      Geometry Management
                      Character Kinematics and Animation
                      Texturing and Shaders
                      Physically-based modeling
                      AI and Pathfinding
                      Networked Games
                      User Interface Issues
                      Collision Detection


15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                               Course Prerequisites
                      Fluency in C++ programming
                      Comfortable with 3D vectors, matrices, and linear
                      algebra

               Official prerequisites:
                 15-462 Intro to Computer Graphics
                … which in turn requires
                 15-213 Intro to Computer Systems
                 21-241 Matrix Algebra
                 21-259 Calculus in 3D

               WARNING: This is a very programming intensive course!
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                       Course Vital Info

                      Tuesdays and Thursdays
                      3:00PM to 4:20PM
                      Wean 5302

                      Class E-mail list:
                      gamedev-spr-07@lists.andrew.cmu.edu

                      used for announcements and discussion.

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                     Course Website and Lab
               http://gamedev.cs.cmu.edu/spring2007/
                 - syllabus and schedule
                 - assignments, handouts

                         Programming assignments will utilize subversion
                           for source code revision control, backups, and
                           hand-in process
                         (http://subversion.tigris.org/)

                         Lab: Wean 5336 (need card acess)

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                          Instruction Staff
                      James Kuffner (NSH 4288A)
                         kuffner@cs.cmu.edu
                         http://www.kuffner.org/james
                         Office hours:
                           - Thursdays (right after class) 4:30 – 5:30
                           - by appointment
                      Stefan Zickler
                         slickler@cs.cmu.edu
                         – Office hours:   3:30 - 4:30 MW
                               Cluster (WeH 5336)
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                                              Grading
                      45% Programming Assignments (3)
                      10% Midterm
                      40% Final Project
                      5% Class Participation

               Late Policy: You have 3 free late days you may use as
                 needed. After that, penalties are incurred.

                      However, your final project cannot be turned in late.


15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                Why Study Video Games?
                   Game software has always been at the
                   forefront of technology, pushing the
                   envelope of algorithms and
                   computational resources
                   Generations of young programmers
                   have been inspired by the challenge of
                   creating new types of games and other
                   interactive media
                   Video games have significantly
                   increased the wide public acceptance
                   of computers due to their unique
                   combination of technology, art, and
                   entertainment
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                       Early Origins of Video Games
        1958                     “Tennis for Two”
                                 (William Hoginbotham, Brookhaven National Lab)
                                 Oscilliscope-based two-player game with
                                 primitive “controller”




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                       Early Origins of Video Games
     1961 Spacewar (Steve Russell, MIT “Tech Model Railroad Club”)
          First fully-interactive video game
          First special-purpose game “joysticks” added later

                                                                                            DEC PDP-1




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                              Commercial Arcade Games
        1971                     Computer Space (Nolan Bushnell, Nutting Associates)
                                 First commercial coin-operated arcade videogame
                                 1500 units built, but it did not sell well




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                              Commercial Arcade Games
     1972 PONG (Nolan Bushnell, Atari)
          First commerically-successful arcade videogame
          Entirely solidstate (no ROMs or microprocessors)
          8,500 machines sold at $1200 each




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                            Home Video Game Systems
     1972 Odyssey (Ralph Baer, Magnavox)
          First commercial home video game system
          Uses only 40 transistors and 40 diodes!
          100,000 sold the first year at $100 each




                                                                                            Odyssey controllers

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                             Notable Early Video Games
     1974 TANK ( Kee Games / Atari, Inc. )
          First arcade videogame to use ROMs




                                           1975 Gunfight (Taito / Midway)
                                                First arcade game using a microprocessor
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                         Other Notable Arcade Games
               1977 Space Wars (Cinematronics)
                    First arcade game to use
                    vector display technology                                               1977 SPACE WARS

                    ( later used in Atari’s wildly
                     successful “Asteroids”)

                                                                                            1980 ASTEROIDS


                                                1983 Dragon’s Lair (Starcom / Cinematronics)
                                                     First arcade game to utilize laser-disc
                                                     technology
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                         Other Notable Arcade Games

     1984 I, Robot / “Ice Castles” (Atari, Inc. )
          First game to use 3D polgon
          rendering technology



                                                                  1992 Virtua Racing (Sega)
                                                                       First multi-player driving game
                                                                       using force-feedback steering,
                                                                       realistic graphics and “physics”
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
          The Evolution of Home Game Systems
           1972 Magnavox Odyssey                                                        40 transitors, 40 diodes
           1977 Atari VCS (2600)                                                        1.19 MHz Motorola 6507
                                                                                        256 bytes of VRAM
           1982 Coleco Colecovision                                                     3.58 MHz. 8-bit Z-80A
                                                                                        49Kb RAM
           1985 Nintendo Entertainment                                                  8-bit Motorola 6502
                System (NES)                                                            52 color custom graphics chip
           1989 Sega Genesis                                                            8 MHz Motorola 16-bit 68000
           1991 Super Nintendo (SNES)                                                   3.58 MHz 16-bit 68586 CPU + 16b video
                                                                                        128Kb RAM + 64Kb VRAM
           1995 Sony Playstation                                                        33 MHz 32-bit custom graphics
           1996 Nintendo 64                                                             94 MHz 64-bit Mips CPU
           2000 Playstation PS2                                                         295 MHz 128-bit “Emotion Engine”
           2001 Microsoft X-box                                                         733 MHz 128-bit Intel CPU, nForce GPU
           2001 Nintendo Gamecube                                                       485 MHz 128-bit PowerPC RISC
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                Current Console Wars
           2006 Microsoft X-box 360                                                     Triple core processors (3.2 GHz each)
                                                                                        512 MB RAM, 20/60GB hard disk
                                                                                        custom ATI graphics card (500M tri/sec)
                                                                                        16x9 720p/1080i cinematic display
                                                                                        HDDVD playback, surround sound

           2006 Sony Playstation 3 (PS3) 3.2 GHz Cell processor (6 SPE units)
                                         256 MB RAM, 20/60GB hard disk
                                         custom nVIDIA G70 graphics card
                                         16x9 720p/1080p cinematic display
                                         Blu-RayDVD playback, surround sound

           2006 Nintendo Wii                                                            729 MHz PowerPC “Broadway” processor
                                                                                        88 MB RAM, 3MB GPU texture RAM
                                                                                        custom ATI “Hollywood” GPU
                                                                                        novel Wii Remote and nunchuk unit
                                                                                        DVD playback available in 2007

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                      Now on sale at Walmart




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                Game Programming
                       The “Game Loop” (Main Event Loop) :

                Initialization                                                         Player Input



                                                                                      Update Game
                                                                                                      End Game
                                                                                        Internals



                                                                                    Update Display




                                        ( This is the guts of every game )
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                    How Fast Does my Game Loop
                           Need to Run?
               ANSWER: “It depends…”
                Visual displays typically need at least 15 Hz for
                interactivity (25-30 Hz is better)
                Head-tracking for HMDs is OK at 60 Hz, but even
                only 2-5ms of latency yields display lag, which often
                quickly causes users to lose their lunch…
                Haptic displays usually require much higher update
                rates (500 - 1000 Hz)
                Multitasking / Multiprocessing allows for different
                update rates for different types of output displays
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                           2D “Blitting” (Bitmap copy)
                      Until 3D polygon engines became popular,
                      it was at the core of all sprite-based games
                      Common tricks to increase blitting speed:
                         – Don’t use nested loops – save the inner
                           conditional and just copy rows at a time
                         – Use near pointers to address bitmaps (unless
                           your bitmaps are > 64K)
                         – Use a sprite compiler
                         – Use global variables instead of parameters for
                           screen base address, image width, height, etc.
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                      DOOM-style Rendering
                      Uses 2½D software rendering and clever
                      texture mapping to enable interactive 3D
                      without any special graphics hardware.
                      Started a revolution in PC-based 3D games
                      (FPS = “First Person Shooter” genre)




                                                                                            DOOM Id Software 1993
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                   DOOM Rendering Tricks
                      All walls are vertical and the view camera cannot tilt
                      Texture-mapping is done along lines of constant
                      depth (linear stepwidths in the textures)
                      (vertical scanlines for the walls & horizontal scanlines for the
                      floor and ceiling)
                      Shading of textures is done via palette table lookup
                      (the table used for an entire line is calculated from the depth
                      and current light level)
                      Superimposed 2D sprites for
                      enemies and objects using
                      animated, transparent textures

                                                                                            DOOM Id Software 1993
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                           3D Graphics Software Tools
                      High-level 3D graphics APIs provide
                      hardware-independent, transparent access to
                      3D acceleration
                 Commonly-Used 3D Graphics APIs:
                    – OpenGL / GLUT
                    – Direct3D
                       (part of Microsoft’s DirectX,
                       which also includes DirectDraw,
                       DirectSound, DirectInput, and
                       DirectPlay)
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                        Graphics are important, but…

              Don’t underestimate the
              power of a good storyline
              (e.g. Zork series)

                                                                                            ZORK I Infocom 1980



              Sometimes very simple game
              concepts can be extremely
              successful (e.g. Tetris)

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                  Video Games and Society
                      Are video games a waste of time?
                      Do games build connections
                      between people or further isolate
                      people?
                      Violence in games – does this have
                      a negative influence on the minds
                      of young kids?
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                          Early Impact on Society
                           In 1978, Taito released their
                           first arcade game “Space
                           Invaders” causing:
                                                        Near riots across Japan
                                                        A nation-wide coin
                                                       shortage, forcing the
                                                       government to quadruple
                                                       production of yen.
                                                      ( this happens again in 1980
                                                      with the release of PACMAN)
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                    Isolation vs. Community
               Most games are played by a
               solitary person

               Internet-based multi-player
               games have the potential to
               draw people together.
            (But is this true of the popular violent
             network games like “Quake3 Arena”?)

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                        Today’s “Digital Media Culture”
                      2006 – 72% of all US households connected to
                      the Internet
                      (210 million users)

                      Teen usage even higher (90%+)

                      2006 - 68% of Americans play video games
                      (approx. 200 million people)
                      - average U.S. gamer is 33 years old
                      - 31% below the age of 18
                                                                                   SOURCE : Entertainment Software Assoc. (ESA) Report (5/2006)


15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                  Violence in Video Games
                 1976 Death Race 2000 (Exidy)
                 First video game withdrawn due to protest
                          over its violent theme




           ( Seems harmless compared with recent game genres
                    such as Mortal Combat or GTA3 )
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                       Prevalence of Violent Content
                    Sample study of the 70 most popular game titles in 2000




                                                                                            SOURCE: Children Now “Fair Play” Report
       However, be sure to note any potential
       biases in information gathered online                                                       What is the definition of violence?
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                          A Worldwide Problem
             2000 - Canada bans “Soldier of Fortune”
                    from being sold to minors
                                                      “Authorities in British Columbia have
                                                      classified a computer game that graphically
                                                      depicts severed heads and humans burned
                                                      alive as an adult movie, making it illegal to sell
                                                      or rent it to anyone under 18” (ABC News)



                                                  2002 - GTA3 banned or censored in many
                                                         countries, including Japan


15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                      Grand Theft Auto 3




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                      Grand Theft Auto 3




15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                       ESRB System
           (Entertainment Software Rating Board)
                      Classifies games into five age-based
                      categories:

                         EC=                           Early Childhood (3+)
                         E =                           Everyone (6+)
                         T =                           Teen (13+)
                         M=                            Mature (18+)
                         AO=                           Adults Only (18+)


15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                       Problems with the current system
                      ESRB rating does not indicate the type of
                      content triggered its rating (e.g. violence,
                      sex, profanity)
                      Parents are unaware of the ESRB system
                      No penalties for selling mature content
                      games to children
                      Kids download games from the internet or
                      borrow them from friends
                      The “forbidden fruit” effect

15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                                                                          Summary
                    Video games have become an important
                    part of our technology history, society,
                    and culture
                    Programming games can be a fun and
                    rewarding way to learn about software
                    engineering principles and techniques
                    The next 40 years of video games hold
                    the promise of truly immersive 3D
                    interactive virtual worlds
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)
                               Some Links and Resources
                                The “Dot Eaters” Video Game History
                                http://www.emuunlim.com/doteaters/

                              Videotopia Video Game Historical Exhibit
                              http://www.videotopia.com/
                              (first appeared in 1996 at Carnegie Science Center)


                                Game Development Resources
                                http://www.gamedev.net/
                                http://www.gamasutra.com/
                                http://www.acm.org/tog/resources/RTR/
15-466 Computer Game Programming, Carnegie Mellon University, Spring 2007 (James Kuffner)

								
To top