In the 1980s, my dad brought home a Tandy 1000. I still remember him giving instructions to my mom and me about how to use DOS. I loved playing the games (Digger, Janitor Joe [Jump Joe], Flightmare, Hopper, and more), but the real fun began when my dad showed me I could look at, and even modify, the code for games written in BASIC:
Star Trek was the BASIC game that sparked my interest in computer programming (and yes, I realize how much of a geek that sentence makes me). It was a simple game. An overall grid of sectors in the quadrant broken down into smaller grids where Klingons and an occasional Romulan lurked.
You can only imagine how much fun my 8-year-old self had when I realized that the E = 3000 on line 370 and the P = 10 on line 440 were the units of energy and number of photon torpedoes. After that, the Klingons didn’t stand a chance.
What I loved about programming was that I could make the computer do anything. There was no limit to the problems that could be solved or the fun that could be had. And that’s why I love Tableau. The same sense of “the-sky’s-the-limit” that I felt when I first discovered coding is the sense I feel every day when I use Tableau. With the added bonus of intuitive drag and drop (okay, sure, there’s a calculation or two). But there’s no end to what can be done.
And so, I decided to take my inspiration from the old Star Trek game and give it a Tableau twist. Whereas the original game was text-based, Tableau is of course graphical. That opens up some really neat possibilities. I’ll reserve future blog posts to cover the technical details, but here are a few really cool things that push the envelope in Star Trek – the Tableau Game:
- Everything is done entirely in Tableau. I love possibilities with the JavaScript API, but everything here is native Tableau.
- Notice how the “Fire!” button disappears as soon as you click it. That’s right, it’s an action that applies to the sheet that triggered it! I stumbled across this behavior accidentally – I’m going to explore it more and likely have a blog post or two – stay tuned.
- The biggest challenge was how to keep track of past actions. How could I know how many Klingons the player had destroyed? How could I track shield and life support values? Parameters keep only a value at a time and can’t be updated with actions. Action filters only contain the most recent values selected. The answer is… another blog post for another time… or maybe an AMA on the forums?
- The original BASIC Star Trek game was 553 lines of code (here it is if you are interested). The primary Tableau data set is 20 records.
And now, without any further tedious details (at least for a while):
Space: the final frontier. These are the voyages of the starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly Tableau what no one has done before.
oh no. i saved the Federation AND destroyed the Enterprise! My sacrifice for the good of the galaxy I guess.
The galaxy pays honor to your sacrifice. There will surely be schools and highways named after you. (but the cost of the replacement Enterprise will be deducted from your paycheck.)
I managed to save the Federation but at the cost of the Enterprise!
Live long and prosper
Is it possible to NOT sacrifice the Enterprise? I’m obsessed with this. Thanks Josh, for the fun!
It is definitely possible, though sacrificing the Enterprise is the most likely outcome.
I was able to save the Enterprise and the day. It was a hard fought battle though.
Stardate 5845.5: The Enterprise turned back the Klingon invasion force, ensuring the survival of the Federation and securing peace for a generation.
Congratulations!
Andy, Paul, Kelly;
Two words – Kobyashi Maru.
Brilliant work Joshua! I look forward to playing as soon as I get to a bigger screen than my iPhone.
E
Awesome… thanks for the work and the fun
jrd
Whoa! Be impressed what you did, my dude. I rather appreciate your work. Congratulation and hope you can get more successful things.
Very cool!
Yeah I didn’t use the shields so well.