Overview

Bring ’em Home Game

One of the first projects developed during the Master’s Degree program, receiving a grade of 30L (highest distinction). The game was created using the Blender Game Engine, demonstrating fundamental game design principles and engine mechanics.


Project Duration and Skills

  • Development Time: 2 months
  • Skills Acquired:
    • Game Design fundamentals
    • Game Engine theory and practice
    • Blender Logic Editor
    • Python scripting
    • 3D game prototyping

Game Description

A unique 3D platform game where players control a sphere tasked with guiding ducks to safety. The game combines escort mechanics with obstacle avoidance, as players must protect ducks from vultures while dodging cannonballs from moving cannons.

Core Gameplay Elements

  • Player controls a sphere in a 3D environment
  • Guide ducks to designated safety pens
  • Protect ducks from aerial vulture attacks
  • Avoid projectiles from moving cannons
  • Strategic use of landscape elements for protection

Game Mechanics

  • Duck Following System: Ducks track and follow the player when nearby
  • Stamina Management: Ducks have energy levels that need monitoring
  • Distraction Elements: Sweets can temporarily stop ducks from following
  • Message-Based Communication: Game elements interact through messages (mayfollow, iamTired, etc.)
  • Property System: Uses ‘busy’ property to manage duck escort status

Technical Implementation

Scene Structure

The game comprises four distinct scenes:

  1. Main Game Scene: Contains core gameplay logic
  2. Game Over Scene: Triggered when duck health reaches zero
  3. Time Up Scene: Activated when time limit expires
  4. Mission Complete Scene: Displayed upon successful completion

Interface Elements

Developed through individual prototypes:

  • 3D compass indicating nearest destination
  • Analog clock for time tracking
  • Life and stamina management system
  • Tracking system for explosions and projectiles

Development Approach

The project was built using a modular prototyping approach:

  • Independent prototypes for each major feature
  • Integration of successful prototypes into main game
  • Iterative testing and refinement

Technical Architecture

  • Logic System: Built using Blender’s Logic Editor
  • Scripting: Custom Python scripts for game logic
  • Event System: Sensor-Controller-Actuator architecture
    • Sensors for event detection
    • Controllers for logic operations
    • Actuators for game world manipulation

Code Example (arbiter.py)

import GameLogic as GL

# Get current controller and owner
cont = GL.getCurrentController()
own = cont.getOwner()

# Get sensors and actuators
msgask = cont.getSensor("mayfollow")
msglost = cont.getSensor("lost")
msgstopshootact = cont.getActuator("stopshooting")

def showCompass():
    compass = GL.getCurrentScene().getObjectList()["OBcompass"]
    compass.tracking = 1
    duck = GL.getCurrentScene().getObjectList()[own.duck]
    duckPos = duck.getPosition()
    compass.setPosition([duckPos[0], duckPos[1], duckPos[2] + 5])
    compass.setVisible(1)

def showStamina():
    staminabar = GL.getCurrentScene().getObjectList()["OBGreenBar"]
    staminabar.isVisible = 1
    staminabar.setVisible(1)
    redbar = GL.getCurrentScene().getObjectList()["OBRedBar"]
    redbar.setVisible(1)

def showLife():
    lifebar = GL.getCurrentScene().getObjectList()["OBGoldBar"]
    lifebar.isVisible = 1
    lifebar.setVisible(1)
    blackbar = GL.getCurrentScene().getObjectList()["OBBlackBar"]
    blackbar.setVisible(1)

# Handle follow request
if msgask.isPositive() and not own.busy:
    ack = cont.getActuator("follow")
    name = msgask.getBodies()[0]
    own.duck = name
    ack.setBody(name)
    GL.addActiveActuator(ack, 1)
    own.busy = 1
    GL.addActiveActuator(msgstopshootact, 1)
    showStamina()
    showCompass()
    showLife()

# Handle lost signal
if msglost.isPositive() and own.busy == 1:
    own.busy = 0