====================================== Starting the Blender Game Engine (BGE) ====================================== .. index:: Blender Game Engine, BGE .. |a| image:: /images/all/blender-game-engine/leading-image-100.png :width: 100px Objectives ========== .. tabularcolumns:: | c | l | :border: none +-------+-------------------------------------------------------------------------+ | |a| | Programming games in Blender is possibel in two ways but starting the | | | Game Engine, in short BGE or *bge*, works allways the same. | | | Some pitfalls are discussed, therefore the fun factor is still at a | | | hight level :-) | +-------+-------------------------------------------------------------------------+ The *bge* module ================ The *bge* module contains nearly all you need to write a game in Python. But if you write .. code-block:: python import bge in the interactive interpreter or a script, which you start with »Run Script«, you'll get the Error: :: ImportError: No module named 'bge' | That's because the bge module can only be imported, if the Blender Game Engine is running. Start BGE the right way ======================= 1. Change the Render Type from »Blender Render« to »Blender Game« .. image:: /images/all/blender-game-engine/change_render_type.png 2. You can start the Blender Game Engine now by clicking »P« while the cursor is over the »3D-View« or by clicking »Start« in the *Render Properties*. .. image:: /images/all/blender-game-engine/start_bge.png