Christopher Canfield

Christopher D. Canfield


About

I'm a software engineer in New York, NY, where I live with my wife, Caitlin, and son, Patrick. I work at Interboro Labs, where I'm responsible for taking applications through their full life cycle: from conception & design, to implementation, to release and continuous improvement. My current development work is focused on Android, for which I use Java and C++ (Android NDK). I am also a course facilitator in the MET Computer Science Department at Boston University.

Prior to moving to New York, I worked as a Graduate Assistant at Boston University's Metropolitan College Department of Computer Science (see our paper presented at the 2015 ACM Conference on Learning at Scale), and as an application developer, business analyst, and fund accountant in Boston's financial services industry.

I hold a Master of Science in Computer Science degree from Boston University, and a Bachelor of Arts degree from Providence College, where I majored in Political Science.

Projects & Research

A small selection of projects I've worked on over the past few years.

Ant Colony Simulator

C++ Artificial Intelligence

Source | Windows Executable | Presentation | Documentation

Ant Colony Simulator
Click for more Ant Simulator screenshots

The Canfield Ant Simulator simulates a colony of ants, with a focus on the ants' search for food. Ants lay pheromone trails to notify other ants about food, as in the real world. Over time, this gives the ants the appearance of having a higher-level coordinating intelligence that is instructing all ants according to group goals, though in reality each ant is fully in control of itself, and does not have any direct communication with other ants. The project involved the creation of the following components:

  • World Creator: random map generator
  • Navigation Graph, with nodes & edges. Ants may lay pheromone trails on edges.
  • Ants: goal-based agents using the State pattern
  • 7 ant goals and subgoals: AntMoveToNode, AntFollowPath, AntFindFood, AntGoHome, AntExplore, AntForage, AntEat
  • A* algorithm implementation
  • GUI processing framework using the Observer pattern
  • 123 C++ unit tests (Microsoft CppUnitTestFramework), 23 Java unit tests (JUnit), and 3 integration test applications, in addition to the final simulation

The project was created as part of the BU MET CS 664 Artificial Intelligence course. See the github page for more information, including the code, binaries, documentation and the pdf of a presentation I gave.

The application was implemented in C++, and used the following libraries: SFML, Boost, Poco

Bubolo

Java Computer Networks Computer Graphics Design Patterns

Source | Cross-Platform Jar | Presentation | Wiki

Bubolo

Bubolo is a real-time multiplayer network game inspired by the 1987 game Bolo. It was initially developed over a period of approximately three months for the BU MET CS 673: Software Engineering course with a team consisting of 9 computer science and computer engineering students who had widely varying backgrounds. Features include:

  • High-level design uses the well-known Model-View-Controller pattern
  • Game entities are controlled by Controllers and observed by Sprites. Entities have no knowledge of either Sprites or Controllers.
  • Simple AI, collision detection, efficient 2D graphics, audio, user input, allows for n network players
  • The network system makes use of the Command pattern to send actions to other players. This worked well, since we used TCP, which guarantees packet delivery and order. Typically, UDP is preferred for fast-paced games, but TCP provided very good performance when combined with extensive use of dead reckoning (client-side movement interpolation to reduce perceived latency).
  • Implemented using an Agile development methodology coupled with a strict code review process. This resulted in a well-designed, extensible, maintainable and reliable system.
  • 364 unit tests + 13 integration test applications + 2 end-of-sprint test applications

The following systems were designed and/or implemented by me:

  • The MVC relationship between the Graphics System <-> the World/Model System <-> and the Controllers [Design]
  • Graphics system [Design; Primary implementer]
  • Network system [Design & Implementation]
  • Controller system [Design; Partial implementation]
  • Audio system [Design & Implementation]
  • In-game UI Screens (i.e., those inside the OpenGL window) [Design & Implementation]

The project was implemented in Java, which was the best known language among the members of the team. We utilized a number of libraries, including libGDX (abstraction layer for graphics, sound, input), Mockito (mock-object creation for unit tests), Apache Commons Lang and Commons I/O, Google Guava, and JSON.simple.

Terrain Generation

Java Computer Graphics

Terrain Generation
Click for more Terrain Generation screenshots

Research into the Diamond-Square and Particle Deposition algorithms.

The algorithms were implemented in Java. Two applications were created:

  • The first application enables the user to set a number of variables and generate a heightmap, rendered in 2D, using the diamond-square algorithm. The map can be edited by using the dropping particles (Particle Deposition), which increase the height of the target area and surrounding areas. Once the user is happy with the results, the heightmap can be exported as a grayscale image. This application uses the libgdx library.
  • The second application processes the grayscale heightmap and renders a 3d world, which the user can explore in real time. This application uses jMonkeyEngine.

Latency & State Consistency in Networked Real-Time Games

C++ Computer Networks

Paper | Presentation

Network Latency Application Screenshot

Research on reducing the impact of network latency in real-time games. This research helped inform the design of Bubolo's multiplayer functionality.

Lost World WebGL Prototype

JavaScript Computer Graphics Web

Run in browser

Lost World Screenshot

My "Lost World" Computer Graphics project, which was implemented over a one week period in October 2013. It has the following features:

  • Implemented in JavaScript and WebGL, with the three.js library providing an abstraction layer over WebGL
  • Moving, animated flying creatures and two types of non-flying creatures
  • Textures & lighting
  • The land-based creatures follow a navigation grid. The smaller creatures follow the larger creature.
  • Scene graph (which incorporates and extends the three.js scene graph)
  • The camera is controlled by the keyboard, which is a bit awkward (see my First Person WebGL Prototype for an implementation of the camera with mouse look)

Running this scene requires a relatively powerful computer.

First Person WebGL Prototype

JavaScript Computer Graphics Web

Source | Run in browser

First Person WebGL Prototype Screenshot

This project was created as part of the CSCI E-72 Computer Graphics course that I took in Fall 2013. This is a first person game prototype, with an indoor and outdoor area. It has the following features:

  • Implemented in JavaScript and WebGL
  • Textures & lighting
  • Particle systems
  • Collision detection
  • User interaction, such as opening doors and shooting projectiles
  • Moveable camera with mouse look (though pointer lock wasn't implemented)
  • Zone-based system to reduce cost of collision detection and to turn particle systems on or off
  • Billboarding

The three.js library was used to assist with WebGL. The textures are from Paul Bourke's texture library

A* Maze Solver

Java Artificial Intelligence

Source

A* Maze Solver Screenshot

The Maze Solver is a Java application that solves mazes using the A* search algorithm.

Feature Overview:

  • A* algorithm implementation
  • Loads maze definition from text files: passable nodes are displayed in white, while impassable nodes are displayed in black
  • The path generated by A* is displayed in green, as well as printed to the console
  • The set of searched nodes is displayed in blue