gameplay systems i softwaretechnologie ii (teil 2): simulation und 3d programmierung ss 2012 prof....

19
Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

Upload: ernust-heiter

Post on 05-Apr-2015

103 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

Gameplay Systems ISoftwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012Prof. Dr. phil. Manfred ThallerReferent: Christian Weitz

Page 2: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

2

Aufbau der Spielwelt

•Elemente statisch/dynamisch•Chunks

▫Level, Map, Stage, Area, …•High-Level Flow

Page 3: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

3

Game Objects

•Objektorientierter Ansatz•Game Object Model

▫Menge von Klassen, Methoden und Beziehungen

•Tool-Side Design vs. Runtime Design

Page 4: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

4

Data-Driven Game Engines

•~Antonym zu hardcoded Games•Spielverhalten durch Daten von Künstlern

und Designern bestimmt

Page 5: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

5

Game World Editor

Bildnachweis: http://thatgamedesignstudent.wordpress.com/2009/02/04/warcraft-iii-world-editor/

Page 6: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

6

Game World Editor• Chunks erstellen & verändern• Visualisieren• Navigation• Selektion• Layers• Property Grid• Object Placement & Alignment Aids• Special Object Types• Laden/Speichern• Rapid Iteration• Integrated Asset Management Tools

Page 7: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

7

Gameplay Foundation Systems

•Runtime game object model•Streaming game worlds•Updating game objects in real time•Messaging / event handling•Scripting•High-level game flow management

Page 8: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

8

Runtime game object model•Dynamically spawning/destroying objects•Linkage to low-level engine systems•Real-time object behaviour simulation•Define new object types•Unique object Ids•Game object queries•Game object references•Finite state machine support•Network replication•Saving / loading games / object persistence

Page 9: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

9

Runtime Object Model Architectures

•Object-centric vs. property-centric

Page 10: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

10

Object-Centric ArchitecturesGameObject

MovableObject

RenderableObject

Vehicle

LandVehicle WaterVehicle

Car Motorcycle Truck Yacht HovercraftSpeedBoat

Page 11: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

11

Object-Centric Architectures

Probleme:•Verstehen, Verwalten und Modifizieren

von Klassen•Multidimensionale Beziehungen•Bubble-Up Effect

Page 12: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

12

Object-Centric Architectures

Mix-in Classes

GameObject

VehicleCharacter Weapon Item

Mhealth+GetHealth()+ApplyDamage()+IsDead()+OnDeath()

Mcarryable+PickUp()+Drop()+IsBeingCarried()

Page 13: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

13

Object-Centric Architectures: Composition„is-a → „has-a“ GameObject

MovableObject

RenderableObject

CollidableObject

AnimatingObject

PhysicalObject

Page 14: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

14

Object-Centric Architectures:Composition

Transform

MeshInstance GameObject

RigidBody

AnimationController

1 1

11

11

11

Page 15: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

15

Property-Centric ArchitecturesObject-Centric Property-Centric

Object1• Position = (0, 3, 15)• Orientation = (0, 43, 0)

Position• Object1 = (0, 3, 15)• Object2 = (-12, 0, 8)

Object2• Position = (-12, 0, 8)• Health = 15

Orientation• Object1 = (0, 43, 0)• Object3 = (0, -87, 10)

Object3• Orientation = (0, -87, 10)

Health• Object2 = 15

Page 16: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

16

Property-Centric Architectures

+Bessere Speichernutzung+Cache-freundlich ‚struct of arrays‘

- Unübersichtlich- Komplexes Verhalten schwieriger

umzusetzen

Page 17: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

17

World Chunk Data Formats

•Binary Object Images•Serialized Game Object Descriptions•Spawners and Type Schemas

Page 18: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

18

Loading & Streaming Game Worlds•Simple Level Loading•Air Locks•Game World Streaming•Spawning Objects•Saved Games

Page 19: Gameplay Systems I Softwaretechnologie II (Teil 2): Simulation und 3D Programmierung SS 2012 Prof. Dr. phil. Manfred Thaller Referent: Christian Weitz

19

Vielen Dank!