CSE 114 – Computer Science I Lecture 1: Introduction

Download Report

Transcript CSE 114 – Computer Science I Lecture 1: Introduction

CSE
CSE380
380––Computer
ComputerGame
GameProgramming
Programming
Introduction
Introduction
Entropy, by XRG Recursive Gaming, winner of 2007 Stony Brook Gaming Competition
Why study games?
• To get game
development jobs
• Because it is fun
• Because they are
complex
• Because they push the
envelope of computing
technology
• Bottom line:
– games are natural
learning devices
– making games is a great
way to learn other things
To really join the industry
Modern Games are Complex
• Can be very complex
• Technologies used:
–
–
–
–
–
–
–
–
2D & 3D Graphics
Sound & Music
Networking
Artificial Intelligence
Physics Simulation
Parallel Processing
Custom scripting languages
Etc.
• All of it must be implemented efficiently
Pong by Atari, released to public 1975
Battlefield 3 by Electronic Arts/DICE
Blizzard’s World of Warcraft
• Over 10,000,000 subscribers
– thousands play simultaneously
– players in countries around the world
• Requires:
– Rich graphical environment
– Complex networking
– Semi-nude dancing
• Needs an army to make it. And:
– maintain
– update
– count profits
The Development Team/Army
Programmers
Designers
Artists
Audio
Engineers
Producers
The Modern Game Programmer
• Is often more of a tools programmer
– what tools?
– tools for game designers, artists, & other programmers
• Often works with very specific technologies
– AI programmer, physics programmer, graphics
programmer, etc.
• Often has very specific skills
– advice: find your niche
What is this course about?
• Syllabus says:
– “An introduction to the fundamental concepts of
computer game programming. Students design and
develop original games for PCs applying proven game
design and software engineering principles.”
Course Objectives
• Integrate technologies such as multimedia,
artificial intelligence, and physics modeling
into a cohesive, interactive game application.
• Introduce the principles of game design that
make for a playable experience.
• Learn and use software engineering, team
project
management,
and
prototype
presentation principles in a game development
context.
Course Topics
•
•
•
•
•
•
•
•
•
•
•
Game program architecture
Game Timing
GUI programming for games
Tile-based graphics
Page & side scrolling
algorithms
Sprites & bitmap animation
Collision detection
Physics-based modeling
Artificial Intelligence in
games
Pathfinding Algorithms
Render Threading
•
•
•
•
•
•
•
•
•
•
Optimization techniques
Game input devices
Sound & Music
Differing game types, modes,
& perspectives
Game & level design
Rapid Prototyping & game
testing
Game project management
Game design documentation
Gaming industry issues
Computer game history
Course Textbook
Game Engine Architecture
by Jason Gregory
Published by A K Peters, 2009
ISBN 978-1568814131
Course Textbook
Real-Time Collision Detection
by Christer Ericson
Published by Morgan Kaufmann, 2005
ISBN 978-1558607323
Reference Textbooks
Rules of Play: Game Design Fundamentals
by Katie Salen and Eric Zimmerman
Published by MIT Press, 2003
ISBN 0-262-24045-9
Best of Game Programming Gems
by Mark DeLoura
Published by Course Technology, 2008
ISBN 1-58450-571-0
C++ Primer Plus, 5th Edition
by Stephen Prata
Published by Sams, 2004
ISBN 0672326973
What course work is involved?
• Individual Programming HWs
– Implement important algorithms
– collisions, pathfinding, scrolling, etc
• Midterm Exam
– test concepts from individual assignments
What course work is involved? (continued)
• Final Group Project & Presentation
– design and develop completely original games
– can be serious games
– games intended to educate in some way
• Group Project Benchmarks
» will have additional technical requirements
– much greater expectations
Serious Games
• Does not mean it:
– is boring
– teaches in the tradition sense
– is a tutorial
• It does mean that it:
– is a game
– should entertain
– should get the player thinking about something other
than the raw gameplay
– should try to enrich the player’s understanding of some
subject
An Example: Typist
And your games?
• Potential sources for game subjects:
– courses you have taken at Stony Brook
• Computer Science?
– your hobbies
– your personal interests
• Why do this?
– make a game that no one who has ever lived has made before
– make a game that no sensible company would ever make
• Enter it in the IGF Student Division
– http://www.igf.com/php-bin/entries2010_student.php
11th Annual Stony Brook University
Game Programming Competition
• Friday, 5/16, 5pm-8pm
• Invited projects are presented to game industry
representatives
– past Judges From:
• Activision, Applied Visions, Atari, Gamelab, Gameloft,
Microsoft, Powerhead Games
• http://www.cs.stonybrook.edu/~games
Project HWs Platforms
• Languages/Libraries
– C/C++
– Windows
– DirectX SDK
• Visual Studio 2012/2013 IDE
– free from Stony Brook DreamSpark portal
And the Group Project?
• We’ll add a couple of technologies
– Box2D Physics Engine
– Lua Scripting Language
C/C++
• C++ is almost the industry standard
• Why would programmers still use C?
• Why not Java, C#, Objective C, or Python?
• C++ Boot Camp
– This Friday, 1/31, 3pm – 6:30pm in CS 2129
– Not mandatory, but highly recommended
Windows Game Development
• PC vs. Console:
– expense
– processing power
– development difficulty
• full-screen developers learn to hate ALT-TAB
• API:
– http://msdn2.microsoft.com/en-us/library/aa139672.aspx
DirectX SDK (June 2010 release or later)
• A low-level library for making games
• What can it do for a 2D game?
– manipulate the graphics card
• efficiently render an image to the screen
• efficiently render text
– efficiently play a sound or music
• Download SDK:
– http://msdn.microsoft.com/en-us/directx/default.aspx
• API (ASAP get used to this Web site structure):
– http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275%28v=vs.85%29.aspx
• DirectX API now part of Windows API
Early Advice
1. Learn C++ ASAP – and I mean really learn it
–
More on the C++ Boot Camp in a minute
2. Learn to use Visual Studio ASAP, including running
projects using DirectX (I’ll give sample code)
3. Think about your original game/team early on
4. Cancel your WOW account immediately
Accounts
• Windows Lab account, where you will work on
your projects
– http://www.cs.sunysb.edu/facilities/windowslab/
AN IMPORTANT NOTE ON ACADEMIC DISHONESTY
• All work you submit for homework, projects, or
exams MUST be your own work.
• If you cheat or aid someone in cheating, you will
automatically fail this course and be brought up on
charges of academic dishonesty without warning.
• NO EXCEPTIONS WILL BE MADE!
Where do we start? Documentation
• Always design first
– design your game
• design doc
– design your art
• storyboard
– design your code
• UML
Game Development as a Process
User Help
Document
Gameplay & Setup
files: .xls, .csv,
xml
Game Design
Document
UML
Design Docs
Storyboard
Game
C++ Source Code
Resource Files:
.ICO .BMP, etc.
Art Assets:
.DDS, .WAV, etc.
Game Development LOG
Bug Database
.EXE
Program
Why 2D Games?
• Avoid 3D Artwork Obstacles
• Many topics are relevant to both 2D & 3D games
• NOTE:
– we will still have to implement our games efficiently
What is a 2D game graphically speaking?
• Basically 2 things:
– Texture rendering (images)
– Text rendering
• Rendering textures & text is easy
• Efficiently managing the data of the game is not