Tag Archives: game logic

Loading Game Levels and Using the Python Global Dictionary

A new video tutorial has just been uploaded showing how in the Blender game engine you can load a next level stored in a different file.

The tutorial also shows how information can be passed to the new level (in the tutorial a score). To do this the ‘global dictionary’ object is used (in Python bge.logic.globalDict), which is a relatively easy way to pass information between objects (and files) without having to send messages.

The original ideas (and files) were taken from the Blender book ‘the Blender Gamekit 2nd Edition’ which was written for version 2.49 of Blender. The files are adapted to work with 2.5x and are demonstrated in the tutorial, then a simpler version is worked through.

Click the links for the tutorials –

Blender 2.5 Game Engine Tutorial How to Load a Second Level and Pass a Score to it Part 1 & Part 2

The files created in the tutorial – level1.blendlevel2.blend two levels of a game (dummy game) both must be saved in the same folder.

These are the files adapted from the Gamekit book – GlobalDict_L1b.blendGlobalDict_L2a.blend as above two levels of a game (dummy game) both must be saved in the same folder.

New Tutorial – Introduction to the Game Engine Making a Simple Ball Game

A new tutorial showing how to use Blender version 2.56 to make a simple ball game from scratch.

The game consists of a ball resting on a plane, by pressing the arrow keys the plane rotates and the ball rolls. The object of the game is to get the ball to roll into holes made in the plane.

The tutorial shows how to use the logic editor window, detecting the pressing of the arrow keys and rotating the plane.

The sphere is added to the scene and its physics properties need to be set.

Click here for the tutorial page.