Introduction to Game Engine
Blender has its own built in Game Engine that allows you to create interactive 3D applications. The major difference between Game Engine and the conventional Blender system is in the rendering process. In the normal Blender engine, images and animations are built off-line – once rendered they cannot be modified. Conversely, the Blender Game Engine renders scenes continuously in real-time, and incorporates facilities for user interaction during the rendering process.
In Blender, games are constructed as scenes involving objects (actors) each having their own behavior. This behavior is controlled by logic, and this responds to events such as inter-object interactions (eg. collisions) and user commands. Constructing a game involves building the actor objects, then setting up their logic.
Building a Simple Game
The Blender Game Engine (BGE) interface may seem complicated at first, but there are many tools to help you. The Game Logic Screen Layout gives a useful start in finding your way around.
The BGE incorporates a powerful high-level programming tool, the Logic Editor. This offers an easy to use visual interface for designing interactive applications without any programming language knowledge. Its main focus is Game Development, but it can be used to create interactive 3d software for other applications, such as interactive 3d architectural tours or educational physics research.
There are four major steps in building a simple game using the BGE:
- a) set up objects in the game, using the Blender modelling facilities.
- b) use the Logic Editor to add logic bricks to the objects in your game to define their behaviour, and the effects that user activities (using keyboard, joysticks etc) will have on this behaviour.
- c) add one or more BGE camera(s) to capture the views of the game-play as required, and set these to suit any special environment in which the game will be displayed (eg stereo).
- d) start the Game Engine to operate your game. Games can also be exported for use in a Standalone player.
The BGE contains a number of more advanced features to assist the game designer in modelling reality. These include adding static and moving textures, backgrounds and environments, and changing scenes. One of the major features is the inclusion of Physics which can apply basic physical effects (gravity, collision mechanics etc) to objects when the game is played.
If you prefer to write games using Python, the game engine also has its own Python API, separate from the rest of Blender, which you can use to write scripts to control your game.
Game Engine Index Proposal