Graphics Reference
In-Depth Information
Chapter 15
Making Things Happen in the Game Engine
Now that you've created a character and a simple environment for use in the game engine, the next thing you
need to know is how to add user interactivity. The Blender Game Engine (BGE) has several ways in which in-
teractivity can be programmed into a game environment. In this chapter, you will learn about Blender's built-in
game design tools: logic bricks.
Logic bricks have the advantage of using Blender's built-in graphical user interface to implement interactive
functionality. For nonprogrammers, this affords an easy way to get started with game creation without needing
to know any programming. For greater scalability and versatility, Python can also be used, which is the topic of
Chapter 16, “Python Power in the Blender Game Engine.” Using Python in the game engine also relies on logic
bricks to a certain extent, so regardless of how you ultimately want to program your Blender games, you will
need to be familiar with the logic brick system.
In this chapter, you will learn to
• Control characters and scenes by using logic bricks
• Use properties, messages, and states to create complex interactions
• Work with textures to create dynamic text and in-game 2D animations
• Incorporate sound effects into your game environment
Working with Logic Bricks
Logic bricks are the BGE's way of controlling how user input controls in-game events and how those events in
turn control other events. Using logic bricks, you can make a character respond to your keyboard input, trigger a
levelchangewhenacertainnumberofpointsarecollected,andevensetupsomebasicartificialintelligence(AI)
behavior for your character's enemies.
In this chapter, you'll also read about working with rigged characters, properties, and other functionality spe-
cific to interactive content and game creation. Only the very basics of working with rigid bodies and game phys-
ics are touched on here. If you are interested in setting up more-sophisticated rigid body interactions or in using
BGE rigid body behaviors in your Blender animations, I recommend that you refer to Chapter 8, “Bullet Physics
and the Blender Game Engine,” for more information on those topics.
Theideabehindlogicbricksissimple.Logicbricksenableyoutoassociatecause-and-effectrelationshipsand
action-reaction behaviors with objects in the game environment. In this chapter, you'll learn how to work with
logicalrelationshipsthatarebuiltintotheBGElogicbrickssystem.InChapter16you'lllearnhowtoexpandthe
logic to include Python scripts, leading to countless new possibilities for game design.
Search WWH ::




Custom Search