blender game engine for rapid game development pycon 2010 final

51
Rapid 3D Game Development in Rapid 3D Game Development in Rapid 3D Game Development in Rapid 3D Game Development in Blender 2.5 Blender 2.5 Blender 2.5 Blender 2.5 Arun Ravindran www.arunrocks.com

Upload: mercurysama

Post on 07-Mar-2015

67 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Rapid 3D Game Development in Rapid 3D Game Development in Rapid 3D Game Development in Rapid 3D Game Development in Blender 2.5Blender 2.5Blender 2.5Blender 2.5Blender 2.5Blender 2.5Blender 2.5Blender 2.5

Arun Ravindranwww.arunrocks.com

Page 2: Blender Game Engine for Rapid Game Development Pycon 2010 Final

• Introduction to 3D Game Programming• Components of Typical 3D Games

• Python 3D Game Development • Blender Game Engine • Blender 2.5 Basics • Blender 2.5 Basics

• Case Study: A Simple 3D Game• Further Reading

Page 3: Blender Game Engine for Rapid Game Development Pycon 2010 Final

(Re)visiting 3D Games(Re)visiting 3D Games

Page 4: Blender Game Engine for Rapid Game Development Pycon 2010 Final
Page 5: Blender Game Engine for Rapid Game Development Pycon 2010 Final

GenresGenres

Page 6: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Action – FPSAdventure

RPGPuzzlePuzzleSimsSportsStrategy

Page 7: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Game EngineGame Engine

Page 8: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Game Engine

Physics engine Sound engine

Scripting engine Animation engine

Game Engine

AI engine Networking

Resource mgmt …

Page 9: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Don’t write your own!

Industry Insider Tip #87

Don’t write your own!

Page 10: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Programming 3D Games in PythonProgramming 3D Games in Python

Page 11: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Python 3D game enginesGame EnginesGame EnginesGame EnginesGame Engines RemarksRemarksRemarksRemarks

PyOpenGL

Python-Ogre

Pyrr

pyglet

Only Rendering, Not Full Game Engine

Panda3D game engine in C++ with python

integration

Soya 3D / PySoy High level 3D engine for Python

Blender Game Engine Game engine, modeler, animator

Sylphis3D commercial game engine with GPL

version

Page 12: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Blender Game engine (BGE)Blender Game engine (BGE)

Page 13: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Blender Game Engine

Physics engine Sound engine

Scripting engine Animation engine

Blender Game Engine

AI engine Networking

Resource mgmt …

PythonPythonPythonPython

Page 14: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Where has BGE been used?

Page 15: Blender Game Engine for Rapid Game Development Pycon 2010 Final

ColorCube Puzzle game $

SAAB-91 Virtual RaceBFight

"A Furry Vendetta“, Yo Frankie! Project"A Furry Vendetta“, Yo Frankie! ProjectArchitectural Visualizations

Physics Simulations

Page 16: Blender Game Engine for Rapid Game Development Pycon 2010 Final

What kind of games can be made with BGE?BGE?

Page 17: Blender Game Engine for Rapid Game Development Pycon 2010 Final

FPS?Multiplayer?Orthographic?Orthographic?

Platform?

Page 18: Blender Game Engine for Rapid Game Development Pycon 2010 Final

All of themAll of themAll of themAll of them

Page 19: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Two ways of making games

Page 20: Blender Game Engine for Rapid Game Development Pycon 2010 Final

1. Code a Game loop

Page 21: Blender Game Engine for Rapid Game Development Pycon 2010 Final

do

get player input

do calculations do calculations

repaint screen

loop while not game over

Page 22: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Yawn!

Page 23: Blender Game Engine for Rapid Game Development Pycon 2010 Final

2. Click and drag game creation (the Blender Blender Blender Blender way)(the Blender Blender Blender Blender way)

Page 24: Blender Game Engine for Rapid Game Development Pycon 2010 Final

100% Code-free **

** Conditions Apply***: The conditions under which you do not need to write any code are as follows: 1. The game you are trying to

build is completely free of any complex logic such as bot AI, path finding, complex simulations 2. There is no multiplayer requirement. 3. There are no complex collisions outside that can be handled by default bullet engine

*** All these conditions are fake

Page 25: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Understanding the way of Logicof Logic

Page 26: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Understanding the way of Logic Machinesof Logic Machines

Page 27: Blender Game Engine for Rapid Game Development Pycon 2010 Final

What is a Machine?

Page 28: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Reacts to StimulusEvaluates some logicPerforms an actionPerforms an action

Page 29: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Take any Machinecoffee machine | fire alarm | firecracker

Page 30: Blender Game Engine for Rapid Game Development Pycon 2010 Final

ReactsReactsReactsReacts to StimulusEvaluatesEvaluatesEvaluatesEvaluates some logicPerformsPerformsPerformsPerforms an actionPerformsPerformsPerformsPerforms an action

Page 31: Blender Game Engine for Rapid Game Development Pycon 2010 Final

ReactsReactsReactsReacts EvaluatesEvaluatesEvaluatesEvaluates PerformsPerformsPerformsPerforms

Page 32: Blender Game Engine for Rapid Game Development Pycon 2010 Final

A Crash Course to Blender 2.5 (Beta)

Page 33: Blender Game Engine for Rapid Game Development Pycon 2010 Final

A Crash Course to Blender 2.5 (Beta)

Yes, it may crash!

Page 34: Blender Game Engine for Rapid Game Development Pycon 2010 Final
Page 35: Blender Game Engine for Rapid Game Development Pycon 2010 Final

What’s new in 2.5?

Page 36: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Major rewrite of Blender API GUI finally works! (Discover)GUI finally works!

New Smoke SystemPython Based GUI

Page 37: Blender Game Engine for Rapid Game Development Pycon 2010 Final

What’s new in BGE 2.5?

Page 38: Blender Game Engine for Rapid Game Development Pycon 2010 Final

* Faster!* New sound system (ogg, mp3, wav…)

* Real-time external IK targets* Ability to use raw OpenGL code (GUIs)* Ability to use raw OpenGL code (GUIs)* Dynamic loading/freeing of assets

* Python API improvements

Page 39: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Some BGE concepts

Page 40: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Modeling & Texture mapping

Page 41: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Types of Sensors

Page 42: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Types of Controllers

Page 43: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Types of Actuators

Page 44: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Packaging Your Blender Game

Page 45: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Blender PlayerCrystalBlendCrystalBlend

GameKit

Page 46: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Pros & Cons of BGE

Page 47: Blender Game Engine for Rapid Game Development Pycon 2010 Final

☺ No code ☺ No Compilation

☺ Out-of-the-box Physics☺ Out-of-the-box Physics☺ No Integration Issues

☺ Python 3.1! 1st

Page 48: Blender Game Engine for Rapid Game Development Pycon 2010 Final

� Graphical Logic Complexity� Sparse Documentation� Unconventional Approach� Unconventional Approach

� Optimisations?

Page 49: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Case Study: Pacman 3D

Page 50: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Learn more

http://www.blender.org/documentation/250PythonDoc/

http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro

Page 51: Blender Game Engine for Rapid Game Development Pycon 2010 Final

Thank You

Follow @arocks