How the left and right brain learned to love one another How the left and right brain learned to...

47
How the left and right brain How the left and right brain learned to love one another learned to love one another Tim Moss Tim Moss Sony Computer Entertainment Sony Computer Entertainment America, America, Santa Monica Studio. Santa Monica Studio.

Transcript of How the left and right brain learned to love one another How the left and right brain learned to...

Page 1: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

How the left and right brain learned How the left and right brain learned to love one anotherto love one another

Tim MossTim Moss

Sony Computer Entertainment America, Sony Computer Entertainment America,

Santa Monica Studio.Santa Monica Studio.

Page 2: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Presentation ObjectivesPresentation Objectives

• Post Mortem Post Mortem • Team StructureTeam Structure• High level Summary of methods High level Summary of methods

Page 3: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Brief History Brief History

• Studio started in 1999Studio started in 1999• ‘‘Fun Games that Sell’Fun Games that Sell’• First project ‘Kinetica’ First project ‘Kinetica’

– An average game that sold averagely An average game that sold averagely (But had nice technology)(But had nice technology)

Page 4: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

ObjectivesObjectives

• Establish a new Franchise for SonyEstablish a new Franchise for Sony• A 3A 3rdrd Person Action Platformer Person Action Platformer

taking the best elements of ICO, taking the best elements of ICO, Devil May Cry etc.Devil May Cry etc.

• Cinematic CameraCinematic Camera• Epic StoryEpic Story• ‘‘Casual Hardcore’Casual Hardcore’

Page 5: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Design ObjectivesDesign Objectives

• Lots of special casesLots of special cases• It should feel REALLY BIG.It should feel REALLY BIG.• Feature creep…… don’t exactly Feature creep…… don’t exactly

know what I want … but I will know know what I want … but I will know it when I see it.it when I see it.

• Game should keep moving, no Game should keep moving, no obvious repeats.obvious repeats.

Page 6: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Programming Programming ObjectivesObjectives

• 60 Frames Per Sec60 Frames Per Sec• Technically outstanding on release.Technically outstanding on release.• Build game / engine methodically, to Build game / engine methodically, to

avoid wasting time and reduce bugs.avoid wasting time and reduce bugs.• Avoid special casesAvoid special cases• Prevent the programming department Prevent the programming department

from becoming a bottleneckfrom becoming a bottleneck• Spend the last month of the project on Spend the last month of the project on

the beach while the game is being the beach while the game is being completed.completed.

Page 7: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Bridging the Bridging the Communication GapCommunication Gap

• Left brain / Right brain Left brain / Right brain • Designers want special casesDesigners want special cases• Programmers hate special casesProgrammers hate special cases• Tools were the answerTools were the answer

Page 8: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Studio LayoutStudio Layout

Page 9: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Open plan factsOpen plan facts

• Facilitates conversationFacilitates conversation• No-where to hide – so productivity No-where to hide – so productivity

seems better. Can’t surf Ebay all seems better. Can’t surf Ebay all day.day.

• You feel like you’re in a team.You feel like you’re in a team.• Headphones are vital.Headphones are vital.• Difficult to avoid seagull Difficult to avoid seagull

management.management.

Page 10: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Team StructureTeam Structure

• Code team (7)Code team (7)• Design team (10)Design team (10)• Art team (22)Art team (22)• Sound (3)Sound (3)• Production (4)Production (4)

Page 11: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Code TeamCode Team

• 7 Senior Programmers7 Senior Programmers• Broad responsibilitiesBroad responsibilities• Usually a single point of contact for Usually a single point of contact for

a given systema given system

Page 12: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Design TeamDesign Team

• Game DirectorGame Director• 4 Level Designers / Scripters4 Level Designers / Scripters• 3 Combat Designers3 Combat Designers• 2 Sound Implementers2 Sound Implementers• 1 Camera Designer1 Camera Designer

Page 13: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Art TeamArt Team

• Art – Environments (6)Art – Environments (6)• Art – Animation (5)Art – Animation (5)• Art – Characters (4)Art – Characters (4)• Art – Concept (3)Art – Concept (3)• Art – Technical Artists (4)Art – Technical Artists (4)

Page 14: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Technical ArtistsTechnical Artists

• A group of 4 for GoW.A group of 4 for GoW.• Helped the Programmers structure Helped the Programmers structure

the tools.the tools.• Helped design interfaces for the Helped design interfaces for the

Maya users.Maya users.• Troubleshooters Troubleshooters • Helped us avoid over-engineering.Helped us avoid over-engineering.

Page 15: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Asset Creation based in Asset Creation based in MayaMaya

• Art – Environments, Characters, Art – Environments, Characters, ParticlesParticles

