Carball Pinball 7



When you press this button ( image above), in the Buttons Bar, you enter the heart of "game" creation. But not only "games" can be made, GAME BLENDER is Web interactive multimedia oriented.
Ok, select an object and press the button!



I'll show you the basics of the work with the Logic Bricks, another fantastic function of BLENDER, that enables people who don't have programming skills ( like me) to create "games" ( or interactive content).
You have 3 Logic Bricks categories. Sensors, Controllers and Actuators.
You add Logic Bricks by pressing the Add button, and delete them pressing the little cross button at left side. You link the Logic Bricks clicking the yellow sphere, holding the left mouse button and move the cursor over a yellow ring. You can cross the link lines and link one brick to several others, and the inverse (see image).
Sensors have "Pulses". If none of the little squares at top left are enabled the pulse is "fired" one time. If you press the first square (positive pulse) you enable the f: counting ( the game engine will "fire" pulses acording to the f: setting, in frames/s). Basically Sensors get information from the object, send it to Controllers that will analize it, do something or pass it to the Actuators that will perform an action. When scenes became complex with many Logic Bricks, the top blue buttons are useful. The names are explicit. The first, show the bricks of the selected object, the second shows those of the active object and the third the bricks linked to those of the selected object.



If your object must "do" something in the game, then, he's an Actor!
Selecet it and enable the Actor button. This will show more two buttons, Ghost, your object will not react on collisions, and Dynamic, your object will have physics law propertys.
All the objects can have Propertys, that you choose, by clicking the tinny white square when you Add a property (see image at above right).



Ok, let's start making a game...but, where we'll start? It's the main difficulty. You don't have the coding problem, but still have to planify your game. There's diferent ways of getting the same result. Who's the better?
Well, honor to our main actor: the Ball. Select it and go to Real Time buttons. Enable the "Actor", "Dynamic" and "Rigid Body" buttons.



Set Size: acordingly to the size of your sphere ( see image above), the doted line must have,m more or less, the same size of the sphere). Add a Int property and name it ball (capital and small letters are not the same thing), with a 0 value. Enter Face Select mode, select all faces and enable "Ob Col" in the Paint buttons (this will make the ball inherit the material color).



. Go to Material buttons window, add a new material with the default grey, set Spec and Hard near 1 value, and enable the DYN button. This brings physics property settings to the current material. Set Restitut to 0.5. This will make the object with this material bounce when colliding with other objects.



The basic characteristic of a Pinball game is that the game plane is inclined. That way when you push the ball with the flipper, she returns. Obvious. Same thing will happen in the BLENDER game engine, that, have a Physics engine built-in. You have enabled the Dynamic to the ball, now you only have to incline the Pinball table, BLENDER will do the rest. Select the table and rotate it 10º. All the objects are parented so they will follow.



It's almost always nice to see "real things happen". Let's do that. Select the launcher object add a "Keyboard" Sensor, with a O key ( or other key), a "And" Controller and a "Ipo" Actuator, with "Play", "Start" at 1, and "End" at 20. Now place the ball at start position ( see image above), press Alt-Z keys to enable your beautiful textures, press P key, and...nothing happens?? Be cool!!
Press the O key ( or other key that you've assigned before), and the launcher will kick the ball, correct?
I hope yes!! It works? Yeahh, we have a game!!
Don't work? Call BLENDER hotline...no, no, i'm joking.
Sometimes the cause of problems it's just a little detail, so be patient, and check two or three times all the "data".
Now, to "play" we need the flippers working. Select them, and make the same Logic Bricks setup of the launcher, with S to left flipper and L to the right in the Keyboard Sensor. Adapt the "Ipo" Actuator to flipper animation and choose Flipper motion. Now press P key, and try them.