Saturday, April 12, 2014

Dark Souls Watchface

IMG_3424

I participated in the Hack.UVA Hackathon this weekend, and while there, I created a Dark Souls-themed watchface for my Pebble smart watch. The watchface displays the time, date, year, bluetooth connection status, and charging status of the watch.

During normal use, the center of the watchface shows Solaire of Astora (a character from Dark Souls) praising the Sun:

screen1

...and when the watch is charging, Solaire is shown resting at a bonfire (a key gameplay element of Dark Souls):

screen2

Below is a quick video of the transition taking place (I was quite happy to get this working). The underlaying Pebble OS is able to tell when the charging cable is plugged in and can trigger an event for the watch to switch images.


The code for this watchface is all open-source and available for download on my Github page. Enjoy!

Thursday, April 3, 2014

TSP Art



I'm taking CS 3102 this semester and I teamed up with friend to create a Traveling-Salesperson Art solver for our term project. You can check out the code here: https://github.com/mrranderson/TSP-Art

For those who don't know, the Traveling-Salesperson Problem (TSP) is an interesting problem in computer science: given a set of points, what is the shortest possible path that visits every point? Finding an exact solution to this problem is incredibly difficult because it typically requires testing every combination of points to find the shortest path.

We approached the problem by using a heuristic: start at a random point and then construct the path by going to the next closest point. Despite not being optimal, this works surprisingly well. After the initial path was created, we then parsed it again to remove intersections between edges. The image at the top of this post is the result of running our code on the following image of Gandhi:


We're quite happy with the result of our work and we have posted it all to Github. The program is written in Java and structured to be easily importable into Eclipse. Try downloading the code and giving it a whirl!