• Collision – Separate geometry from Art.Collision – Separate geometry from Art.• Camera PlacementCamera Placement• Entity System (Scripting)Entity System (Scripting)• Sound / Music TriggersSound / Music Triggers• Visibility TriggersVisibility Triggers• Loading Zone TriggersLoading Zone Triggers• Waypoint layoutsWaypoint layouts

Page 16: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Asset ControlAsset Control

• Alienbrain …. Used simply as a file Alienbrain …. Used simply as a file structure system. Not at all structure system. Not at all customised. That’s probably why customised. That’s probably why it’s ok for us.it’s ok for us.

• The programmers didn’t use it for The programmers didn’t use it for code.code.

Page 17: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Maya File structureMaya File structure

WorldWorld

CamerasCameras EntitiesEntities VisualsVisuals WaypointsWaypoints SoundSound

Page 18: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

File StructureFile Structure

• Allows multiple people to work on Allows multiple people to work on different aspects of the same level.different aspects of the same level.

• Common interface allows cross Common interface allows cross pollination of responsibilities.pollination of responsibilities.

• Helps with bottleneck issues since Helps with bottleneck issues since chances are higher that someone else chances are higher that someone else can do any given task.can do any given task.

Page 19: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Build ToolsBuild Tools

• A single tool processes the .mb file A single tool processes the .mb file producing:- producing:- – Binary chunksBinary chunks– PERL Include FilesPERL Include Files

• Only changed pieces of scene are Only changed pieces of scene are rebuilt subsequently, the rest rebuilt subsequently, the rest comes from the cache.comes from the cache.

• Complete Level data file is Complete Level data file is assembled using a PERL script.assembled using a PERL script.

Page 20: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

In Game TweakingIn Game Tweaking

• Some stuff can be edited in gameSome stuff can be edited in game– CamerasCameras– Combat specificsCombat specifics– FogFog

• Saved to disk, included into the Saved to disk, included into the WAD file on the next rebuild.WAD file on the next rebuild.

• Tweaks are checked into Tweaks are checked into Alienbrain.Alienbrain.

Page 21: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Easy workflowEasy workflow

• Every person has Maya installed, Every person has Maya installed, along with the current build of game along with the current build of game and toolsand tools

• Any person can build any asset of the Any person can build any asset of the entire game on their own machine. entire game on their own machine.

• Fast iteration time when editing Fast iteration time when editing specific assets. specific assets.

• No programmer intervention No programmer intervention required.required.

Page 22: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Code StructureCode Structure

• 3 time rule – if a request comes through 3 time rule – if a request comes through 3 times, its probably something that’s 3 times, its probably something that’s really wanted. really wanted.

• Evaluate any serious design request Evaluate any serious design request with an eye to adding a ‘feature’ to with an eye to adding a ‘feature’ to support it. Build it in neatly and in as support it. Build it in neatly and in as general way as possible. general way as possible.

• Don’t Hack EVER. You will pay for it Don’t Hack EVER. You will pay for it later.later.

• HOWEVER – Resist the urge to over-HOWEVER – Resist the urge to over-engineerengineer

Page 23: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Simple AI / Player Simple AI / Player structurestructure

• Common code for all enemies and Common code for all enemies and the playerthe player

• Navigation / Combat in 2 separate Navigation / Combat in 2 separate systems so that 2 programmers systems so that 2 programmers could work concurrently.could work concurrently.

• Easier to debugEasier to debug• Much less codeMuch less code

Page 24: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Navigation CodeNavigation Code• Objects represented Objects represented

by a capsule. by a capsule. • Line tests into the Line tests into the

collision to find collision to find surfaces.surfaces.

• Separate Physical Separate Physical Position from actual Position from actual position to reduce position to reduce pops.pops.

• All characters use All characters use the same code.the same code.

Page 25: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Combat / Move SystemCombat / Move System

• Every single character in games used same Every single character in games used same Combat / Move system, even the player.Combat / Move system, even the player.

• Designers could cut up animsDesigners could cut up anims• Special tools to allow real-time tweaking of Special tools to allow real-time tweaking of

combat from a PC.combat from a PC.• Branches setup to occur on :-Branches setup to occur on :-

– Hits from or to other charsHits from or to other chars– Environment hitsEnvironment hits– TimersTimers– Button presses Button presses – Etc….Etc….

Page 26: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Combat / Move System Combat / Move System DetailsDetails

• Add sound effectsAdd sound effects• Add visual effectsAdd visual effects• Play at different speedsPlay at different speeds• Synchronize with targetsSynchronize with targets• Add Button press triggers.Add Button press triggers.• Track and Field Play back.Track and Field Play back.

Page 27: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Player / AIPlayer / AI

• Player :- Player :- – Joypad converted into a Worldvector, Joypad converted into a Worldvector,

this drives motionthis drives motion– Buttons control which combat moves Buttons control which combat moves

are calledare called

• AI :-AI :-– World Vector is calculated, used to World Vector is calculated, used to

drive motiondrive motion– Decision Tree decides which move.Decision Tree decides which move.

Page 28: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

WaypointsWaypoints

• Created using a tool in MayaCreated using a tool in Maya• Overlays a grid onto a Room in Overlays a grid onto a Room in

Maya. Maya. • Designers can ‘paint’ accessible Designers can ‘paint’ accessible

gridsquares.gridsquares.• Tool automatically sets up linkages.Tool automatically sets up linkages.• Enemies can then use this to Enemies can then use this to

navigate through environment. navigate through environment.

Page 29: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Synchronized Synchronized AnimationsAnimations

• Player can synchronize animation with an Player can synchronize animation with an object in the environment.object in the environment.

• Puts the job of doing special case in the hands Puts the job of doing special case in the hands of the animators and designers.of the animators and designers.

Page 30: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Synchronized ExamplesSynchronized Examples

• Cranks – Play a synced animation, Cranks – Play a synced animation, and player stays attached to the and player stays attached to the handle. Handle can be moved handle. Handle can be moved anywhere by animation.anywhere by animation.

• Lift Doors – Use track and field Lift Doors – Use track and field mechanic.mechanic.

• Combat – all over the place.Combat – all over the place.

Page 31: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Entity SystemEntity System

• Annotation system for game levelsAnnotation system for game levels• Allows designers to add reactivity Allows designers to add reactivity

by connecting "events" to by connecting "events" to "actions", e.g."actions", e.g.– "pull lever" -> "open door""pull lever" -> "open door"– "player in zone" -> "load next level“"player in zone" -> "load next level“

• Designers create entities and Designers create entities and zones. Connect them and edit zones. Connect them and edit attributes in a MEL based editor.attributes in a MEL based editor.

Page 32: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Entity System - ToolsEntity System - Tools• Various Entity TypesVarious Entity Types

– Sensors – Detect Entry / Exit from zones, Creation / Sensors – Detect Entry / Exit from zones, Creation / Destruction of objectsDestruction of objects

– Actuators – Play Animations, Control visibility, create Actuators – Play Animations, Control visibility, create objects /objects /

• Entities have attributes, some are common, some are Entities have attributes, some are common, some are custom per type.custom per type.

• Attributes may contain in-line script code, e.g.Attributes may contain in-line script code, e.g.– "Enabled: (GotShield && GotKey && ! DoorOpened)“"Enabled: (GotShield && GotKey && ! DoorOpened)“– "Execute: if (OnBeam) SetCamera ('OverheadCam')“"Execute: if (OnBeam) SetCamera ('OverheadCam')“

• Scripting is very simple in scope:Scripting is very simple in scope:– if/else, int/float/string variables, built-in commandsif/else, int/float/string variables, built-in commands– NO loops, user-defined functionsNO loops, user-defined functions

• Interconnection between entities is very limited:Interconnection between entities is very limited:– Sensors can only trigger actuatorsSensors can only trigger actuators– Many-to-1 and 1-to-many is allowedMany-to-1 and 1-to-many is allowed

Page 33: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Entity System - GameEntity System - Game

• All creatures / objects have All creatures / objects have "markers" that are tracked as they "markers" that are tracked as they move through "entity zones"move through "entity zones"

• This motion, as well as internal This motion, as well as internal game activity, give rise to game activity, give rise to messages that are passed among messages that are passed among entitiesentities

• Interpreting entity attribute scripts Interpreting entity attribute scripts changes the internal game statechanges the internal game state

Page 34: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Camera SystemCamera System

• Completely scriptedCompletely scripted– No CollisionNo Collision– No line of sight checks No line of sight checks

• Set Design Level building strategy.Set Design Level building strategy.• Cameras can be controlled by the Cameras can be controlled by the

entity system.entity system.

Page 35: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Camera System ContdCamera System Contd

• Static – Fixed Position, Direction and FOV• Animated• Dynamic – constraints setup in maya.

Actual position calculated by game code.• Action Zoom – Combat controlled, aims

at character, plays with FOV.• Multiple cameras can run at once.• Cameras can be overlapped to avoid

rapid switching.

Page 36: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Visibility SystemVisibility System

• Entirely setup by hand.Entirely setup by hand.• We always know where the camera We always know where the camera

is, what its pointing at.is, what its pointing at.• Camera Position controls visibility.Camera Position controls visibility.

Page 37: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Environmental Sound Environmental Sound and Musicand Music

• Sound effects can be added to Sound effects can be added to animations within Maya by a animations within Maya by a designer. designer.

• Atmospheric sound zones can be Atmospheric sound zones can be placed in a region.placed in a region.

• Music triggers can be done the Music triggers can be done the same waysame way

Page 38: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Memory ManagementMemory Management

32 Meg memory

16 Meg for Levels, split into 2 4*1 Meg Enemies

1.5 Meg Exe

Run Time Data

Perm Data

• Establish Hard Rules.Establish Hard Rules. – 16 Meg for Level Data (Split into 2 Levels)16 Meg for Level Data (Split into 2 Levels)– 4 * 1 Meg for Enemies4 * 1 Meg for Enemies

Page 39: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Memory Management Memory Management contdcontd

• Let Art / Design do their own Memory Let Art / Design do their own Memory Management.Management.– Avoids Pigeon Holing anyone. Every level Avoids Pigeon Holing anyone. Every level

ends up being a good compromise.ends up being a good compromise.

• Tools for memory tracking available in Tools for memory tracking available in game.game.– The artists frequently spotted memory leaks The artists frequently spotted memory leaks

/ problems using this./ problems using this.

Page 40: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Level Loading SchemeLevel Loading Scheme

LevelLevel AA

LevelLevel BB

Load Load Level BLevel B

Load Load Level ALevel A

Block Block Level BLevel B

Block Block Level ALevel A

Page 41: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Level Loading SchemeLevel Loading Scheme

• 2 Levels loaded simultaneously. Either 2 Levels loaded simultaneously. Either Current Level and Last level, or Current Current Level and Last level, or Current and Next.and Next.

• Design places Load Triggers. These kick Design places Load Triggers. These kick off a level load.off a level load.

• Also place Load Blocks. Also place Load Blocks. • Simple rule – allow 1 sec of travel time Simple rule – allow 1 sec of travel time

for every 1 meg of level that needs to for every 1 meg of level that needs to load. load.

• 4 enemy slots also changed out at Level 4 enemy slots also changed out at Level Load time.Load time.

Page 42: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

FlashFlash

• All Front End and HUD elements All Front End and HUD elements done using Flash. Heavily done using Flash. Heavily optimized for the engine.optimized for the engine.

• Compiler is freely available on Compiler is freely available on website. website.

• Allows prototyping and design Allows prototyping and design without programmer.without programmer.

Page 43: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Optimising for SpeedOptimising for Speed

• Frame rate is displayed front and Frame rate is displayed front and center to everyone, 60fps center to everyone, 60fps regarded as the 100% CPU and GS. regarded as the 100% CPU and GS.

• Lead Programmer hassles them Lead Programmer hassles them endlessly about 60fps.endlessly about 60fps.

• The Frame Rate lies to everyoneThe Frame Rate lies to everyone

Page 44: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

SchedulingScheduling

• Overall Task List for the whole Overall Task List for the whole project, broken down by project, broken down by programmer.programmer.

• Updated regularlyUpdated regularly• Only added time estimates for Only added time estimates for

what was being done next.what was being done next.• ‘‘Bang for the Buck’ approach. Bang for the Buck’ approach.

Page 45: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Did it work?Did it work?

• Executable for God of War was 1.5 Executable for God of War was 1.5 meg. No code loading was done.meg. No code loading was done.

• General code made the game General code made the game small, more cache efficient. Ran small, more cache efficient. Ran faster.faster.

• Engine / Tools are being used Engine / Tools are being used again on GOW2. Also moving on to again on GOW2. Also moving on to our PS3 titles. our PS3 titles.

Page 46: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

Testing / DebuggingTesting / Debugging

• 500 Bugs in database 2 weeks 500 Bugs in database 2 weeks from Gold Master. 25 were from Gold Master. 25 were Programmer bugs. Programmer bugs.

• Led to a more bug free game – no Led to a more bug free game – no single group was overwhelmed.single group was overwhelmed.

Page 47: How the left and right brain learned to love one another How the left and right brain learned to love one another Tim Moss Sony Computer Entertainment.

SummarySummary

• Programmers don’t drive game Programmers don’t drive game development like the old daysdevelopment like the old days

• Expect more from Art and Design. Expect more from Art and Design. They can cope with it. They can cope with it.

• Programmers are able to provide a Programmers are able to provide a logical ‘left brain’ structure to the logical ‘left brain’ structure to the project that the creative ‘right project that the creative ‘right brain’ types aren’t even aware of. brain’ types aren’t even aware of.