37
 Python und Spieleentwicklung mit Panda3D PyCon DE 2011 7.10.2011 9.30 Uhr Saal 1B Tilo Probst

Python und Spieleentwicklung mit Panda3D

Embed Size (px)

DESCRIPTION

Python und Spieleentwicklung mit Panda3D / Python and game development using Panda3DVortrag gehalten auf / Talk given at:PyCon DE 2011, Leipzig, GermanyDate / Datum:7.10.2011 / 2011/10/7Keywords:PyConDE, Leipzig, Python, Panda3D, Spieleentwicklung, game, development, Mare Ceti, Escape Velocity

Citation preview

Page 1: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 1/37

Python undSpieleentwicklung

mit Panda3D

PyCon DE 20117.10.2011 – 9.30 Uhr – Saal 1B

Tilo Probst

Page 2: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 2/37

Warum mit Python? - PRO

• Schnelle Entwicklung, Prototyping

• Erlernbarkeit

• Lesbarkeit

• „Lehrbarkeit“ 

Page 3: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 3/37

Warum nicht mit Python? - CONTRA

• Stellenweise zu langsam -> Code

nach C/C++ portieren, Cython, ...

• Relativ kleine Community,Nischenthema -> vielleicht nur

weniger sichtbar?

Page 4: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 4/37

SDL

OpenGL,

Direct3D

OpenGL

Page 5: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 5/37

Panda3D

• Python -> C++, OpenGL, DX8, DX9

• Programmierbar mit C++, Python

• Browser Plugin, Runtime, SDK

• Engine/Framework

Page 6: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 6/37

Panda3D - Plattformen

Page 7: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 7/37

Panda3D - Buildbot

Page 8: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 8/37

Panda3D - Optimierung

PStats

Page 9: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 9/37

Panda3D – „Level Editor“ 

Page 10: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 10/37

Panda3D - Features

• Scenegraph

• Modelle (.egg, .dae)

• Netzwerk• Sound (OpenAL,

FMOD)

• Kollision, Physik 

(ODE, Bullet, PhysX, u.a.)

• Div. Tools

• Input, Events

• FSMs

• Shader Pipeline• Deployment

Partikel• GUIs

etc. pp.

Page 11: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 11/37

Tools - Beispiele

1. pview

2. egg-texture-cards

Page 12: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 12/37

Normal Mapping

Page 13: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 13/37

Volumetric Lighting

Page 14: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 14/37

Post Processing:Bloom

Page 15: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 15/37

Shader,

Post

Processing

Page 16: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 16/37

Shader: Haare

Page 17: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 17/37

Panda3D - PRO

• Schneller Einstieg

• Gutes Manual (Wiki)

• Aktive Community, Forum, etc.

• Liberale Lizenz (Modified BSD)

• Features: Web Plugin, Runtime,Deployment

Flexibilität

Page 18: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 18/37

Panda3D - CONTRA

• Kein „echter“ Editor / Game

Development Kit

• „Versteckte“ Features 

• Wenige „Core“ Entwickler 

•Flexibilität

Page 19: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 19/37

Architekturvisualisierung

ArchiCAD (.pln) Artlantis (.atl)

-> Export Plugin ->

Page 20: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 20/37

Panda3D - Echtzeitvisualisierung

Architektur:

Artlantis (.atl)

-> Python ->

Panda3DEchtzeit, WASD+Maus Interaktion

(.py Skript, .egg Modell)

Page 21: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 21/37

Page 22: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 22/37

Anaglyph 3D

Page 23: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 23/37

Codebeispiele

• Hobbyprojekt „Mare Ceti“ 

• Weltraum, Sci-Fi

• Action, RPG (Handel,

Individualisierung)

•Angelehnt an „Escape Velocity“,„Elite“ 

Page 24: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 24/37

Page 25: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 25/37

Page 26: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 26/37

Page 27: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 27/37

Panda3D – Imports

Page 28: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 28/37

Panda3D – Modelle, Nodes

Page 29: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 29/37

Panda3D – Eigene Config

config.prc

Page 30: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 30/37

Panda3D – Node Funktionen

Page 31: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 31/37

Panda3D – Events (Tasten)

Page 32: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 32/37

Panda3D - Events

Page 33: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 33/37

Panda3D – FSM: Follow, Attack, ...

Page 34: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 34/37

Panda3D - Tasks

Page 35: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 35/37

Panda3D – Update Loop

Page 36: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 36/37

Panda3D – Sequences, Parallels

Page 37: Python und Spieleentwicklung mit Panda3D

5/10/2018 Python und Spieleentwicklung mit Panda3D - slidepdf.com

http://slidepdf.com/reader/full/python-und-spieleentwicklung-mit-panda3d 37/37

Fragen?

www.pygame.org 

www.pyglet.org www.pythonogre.com 

www.panda3d.org YouTube -> panda3d

Python und Spieleentwicklung mit Panda3D - PyCon DE 2011

7.10.2011 – 9.30 Uhr – Saal 1B – Tilo Probst