This is part 1 of a tutorial on the Blender Game Engine in 2.48a. The reader should have basic modeling skills and know how to navigate Blender. Tell me if I don't explain something well and if I should continue with follow up tutorials about scoring, menus, glsl, etc.
We will be making a game where the player (a cube) has to push a ball onto a goal (exciting!). First, add a plane and scale it 2 on the x axis and 5 on the y axis. You can press N to bring up the Transform Properties dialog. Here you can easily enter in numbers for scale, location, and rotation. Move the cube up so that it is sitting on the plane and at the back of the plane like so:
Now go to the Logic panel (F4 or the pacman icon). Click bounds and change it to box. Change static to dynamic and change Damp and RotDamp to 0.8. This makes it so our cube can have sliding motion. The greater the damp value, the more slowed down our cube is from friction. In 2.49 a value of 1 makes it so the cube cannot move.
Make sure our cube is selected and next to it's name click Add. These are input sensors, and we want a keyboard sensor, so click Always and change it to Keyboard. Click the Key field and press up arrow, then rename the sensor to 'up' (don't type the 's).
Now add a Controller, the next item to the right. Leave it as AND and name it to 'up pressed'. Next add an actuator, the last item. Here is a breakdown of the motion actuator:
Set the LinV in the local y direction to 2.5 and rename the actuator to 'move forward'. Now click one of the gold circles and drag the mouse to connect them like so:
Now to add our ball. Add a Uvsphere with 8 segments and 8 rings, and make sure it is above the plane. In the Editing panel (F9) you can set it smooth to make it look prettier. In the Logic panel, change it from static to Rigid body and set the Damp and Rot Damp to 1.
Now to set up the camera. Select the default camera and press alr + r and alt + g to move it back to the origin. Set it's x rotation to 60, y location to -7, and it's z location to 5. Then parent the camera to the cube by typing Cube in the Par: field in the Transform Properties window.
You can go to camera view (numpad 0) and press p to try out the game. Let's add a second level and a jump pad for the ball. Using extrude, I editing the plane like this:
Add another plane, scale it to 1.2, and move it to the base of the ledge.
Go to the logic panel and add a sensor, controller, and an actuator. Make the sensor Collision and set the property field to 'ball'. Change the actuator to Message, set the To: field to Sphere and Subject: to jump. Now connect the gold circles. Select our ball and add a property (by clicking Add Property) and name it ball. Now add a sensor, controller, and actuator. Change the sensor to Message and set the Subject field to jump. Leave the motion actuator, but change the LinV to 2 in the y and 12 in the z and click add.
If you play the game now, you should be able to push the ball onto the jump pad and it should jump up to the next level. Now let's modify it so the player can be jumped too. Select the cube and add a property named player. Select the jump pad and add another sensor, make it Collision and set it's property to player. Add a controller and connect the sensor to it. Add a Message actuator and set the To: to Cube and the Subject to jump.
Select the player and add a message sensor with subject jump. Add a controller and motion actuator. Set the LinV to 10 on the local z and click add.
Now for the goal that ends the level. Add a plane and position like so:
Add a collision sensor, set the property to ball, and connect it to a controller and scene actuator. Change Restart to Set Scene.
Now we need to add another scene. Name the current scene level 1 and the new one (make it empty) level 2. Set the scene actuator to level 2.
Select the camera and cube and press ctrl + l → to scene → level 2. This makes it so the player cube and camera will be in the next scene, exactly as they are in this one. If we move them in any scene they are linked to, the change happens in all scenes they are linked to. Go to scene level 2 and add a plane and position it under the player (so he doesn't fall when he gets there).
Go back to level 1 into camera view and try out the game.
Here is the .blend file I made. Note: I added colors and adjusted the lighting, which is not mentioned in the tutorial.







