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

Post on 05-Apr-2015

104 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

2

Aufbau der Spielwelt

•Elemente statisch/dynamisch•Chunks

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

3

Game Objects

•Objektorientierter Ansatz•Game Object Model

▫Menge von Klassen, Methoden und Beziehungen

•Tool-Side Design vs. Runtime Design

4

Data-Driven Game Engines

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

und Designern bestimmt

5

Game World Editor

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

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

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

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

9

Runtime Object Model Architectures

•Object-centric vs. property-centric

10

Object-Centric ArchitecturesGameObject

MovableObject

RenderableObject

Vehicle

LandVehicle WaterVehicle

Car Motorcycle Truck Yacht HovercraftSpeedBoat

11

Object-Centric Architectures

Probleme:•Verstehen, Verwalten und Modifizieren

von Klassen•Multidimensionale Beziehungen•Bubble-Up Effect

12

Object-Centric Architectures

Mix-in Classes

GameObject

VehicleCharacter Weapon Item

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

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

13

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

MovableObject

RenderableObject

CollidableObject

AnimatingObject

PhysicalObject

14

Object-Centric Architectures:Composition

Transform

MeshInstance GameObject

RigidBody

AnimationController

1 1

11

11

11

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

16

Property-Centric Architectures

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

- Unübersichtlich- Komplexes Verhalten schwieriger

umzusetzen

17

World Chunk Data Formats

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

18

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

19

Vielen Dank!

top related