Topic
V Game Club Fall 2014
Last update: September 17, 2014
Permanent link: http://gcfall2014.mintkit.net
V Plans
* Game Programming and Designing Sessions
Weekly based sessions, mostly of lectures
* Educational Game Integrating School-offering Courses
with Blender as Game Engine.
* Shared Materials
Link: http://gcfall2014.mintkit.net/Materials/
All Python source files inside Python.zip: http://gcfall2014.mintkit.net/Materials/Python.zip
All Blender projects are with prefix “Blender”
V Recommended Applications
* Enthought Canopy
A comprehensive Python analysis environment with easy installation and updates of the proven Enthought Python distribution.
Link to package: https://www.enthought.com/products/canopy/
* Blender
Blender is free and open source software, free to use for any purpose.
Link to package: http://www.blender.org/download/
V Game Programming and Designing Sessions
V Test Drive
A short introduction to Python interpreter and the Blender 3D environment.
V Blender
* Showcase: The Blender Ball, created by Aaron, Cameron, Jason, Noah, Seth and Zachary during the pre-college program in Brandeis University
BlenderBall.zip | MAINGAME.blend
Baidu Pan: http://pan.baidu.com/s/1ntJVjU5
* Press “P” to start the game engine/to play the game in Blender Game
Jenga.blend
V Python
* Introduce the basic input methods of input() and raw_input()
001-basicio.py
* Storing values into variables
with names to be descriptive.
V Short introduction to the FIRST operators
002-elementaryalgebra.py
003-circle.py
More from: http://www.tutorialspoint.com/python/python_basic_operators.htm
* = Simple assignment operator, Assigns values from right side operands to left side operand
* + Addition - Adds values on either side of the operator
* - Subtraction - Subtracts right hand operand from left hand operand
* * Multiplication - Multiplies values on either side of the operator
* / Division - Divides left hand operand by right hand operand
* ** Exponent - Performs exponential (power) calculation on operators
* With print(), to print out the calculated value
V Loop de Loop
Introducing if-statements with some operators, loops and objects within an 3D environment.
Get the applications installed on laptops and locate the FTP server to fetch shared materials.
V Python
* End of basic I/O and variables
* Short introduction to types of variables
_00-types.py
V Short introduction to comparison operators
Note: Boolean types in Python are CASE-SENSITIVE!!!
More from: http://www.tutorialspoint.com/python/python_basic_operators.htm
* == checks if the value of two operands are equal or not, if yes then condition becomes true
* != or <> checks if the value of two operands are equal or not, if values are not equal then condition becomes true
* > checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true
* < checks if the value of left operand is less than the value of right operand, if yes then condition becomes true
* >= checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true
* <= checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true
* An introduction to simple algorithms with if-statements
004-simplealgorithm.py
if condition:
code block
elif condition:
code block
else:
code block
* Introduction a while-loop
005-whileloop.py
while condition:
code block
* Integrating a while loop, make a start in coding a number-guessing game to play with computer
006-gussingnumber.py
Integrated functions: rand()
V Blender
* Start with an exploration in the Blender software, introducing objects(meshes and cameras)
* Moving/panning the view
* Adding objects to the startup scene: Cubes, spheres, planes, toruses, the spooky Suzanne et cetera
V Moving around objects
* Translate (grab) with “Hotkey G”
* Scale with “Hotkey S”
* Rotate with “Hotkey R”
V Now! Physics!
Finishing up the first game ever made with Python.
Introduction to native Physics engine inside Blender 3D, the Bullet Engine.
V Python
* Finish up the number guessing game
with self added features might be even better, for example, number of trails, or retry the game after finished.
* Introduction to scopes
V Blender
V Introduction with a cube, and a plane in below, switching to the Blender Game Engine
* Turning an object to rigid body or body with dynamics, affecting by the set-gravity field
V Introduction to the Logic Editor
* Sensors
Sensors are the logic bricks that cause the logic to do anything. Sensors give an output when something happens, e.g. a trigger event such as a collision between two objects, a key pressed on the keyboard, or a timer for a timed event going off. When a sensor is triggered, a positive pulse is sent to all controllers that are linked to it.
More from: http://wiki.blender.org/index.php/Doc:2.6/Manual/Game_Engine/Logic/Sensors
* Controllers
The controllers are the bricks that collect data sent by the sensors, and also specify the state for which they operate. After performing the specified logic operations, they send out pulse signals to drive the actuators to which they are connected. When a sensor is activated, it sends out a positive pulse, and when it is deactivated, it sends out a negative pulse. The controllers’ job is to check and combine these pulses to trigger the proper response.
More from: http://wiki.blender.org/index.php/Doc:2.6/Manual/Game_Engine/Logic/Controllers
* Actuators
Actuators perform actions, such as move, create objects, play a sound. The actuators initiate their functions when they get a positive pulse from one (or more) of their controllers.
More from: http://wiki.blender.org/index.php/Doc:2.4/Manual/Game_Engine/Logic/Actuators
V Adding basic controls to one cube
* To move forward/backward
* To turn left/right
* Experiments with other logic bricks available
V Start with simple modeling in Edit Mode
* Select and move around the vertices, edges and faces
* Start on the first Blender game project—The Maze Racer?
or anyway you wanna call it…
V “Me Got Cookie Touch!”
- Cookie Monster, Episode 4184, Sesame Street
Introduction to more arithmetic operators, and easier ways to assign value to variables.
V Python
V Calculating with basic arithmetic operators
* % Modulus - Divides left hand operand by right hand operand and returns remainder
Note: Don’t get confused that the modulus here is totally different from the one in A Level Statistics.
* // Floor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed.
V Moving into more assignment operators
* += Add AND assignment operator - It adds right operand to the left operand and assign the result to left operand
* -= Subtract AND assignment operator - It subtracts right operand from the left operand and assign the result to left operand
* *= Multiply AND assignment operator - It multiplies right operand with the left operand and assign the result to left operand
* /= Divide AND assignment operator - It divides left operand with the right operand and assign the result to left operand
* %= Modulus AND assignment operator - It takes modulus using two operands and assign the result to left operand
* **= Exponent AND assignment operator - It performs exponential (power) calculation on operators and assign value to the left operand
* //= Floor Division and assigns a value - It performs floor division on operators and assign value to the left operand
* Quiz on guessing arithmetic results with simple operators
V Blender
V Parenting objects
* Creepy Suzanne with strange looking gun
* Camera following Suzanne’s movements
* TBD.
V Breaks et Obstacles
* Blender
V Python
* A quick and fine introduction to the range() function
* Short introduction to for-loop
for iterator in range(): code block
* Introduction to the break method
* TBD.