Final Project - MATH 155B Student: Bradley Wong

Stewie vs. Bender

  • Description

    This program added on to my CSE 167 final project. Newly added features are
    jumping using quaternions and now Bender has an attack mode where he
    goes after Stewie. Also, I made a new texture for the floor and Stewie's
    clothes are different. Instead of his regular overalls he is wearing a yellow
    jumpsuit like Bruce Lee wore in the movie "Game of Death."

    Download the executable here

    Jumping with Quaternions and some AI

    A quaternion was created for the peak of Stewie's jumps. Slerping takes place from the start of the jump
    to the peak and then from the peak back to the floor. When Stewie jumps, he also kicks. He does a
    round house kick and a forward jump jacknife kick both using different quaternions. Bender can now track
    down Stewie by locating his position and rotating towards him; and once Stewie is in Bender's sight
    he closes in on him. When Bender reaches Stewie he starts to kick him like the picture shows below.

    Other Comments

    I would've liked to have a reaction when one character hits another, but for now there is none. Also, sometimes
    Bender gets confused and goes in the opposite direction of Stewie and he can only rotate one way in the AI mode.
    The characters can get stuck in the same positions sometimes, pressing '7' will separate them.
    Controls:

    Bender
    i - walk foward
    k - walk backward
    j - rotate counter-clockwise
    l - rotate clockwise
    p - kick

    Stewie:
    w - walk foward
    s - walk backward
    a - rotate counter-clockwise
    d - rotate clockwise
    q - punch
    'space bar' - jumpkick

    Arrow Keys Control the viewpoint

    Toggling Effects
    t - Toggle Bender Attack Mode
    7 - Separate characters
    0 - smooth/flat shading
    1 - enable magenta light
    2 - enable white light
    3 - enable blue light
    8 - lighting mode
    9 - Wire Frame Mode