Subscribe to Stuck in an Infiniteloop        RSS Feed
-----

Ticket To Ride Helper App: Tech Demo

Icon 1 Comments
I originally came up with this idea over four years ago and after writing the shortest path algorithm, it fell off my radar, I got bored, so on and so forth. I got a wild hair this afternoon and I now present a tech demo of this concept. I have taken a modern map of Europe and overlaid the cities as found in the Ticket To Ride Europe board game. There is some artistic liberty with city placement, this is not lat/lon specific. There are two drop down boxes, one for the start city and one for the end city. After both are selected, the shortest path between them (as defined in the board game map) will be drawn. The start city is highlighted orange and the destination red.

The graph was built out using the ruby code in the previous post. The program here was written in Processing 3, which is Java with a lot of built in help for graphics and such. The graph, routes, and coordinates are flat files that allow the app is merely query the Start-End route and draw the path rather than calculate it on the fly, which given a static list of cities and routes based on the board game would have zero benefit.

Here are a couple images of it in action:

Posted Image
Posted Image

The source can be found here. Look in the processing folder.

A linux executable generated by the Processing system can be found here.

The above is a tarball of the distribution. It's essentially a shell script that calls Java. I'm not sure why the authors of that framework decided to do that rather than build an executable jar?

In processing 2.x there used to be a supported processing.js that made putting a sketch on the web really easy. It looks like that also went away in the move to Processing 3. There is a p5.js (p5 is a large gui library helper for Processing), so I'll look into porting to that so there is an interactive web demo as well.

1 Comments On This Entry

Page 1 of 1

modi123_1 Icon

05 November 2017 - 10:31 PM
Well that's damn spiffy.
1
Page 1 of 1

December 2017

S M T W T F S
     12
3456789
10 11 1213141516
17181920212223
24252627282930
31      

Tags

    Recent Entries

    Search My Blog

    5 user(s) viewing

    5 Guests
    0 member(s)
    0 anonymous member(s)