Games - Work & Education - Films & Stories - Misc. Programming
About Me - Résumé - Code Samples - Blog - Contact

Cosmoteer

Download

Development Blog

Cosmoteer is perhaps best described as a cross between the game SimCity and the TV show Battlestar Galactica. It is a spaceship simulator in which players build spaceships SimCity-style by placing individual parts onto a square grid and then battle other ships to earn money, which they then use to further improve their own ship. As a prototype it's somewhat rough around the edges (and the art is all temporary programmer art), but it's fun to both build ships and battle enemies.

As in SimCity and Battlestar Galactica, it's not the city or spaceship that is the true focus; the people inside the ships are the players' most important concern and are the true focus of Cosmoteer. Most systems on a ship must be crewed by one or more people. Additionally, supplies such as ammunition and power must be carried throughout the ship by the crew, meaning that the player must be mindful of the ship's interior layout and traffic patterns so that the crew don't get congested in tight corridors or have to travel too far.

Programming Cosmoteer has proven to be a great challenge with several very significant programming hurdles:

  1. Since ships move with realistic physics and the player can place rocket engines anywhere he likes, I invented an algorithm that intelligently determines the "activation level" of each rocket given the player's current and desired locations.
  2. I wanted parts of ships to be individually damaged and destroyed, meaning that it is very common for a heavily-damaged ship to break apart into multiple pieces. This meant that not only did I have implement a localized damage system integrated into the physics system, but that this system needed to detect when a ship has split apart into what are essentially several smaller ships.
  3. Since ship crews are largely autonomous, a robust pathfinding system needed to be developed. Not only does the pathfinding need to gracefully handle changing ship layouts as parts are destroyed, but it also needs to route around congested areas of the ship. The algorithm that handles routing around congestion is inspired partially by ant colonies in which individual ants layer scented trails for other ants to follow. I turn this idea upside down by having people on board the ships lay down a "virtual scent" that dissuades others from taking the same route.