Code Samples

Here are some code samples, showing off some of my best work in some of my best languages.

C#

Eruption is my greatest game to date, and I’m proud of a lot of the code that I wrote for it. Here are a few samples.

Main game controller

Procedural level generator

Villager AI

Giant Rock AI

Flammable (what allowed things to be killed by the volcano)

Minotaur procedural maze editing tools.  You can read more about this project here.

3D rendered level builder

Maze editing tools

C++

Recursive Tic Tac Toe implementation, for the second attempt at making my game X’s and O’s and Black Holes.  Output from this version is the second group of images on that page.

Tic Tac Toe Board (CPP | HPP)

Recursive Extension of that Board (CPP | HPP)

Getting back to fundamentals, I spent some time doing basic data structures in C++.

Hash Table

Double Linked List

Array List

Ring Buffer

Java

Here is an implementation of my Recursive Tic Tac Toe project, using the Processing variation of the Java language.  You can view what it looks like as the first image on this part of my portfolio.

Recursive Tic Tac Toe

Advertisements

Eruption (Master’s Thesis) – 2015

Eruption is my Master’s Thesis, developed from November 2014 – August 2015 while I was studying under John Romero and Brenda Romero at UC Santa Cruz.  I served as the lead programmer, team lead, and producer on this project, overseeing two other programmers, a designer, a composer, and over a dozen artists.  For this project, I implemented many difficult systems, including all of the procedural level generation, artificial intelligence, game controllers, and much more.  We successfully shipped the Windows and Mac versions on schedule in August 2015.  You can watch a trailer below, but you should download and try Eruption for yourself.

Eruption was also featured at the 2016 MAGFest Indie Game Showcase, where it was very well received.  Due to this success, is now on Steam Greenlight.

promotionalImage_final

Screenshot BFR Apocalypse2_Island03

destruction

pointtally island1 island2 island3highscores

MIVS Selection Badge 2016 large

X’s and O’s and Black Holes – 2015

X’s and O’s and Black Holes is a side project I started during my Master’s, and it is still ongoing. It started as a technical exercise to see if I could code recursive Tic-Tac-Toe, that is Tic-Tac-Toe boards inside cells of other Tic-Tac-Toe boards. The first implementation was in Processing/Java (view source).

RTTT1

I received positive feedback from Brenda Romero and it started to look like there might actually be a really fun game in there, so I started over, building version 2 using C++ and the SFML library for graphics.  I wrote my own engine for the game. Brenda suggested that since Tic-Tac-Toe is a solved game, that my method of resetting any board that had a tie game wasn’t helping it at all. She suggested that I have a shooter or some other chaotic, unsolved game be the tie breaker.  I wrote my own version of the classic Spacewar to fill that void. It was at this point that I named it X’s and O’s and Black Holes. (view source).

RTTT2_improved

xobh1_space

Here you can see the first working implementation of the Spacewar part of the game.  The Black Hole is in white (to make it easier to see), and the projectiles from each ship are in blue and red.  There are blue arrows showing where each ship is.  These were all temporary art assets to get it working.

This version was coming along well, but having to build engine features and do the art was taking away too much time from building the game.  As a result, I started over again, this time using Unity 3D and C#.  During this conversion, I switched from the game being 2D to 3D.  As of March 2016, this version is still in development. (view source)

xobh_newBoard

Here you can see the current Tic Tac Toe board. It plays just like the original version, with the added mechanic of jumping to Spacewar whenever one of the games results in a tie.  This version uses a controller for input instead of mouse, so you can see the cursor allowing a player to place their piece glowing in the bottom right corner.

xobh_betterSpaceWar

This is the 3D Spacewar part of the game.  In both screens, you can see the black hole, and both ships taking aim at each other.  The ship on the left has fired a projectile, but it is about to be sucked into the black hole, as you can see on the right.  Whoever wins this battle will win the tie on whatever section of the Tic Tac Toe board is contested.

Adventures on the Red Planet – 2015

Adventures on the Red Planet is a tabletop RPG set on Mars in the year 2100, after humanity has established a handful of stable colonies on the surface, as well as asteroid mining operations in the nearby Asteroid Belt.  You can view the complete PDF of the rules, including over 1000 items, rules for combat, character creation and leveling up, and more. Pictured below is the Dungeon Master’s screen that I made for the game, independently of my team.

This game was developed as part of a class on system design from Brenda Romero. Three of my classmates and myself then proceeded to make a tabletop RPG in 10 weeks based heavily on Dungeons & Dragons as well as Dark Heresy.

Here is the assembled DM screen:

(Player’s side)

dm_screen_outside

(DM’s side)

dm_screen_inside

Close ups of the DMs side

dm_left

dm_middle

dm_right

Close ups of the Player’s side images

player_left

player_middle

player_right

The Chaos of Operations – 2014

The Chaos of Operations was a physical game I made for part of my Master’s program.  It is a math game about manipulating the order of operations to make your number as large as possible, while ensuring that your opponent’s number is less than yours.  Whoever’s equation evaluates to the highest number at the end of the game wins.

A friend of mine was so impressed with it, that we had a game jam and ported a simplified version of this game to be playable in a web browser.  You can play that version now.

Images below are of the physical copy of the game, as well as a couple screenshots of the web version.

ChaosOfOperationsPlaying

This is what Chaos of Operations looks like set up and playing. Player 1’s hand is on the bottom left, Player 2’s is on the bottom right. Each player’s equation is above their hands, with spare parenthesis in an easy-to-reach pile above them. Players take turns taking one operator and one number from their hand, and inserting it in either their or their opponent’s equation, with the goal of ending the game with a bigger number than their opponent. Player 2 tried to give themselves an early lead by adding 20^10 to theirs, but Player 1 was crafty and added a minus sign before it, turning it from a huge boost to a huge liability. This is still early in the game, and Player 2 can easily come back.

chaos_screenshot

This is a screenshot from the digital version of the game.  You can see that the layout is very similar to the image above, with some affordances made for input methods and display limitations of it being digital.  Player 1 tried to start strong by adding 19^19×18 to their equation, but Player 2 turned it into a massive negative number that put Player 2 way ahead.  Like the example above, Player 1 can still make a comeback as the game has just started.

What follows below are more pictures of the physical copy of Chaos of Operations.

IMG_20141219_181559_116IMG_20141219_181351_954IMG_20141219_181343_026

Minotaur (Procedural maze generation tools) – 2015


Minotaur is a procedural maze generator and editor that I wrote for my Generative Methods class in winter 2015.  It is 4 programs combined into one: a C++ maze generator that uses a graph and Prim’s algorithm to create the maze, an editor written in C# that accepts the files output from the C++ program and allows you to edit them with help from the computer, a renderer written in Unity with C# that will visualize your mazes in 3D and allow you to explore them, and a Python script to manage save files and make all the programs talk to each other so you don’t feel like you are running 4 programs and simplify the whole process.  You can view the source code on my GitHub.