BMOSLFGEMW: A Spectrum of Game Engine Architectures Adam M. Smith amsmith@soe.ucsc.edu CMPS 164 Game Engines March 30, 2010
What I m about to show you cannot be found in any textbook, on any website, on any sheet of paper anywhere.
Outline What s a game engine? The Spectrum Some Examples Spectrum Details What s in your engine? What s at stake?
What s a game engine? (first attempt) A 3D graphics library with optional support for physics and other animation-related computation. Example: Ogre3D
What s a game engine? (second attempt) A comprehensive game building environment with specialized languages, libraries, and tools. Example: Unity3D
What s a game engine? (giving up now) All the software and hardware in your game that isn t part specific to that particular game. Examples: cstdio HTML5+javascript ios
The Spectrum Bare Metal Operating Systems Libraries Frameworks Game Engines Makers Wizards
Gameduino (bare metal)
Ubuntu (OS)
ODE (library)
PyGame (framework)
Flixel (engine)
Game Maker (maker)
Klik-and-Play (wizard)
The Spectrum, revisited Bare Metal Operating Systems Libraries Frameworks Game Engines Makers Wizards Used to build engines Used to build games
Bare Metal Features Processor, memory, I/O hardware Primitive programming languages Examples Gameduino PC with no OS Early consoles Giveaways: Reinventing dynamic memory allocation, managing hardware registers
Operating Systems Features Filesystems, IO streams, memory management Examples Windows 7, Mac OSX, Ubuntu Some consoles (OtherOS on PS3) Giveaways Developer documentation suggests you are making applications
Libraries Features Isolated technical solutions Internal vocabulary of domain middleware in enterprise marketspeak Examples ODE (physics), bodies/geoms/joints OpenGL (graphics), matrices/primitives/textures Fmod (sound) Giveaways: Used outside of just games No reference to computational hardware
Frameworks Features Integration of many libraries using common vocabulary Examples DirectX XNA Delta3D (engine-ish) SDL PyGame Ogre3D (library-ish) Giveaways Contains multiple libraries!
Game Engines Features Support for genre-specific abstractions Examples Flixel ( a platformer engine, modulo abuses) Unity3D Unreal Engine Giveaways Only for games, only for games in certain genres You are writing one yourself after your second game in a genre
Makers (/ Construction Toys) Features Drag-and-drop GUI Integrated level editor Usable with mouse only Examples Game Maker Game Salad RPG Maker FPS Maker Giveaways Marketed at non-programmers Programming is optional / impossible
Wizards Features Included content libraries Coarse mechanics Machine has initiative (it asks you questions) Examples Klik-and-play Customizable games (insert your friends) Giveaways There is a clear set of steps to follow that always results in a game.
The Spectrum, revisited, again Bare Metal Operating Systems Libraries Frameworks Game Engines Makers Wizards You ll reinvent these over and over.
What s in your engine? Technical Solutions Languages Practices
Technical Solutions (library components) Input Keyboard/mouse/joystick/gamepad/touchscreen Network Event synchronization State propagation and prediction Protocols Roles (client/server/peer/supernode/etc.) Simulation Physics AI Graphics Content Storage Textures / models / levels / characters Downloading/streaming from remote sources De/compression and caching Modeling Game modes Finite state machines Scene graphs UI stacks Output Video Audio Force feedback Platform Integration Achievents / trophies / badges Points Presence and text/voice chat Matchmaking Metrics Other CS topics: Data structures Algorithms Storage Databases Graphics AI
Languages (data and code, syntax and tools) Base classes Game Object Component Scripting languages For designers For developers Data languages Object vs. Level formats Interop Language specification Tools Compilers, assemblers, packagers, decoders, debuggers Other CS topics: Programming languages Compilers
Practices (the human part) How do you create and integrate art? How do you plan? How do you build? How do you debug? How do you deploy/ship? Other CS topics: Software engineering HCI / Interfaces
What s at stake? A good engine hides the problems you don t care about and amplifies your ability to tackle the ones you do care about. A bad engine brings out new problems and weighs you down as you go about your other business. Use/make the right tool for the job, even if it doesn t look like a traditional game engine.
Thank you BMOSLFGEMW : A Spectrum of Game Engine Architectures Presenter: Adam M. Smith amsmith@soe.ucsc.edu