Craig's Java Projects

Java Projects

Here are a few Java projects that I've made. Most of them are available as *.jar files. You'll need the Java JRE to get them to run.

Space / Tank Game

Space / Tank Game

A space / tank game. This is a game I wrote featuring either spaceships or tanks. It's your choice. With a little work, you can play your friends on the internet too. Here's a more thorough description of the program.

The program makes use of:

  • Sockets / networking
  • Threading
  • Lots of functional interfaces and lambda expressions
  • Swing

Reverse Polish Notation Calculator

Heliomug Calculator Screenshot

My Reverse Polish Notation Calculator. If you don't know about it already, Reverse Polish Notation is great! It lets you work quickly and is convenient for saving previous calculations and quantities for later use. I was having trouble finding a nice implementation on one that included macros, so I decided to make one myself.

It works pretty well, but it helps if you have a number pad on your computer. It's also got macro recording capability, which is great if you have common sequences of keypresses.

Simple Musical Keyboard

Simple Keyboard Recording Visualization

A simple musical keyboard. This is a simple keyboard program that lets you play notes by pressing keys on a computer keyboard. I made it because I wanted a portable, customizable way to play out melodies. You can pick out the instrument you like and pick from a few keyboard layouts. You can also record and playback what you've played. All of the settings as well as the recordings are saveable.

The program makes use of:

  • Lots of functional interfaces and lambda expressions.
  • Midi music.
  • All kinds of GUI mumbo jumbo.

Ear Trainer

Ear Trainer Screenshot

An ear trainer program. This is a program to help you with ear training. The first tab is to help you identify different kinds of chords, the second tab is to help you identify chords in a given key, and the third tab is to help you identify intervals between two notes. Here's a slightly more thorough description of the program.

The program makes use of:

  • Lots of functional interfaces and lambda expressions.
  • Midi music.
  • All kinds of GUI mumbo jumbo.

Traffic Simulator

Traffic Simulator Screenshot

A Traffic simulator program. There are little circular cars that pick a random destination, decide how to get there, and try to navigate through the map without hitting any other cars. If there are too many cars, sometimes they get in a traffic jam. The program is a little silly, but it's fun to watch.

The program makes use of:

  • QuadTrees for collision detection / collision avoidance.
  • Threading to run each vehicle and each stop light
  • Graph algorithms for for vehicles to figure out how to get to their goals.

Genome Query Displayer

Results Graph Screenshot

I wrote this Genome Query Displayer to read a large data file full of readings and display the results of queries on those readings. Each reading consisted of a chromosome, start offset, end offset, and value. My program read the raw text files with data, structured the data so that it was easy to run fast queries, then displayed the results of those queries in various ways. I was explicitly forbidden from using databases.

The program makes use of:

  • B-Trees to store large amounts of readings.
  • Lambda expressions (new in Java 8) to extract features from readings.
  • Swing for the GUI
  • Threads to load and process the data more quickly
  • Regular Expressions for file parsing
  • Abstract classes, interfaces, polymorphism, factory classes, singletons, enums, file input/output

Conway's Game of Life

Game of Life Screenshot

My Game of Life Simulator. It's a program to run a simulation of Conway's Game of Life. The game is super interesting. You can save and load boards and so on.

Drum Machine

Drum Machine Screenshot

A little drum machine. It plays through midi output. You can save an load loops, but I really need to add the ability to sequence loops together to make a song.

Keyboard Displayer

Keyboard Displayer Screenshot

Keyboard displayer. I made it to help my students learn how to type. It turns out that if you can't type without looking at the keyboard, you'll make very slow progress. Lots of my students will type a bit, make a mistake, delete a bit, try to retype what they were going for in the first place, make another mistake, etc. The idea behind this display is that it'll stay on the screen so the students can practice not looking at their hands when they type. It stays on top of all the windows too.

Color Demo

Color Demo Screenshot

Color Demo to show how red, green, and blue mix to make colors on monitors, tv, the web, etc.

Number Base Demo

Number Base Demo Screenshot

Number base demo I made to help my students learn about different number bases. Thinking more about, maybe I should show the numbers as graduated cylinders or something where the capacity is the base and the level is the digit.