ThisBindle::Code::Java

A large portion of the code I've written is in Java, which I first started working with in 2000 at ThoughtWorks.

Kessel

Status: Version 0.2.0 - Just barely playable. Made the bots smarter from version 0.1.x.
The game mainly suffers from not being that fun yet. It's as much of an exercise as anything else, but clearly it'd be nice to make something actually worthwhile. I'm still holding out hope that some levels and general game-play tweaking can cause some big improvements. If not, the basic concept may need to be seriously retooled.
Description:
Kessel is a game loosely based on George Lucas not knowing what a Parsec is. Nothing shameful in and of itself, but perhaps he should have looked the word up before using it. Didn't he know that millions of nerds would obesess over every line he was writing!?
In Star Wars, Han Solo answers doubts about the Millenium Falcon's speed by boasting that it once made the Kessel Run in "less than 12 parsecs". I had heard that this mistake was later retconned by stating that the Kessel Run passed through a field of black holes, and so the fastest route was also the shortest route through the gravity-warped spacetime amongst said black holes.

Recently, I was looking at the "Advanced Java" track of cs11, whose main purpose was to write a game where a ship must pass through some number of target zones in as little time as possible. It occurred to me that a Kessel Run game might be kind of fun, or at least, fun to write.

The Game:
Some time ago, in a place where the physics weren't quite right, but most people didn't know enough to care:
Tang Mono was the most wanted smuggler in the galaxy, thanks to his ship, the Centurion Osprey, and a wardrobe comprised mostly of chest hair and vests. Now you can relive his most famous exploit, the Kessel Run, from the comfort of your home... no vests required.

Kessel is a torroidal piece of space riddled with black holes. The only reason to enter it, aside from a general interest in topology, is to harvest the bountiful cargo that passes through it. Kessel is constantly intersected by hyperspheres (due to something wacky in phyics I guess) from, lets say, some other dimension. Since the hyperspheres exist in higher dimensions, they're valuable. Yeah, that's the ticket.

Anyway... ships entering this 2D space can (somehow) pick up these things by running into them, and then get paid for them by passing through a drop zone. Some of the spheres can even be used to alter your ship. Ships can survive being sucked into a hole, but lose all their cargo, and must pay to be put back into the Kessel space. If this made any sense, you're probably high and should get a damn job...

Controls:

How to play:

Source:
kessel_0.2.0_source.tar.gz

Jar file:
Run this as 'java -jar kessel.jar'

What's next?

UpStream

Status: On hold since Aug 2005

Description:
Upstream is a tool designed to analyze Omaha Hi-Lo Poker.

Omaha Hi-Lo is basically Texas Hold'em with four pocket cards instead of two, and where the best hand splits the pot with the worst hand. Due to this added complexity, there's not much information on how to play each of the 16,432 equivalency classes of four-card pockets.

Omaha is a good trap for Texas Hold'em players, who sit down and play like they're the only ones that got four cards. Given that, and since the little info that exists on how to play Omaha disagrees, the game seemed like a perfect target for statistical analysis.

UpStream was an ambitious summer project that was put on hold when school started up again. Since then, it's been sidelined by a lack of time and a lack or motivation, since most poker sites won't even take American money anymore. The original goal was to be able to make $20/hr while bouncing around various poor countries, so if I ever expatriate, it may be revived.

Source:
Below is the source and documentation for the backbone of the app. Basically just the classes for modeling the game. They might be useful to anyone writing a poker app in Java. The project progressed beyond this point, but it got kind of complicated and I'd like to keep it under wraps in case the poker craze takes over again and I want to release it

UpStream.tar.gz
UpStream JavaDoc

Bezier Curves

Link to Applet:
Bezier Curve Applet

Description:
This was the first lab for cs175, a CS/Applied Math class on B-splines. I didn't have time to actually stick with the course, so this is about as far as I got. The applet recursively approximates a Bezier curve based on given control points using Bernstein basis polynomials via de Casteljau's algorithm.

The applet is easy to break because it was designed to show the application of the algorithm rather than to be used by the public. Somewhat interesting nonetheless.

Source:
Bezier.tar.gz

Reverse Missle Command

Link to Applet:
Reverse Missle Command

Description:
This was an extra-credit submission for the Missle Command lab in CS2. The assignment was to write the game logic for Missle Command. Most of the model/view was written by the TA's, since the students weren't expected to know Swing/AWT that well.

In standard Missle Command, bombs rain down on buildings and the player clicks on points on the screen to target missles to protect said buildings. The CS2 version has a power bar that is decreased by firing missles, and refills with time. The radius of the missle strikes is proportional to the current power.

The extra credit assigment was to somehow change the game creatively.

Reverse Missle Command: