ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
ProcessingBGE ( PBGE )a blender game engine API noobisation
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
the speaker
background● digital artist● researcher @ numediart, new media art technology institute in Mons, BE● teacher @ Arts2 academy of arts, Mons, BE
concerns● code art● realtime● opensource
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
GENESIS
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
path
processing.org
openframeworks.cc
GAMING TECHNOLOGIES
unity? ogre? blender?
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
workshops
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
stiff learning curve
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
THE IDEA
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
ecosystem
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
processing.org
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
SCREEN LAYOUT
API
PBGE
TEMPLATE
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
screen layout & template
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
noob API
FLEXIBLE ARGUMENTS
STRAIGHT METHOD NAMES
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
noob API
MOVE OBJECT AT A POSITION
X, Y, Z coordinates
pbge.moveTo( , )
myObject2 “an object name”a vector
myObject “my object name”
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
noob API
pbge.color( )
COLOR
white value255
white & alpha255, 127
RGB255, 0, 0
RGBA255, 0, 0, 127
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
noob API > full API
pbge.createCube()
NO BGE CLASSES OVERLOAD!
KX_GameObject
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
folders' structure
examples/step by step
template/empty .blend project with PBGE lib
scripts/external copies
doc/html reference
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
html references
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
example
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
example running
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
UNDER THE HOOD
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
.blend template
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
primitives
● root :● empty● connected to game logic sensor, controller &
actuators
● templates :● basic 2D shapes● basic 3D shapes● basic spotlight● copied via createCube, createSphere, etc
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
basic script
● main functions :● init(), called once● animate(), called at each frame
● required methods :● configure()
● gather objects● declare addons
● update()● prepare inputs● increment frameCount
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
architecture
● ProcessingBGE.py [core]:● singleton● manages:
● scene & template objects● inputs ( mouse, keyboard )● references to dynamically create objects● addons
● constants ( PI, ARROW_UP, etc )● user-defined variables
● ProcessingOSC.py [addon]:● singleton● OSC receivers and senders
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
FUTURE DEV
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
code > short term
FINISH THE BASICS!
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
code > mid term
● All major functionalities exposed:● Camera● Material● Armature● Physic● OpenGL● Sound● Video & image sequence export
● Librairies:● OSC in/out (started)● XML
● External resources:● Image● Video● Sound
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
cleaner
from ProcessingBGE.ProcessingBGE import ProcessingBGE as pbgeimport mathimport mathutilsimport random
def init(): scene = bge.logic.getCurrentScene() scene.post_draw = [animate] pbge.configure() pbge.myplane = pbge.createPlane( 0,0,-3 ) pbge.mycube = pbge.createCube( 0,2,0 ) pbge.mysphere = pbge.createSphere( 0,-2,0 ) pbge.mycylinder = pbge.createCylinder( 2,0,0 ) pbge.myspot = pbge.createSpot( 0,0,7 ) def animate(): pbge.update() pbge.rotateZ( pbge.myplane, 0.001 ) pbge.rotateX( pbge.mycube, 0.01 ) pbge.rotateY( pbge.mysphere, 0.02 )
if pbge.isconfigured() == False: init()
pbge.myplane = 0pbge.mycube = 0pbge.mysphere = 0pbge.mycylinder = 0pbge.myspot = 0
def setup():pbge.myplane = pbge.createPlane( 0,0,-3 )
pbge.mycube = pbge.createCube( 0,2,0 ) pbge.mysphere = pbge.createSphere( 0,-2,0 ) pbge.mycylinder = pbge.createCylinder( 2,0,0 ) pbge.myspot = pbge.createSpot( 0,0,7 )
def draw():pbge.rotateZ( pbge.myplane, 0.001 )pbge.rotateX( pbge.mycube, 0.01 )pbge.rotateY( pbge.mysphere, 0.02 )
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
integration
easy● New PBGE file : File > New PBGE● Examples: File > PBGE examples > [List of examples]
not so easy● Bar on top of text editor with PLAY / STOP button● Embed “help” scripts● GE window:
● Floating● Automatic open/close on play/stop● Non modal
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
FOR YOU?
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
audiences
● digital artists● familiar syntax ● easy entry into gaming development
● pro● prototyping speed increased
● amateur● easy access to RT features
● students● easy syntax● step by step examples
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
entry point
60k users / week*
*https://twitter.com/ben_fry/status/392772415459061760
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
entry point
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
entry point
ProcessingBGE | Blender Conference 2013 | http://github.com/frankiezafe/pbge | http://frankiezafe.org
Community BBUG http://bbug.tuxfamily.org Github https://github.com/frankiezafe/pbge
Platformprocessing http://processing.org openframeworks http://openframeworks.cc
Organisationconstant vzw http://www.constantvzw.org numediart http://numediart.org arts² http://blog.artsaucarre.be/artsnumeriques/
PeopleJuego Requiem http://xuv.be Olivier Meunier http://www.ogeem.be
links
Terminal Dosis font by http://www.impallari.com/dosis | made with LibreOffice Impress