Jack P. Oakley Portfolio Game Programmer/Designer

Star Wars: Jedi Training VR

Using C# in Unity and SteamVR, I created a Star Wars game where the player remains stationary and deflects lasers coming from an infinite spawn of astromech droids.  I obtained most of the assets from the Unity Asset Store and sketchfab.com, a few of them I created myself using planes, boxes, capsules, and combining downloaded assets.  I designed all three scenes and the gameplay level and its layout.  I wrote all of the code that makes up this game.  There are too many scripts to display them all here, so instead I have taken a video of the game with a win scenario and a loss scenario and separated it into smaller videos so you can view the parts for which you are most interested.  I also included the script that generates the random text flashing on the broken screen.

This first video shows the opening scene to the game (Classic flying Star Wars text, but in VR).

This next video shows the game’s objective and controls.

The following video shows the scoring and credits to the game as well as how the player begins the game.

The win scenario had to be sped up and split into multiple videos due to upload size. These two videos show the win scenario at 2x speed.

This last video shows the lose situation at normal speed.  The C# code for the flickering text screen follows thereafter.

//Flicker text by Jack P. Oakley
//This script changes text randomly and causes it to flicker at random intervals

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/****************************************************************************
* FlickerText class:                                                        *
* PURPOSE: Runs the flickering text functions                               *
****************************************************************************/
public class FlickerText : MonoBehaviour
{
    private const int MAXDUR = 25;
    private string[] words = {"&  @ 3  # ! ~` \n((8),\n  <> . }", "Error.",
		"-   - -   -  - - -\n . . -  .  -  . \n . ; ;  ' ..    -", 
		" =    = ====  \n =  = =", "Hello World", "B. . .... zerp", 
		"RRRRr - \n D", "R2-D2", "JJJjjediii\nTrrrraain..ng", "Timed!", 
		"Errr\nEerRor", " " };
    private System.Random rand;
    private string displayText;
    private int duration;

/****************************************************************************
* Start function:                                                           *
* PURPOSE: Initializes the data members, called before the first frame      * *    update                                                                 *
* IN: none                                                                  *
* OUT: none                                                                 *
****************************************************************************/
    void Start()
    {
        rand = new System.Random();
        displayText = words[1];
        duration = MAXDUR;
    }

/****************************************************************************
* Update function:                                                          *
* PURPOSE: Drive updates to changes in the variables, called once per frame *
* IN: none                                                                  *
* OUT: none                                                                 *
****************************************************************************/
    void Update()
    {
        if (duration <= 0)
        {
            duration = rand.Next(MAXDUR) + 5;
            int index = rand.Next(words.Length);
            displayText = words[index];
        }
        GetComponent<TextMesh>().text = displayText;
        duration--;
    }
}