The High Castle Challenge: One year later

In March of 2018 I accepted my wife’s challenge to publish an app in the App Store by the end of the summer, and I began porting my browser game High Castle to Swift and iOS. As of May, 2019, there’s good news and bad news.

The bad news: The end of the summer came and went, and the end of the year came and went, and I didn’t publish the app. Almost half of 2019 has gone by and I still haven’t published the app.

The good news: Even though the app isn’t published, it’s about ninety percent finished.

More good news: I learned a lot about Swift. Like how to compile and run Swift programs from the command line and how to work with JSON, and the differences between classes and structures. It’s one thing to read books and articles about Swift but it’s another thing entirely to implement a decent-sized program. I started by writing a model (as in MVC: Model View Controller) with a simple text user interface that runs from the command line. Then I hooked the model in to an iOS app.

Even more good news: After porting the game from JavaScript and HTML to Swift, I started work on a Java/Android version. As with the iOS version, I started by porting the model to Java. Porting the model from Swift to Java went faster than porting it from JavaScript to Swift, partly because I’m a lot more familiar with Java than I am with Swift, and partly because I had already figured out how to set up the command-line user interface.

MVC
The other thing that helped with the Swift-to-Java conversion is that I had a well-defined Swift model. I think I did a reasonably good job of separating the view and the model in the original JavaScript version, but there were still some things I had to figure out about exactly what should be in the model in Swift and how it should work. It also helped that Java is closer to Swift than Swift is to JavaScript, particularly in terms of types.

Web views
Web views have played a big role in the High Castle Challenge. The original JavaScript version used HTML and CSS for the entire user interface. Since iOS includes a web view component, I had three basic choices for the iOS version: use web views for all of the GUI, don’t use web views at all, or take a hybrid approach and use web views for some of the GUI but not all of it. I went with the hybrid approach.

There are two big advantages to using web views. The biggest advantage is that the JavaScript, HTML, and CSS used in web views can be used in all of the different platforms: the original HTML5 browser version, the iOS version, the Android version, and the JavaFX version. That means that once I have finished porting the model to a new platform, a lot of the work has been done because I just need to copy the JS, HTML, and CSS to the new app. Setting up the bridge between the native code and the JS code takes some work, but presumably that only needs to be done once for each platform.

The other advantage of web views is that it’s much easier for me to get things to look the way I want them to with HTML and CSS than it is with native GUI systems. I’m not an expert at web design, but I’ve done enough with HTML and CSS to know my way around and I can usually get things to look the way I want them to look. On the other hand, I don’t do a lot with GUIs on the mobile platforms or JavaFX, so anything beyond a basc screen can take a lot of time, be very frustrating, and still not end up the way I want it to be.

JSON
I used JSON a lot in the original browser version of High Castle. The board game version of High Castle uses a lot of cards, and JSON is a convenient data format for the cards. It goes without saying that JSON is extremely easy to use in JavaScript code. After all, the JS in JSON stands for JavaScript. JSON isn’t quite as easy to use in Python, but it’s still very easy. Swift and Java are another story.

I won’t go into all the messy details here, but the bottom line is that it isn’t conceptually difficult to work with JSON in Swift and Java, but it can be tedious, and I ended up writing a lot of code. Sigh.

What’s next?
In this post I’ve discussed a few of the main things I’ve had to figure out for the High Castle Challenge. In the coming weeks and months (and years?) I plan to write about each of these topics (MVC, web views, JSON) and others in a lot more detail and include plenty of sample code. Will that actually happen? Considering my past history of writing and posting articles, I’d have to say the chances aren’t particularly good. But I’m going to try. It’s all part of the High Castle Challenge.

The High Castle Challenge

This is the story of a game called High Castle, which I started making back in the summer of 2011 while on a trip to Mesa Verde with my family. While driving home from Mesa Verde I talked to my family and made a few notes about the game. Inspiration for the game came from a computer game called Heroes of Might and Magic II, although that might not be apparent. It also draws a little bit from Search for the Emperor’s Treasures, a board game that was published in Dragon magazine a zillion years ago.

On returning from Mesa Verde I started work on a board game. I drew the board and did some work on the cards, but I don’t think we ever played the board game much. Instead of continuing work on the board game, I started making a browser-based game with a tile map. Unlike the board-game version, the web game got a lot of play time, at least from me. It works well as a single player game. I don’t win every time I play it so it’s fun to win, but I win often enough that I don’t get frustrated.

Fast forward five or six years (I’m not sure when I finished the browser version of the game) to a time a few weeks ago when I was talking to my wife, who said (not for the first time) that I should publish an app. I’ve been thinking about doing that since about 2010 when I first started iPhone programming, but I’ve never liked Objective-C, and all the good app ideas were taken, and I didn’t have time… For one reason or another I haven’t managed to do it.

The time has come. I’ve accepted my wife’s challenge to publish an app by the end of the summer. Five months to write and publish an app. The app I’m going to publish is High Castle. It’s a fun, single-player game that works well on an iPhone (which I’ve tested with the browser version). The game design is done and I have working JavaScript code to refer to.

Of course, going from JavaScript, known for its casual (at best) approach to types, to Swift, which is known for its obsessive approach to types, is definitely a challenge. No more slurping in an object from a JSON file and sticking it in an instance variable. In Swift reading in a JSON file can be tedious, and Swift dictionaries are as picky about types as any other part of Swift, so I’m defining lots of structs and classes. But, I’ll get into the more technical parts of it in the coming weeks and months, because as I delve into Swift I’m going to write about it in my blog and post reference materials elsewhere on my web site.

It will be fun. It will also be a whole lot of work. Stay tuned.

Cars of the future

What will cars of the future be like? In the comic strip Sally Forth, Ted Forth (the husband of the title character) occasionally says that he’s disappointed because things from science fiction of the past, like jet packs, have not been invented or have not become commonplace. He also laments the lack of flying cars.

Ted Forth and others might hope for flying cars in the future, but I have other hopes for cars of the future. Flying cars might be fun, but they’re a long way off and might never happen. I’m thinking in more practical terms: I want a modular car.

A what car? Yes, you heard me right, I want a modular car. A car that’s made up of interchangeable parts. Any module, or part, can be replaced by any other module that connects to other modules in the same way and provides the same features to the car.

A few years ago my family had a car which we called the “white car”. We usually refer to cars by their make (“the Subaru” or “the Buick”), or sometimes by their body style (“the van”), but for some reason we referred to the white car by its color. We bought the white car when we lived in Hawaii and had it five or six years after we moved back to Utah. It was reasonably reliable and fuel-efficient and was a good car overall.

Then the car developed a fatal flaw: the engine block started leaking oil. I took it to a mechanic who said that he could try sealing the leak somehow, but that didn’t work, and I ended up junking the car, just because of an oil leak. Maybe I was too hasty and we could have driven the car for a while longer, but the main problem is that because the engine is big and complicated and tightly integrated into the rest of the car, replacing the engine would have been too expensive compared to what the car was worth.

In a modular car, if one module develops a major problem you might have to replace that module, but because the modules are not tightly integrated, it’s much easier to replace one module. The modules have standard interfaces, so they are interchangeable. How would that work for an engine, or a transmission, or any of the other complicated mechanical parts in a car? It wouldn’t, at least not for a typical vehicle with a gasoline or diesel engine. Electric cars, though, are another story.

Current electric cars are not modular and are tightly integrated like other cars, but they don’t have to be that way. Electric cars can be modular so that you could replace a motor as easily as you could replace a hard drive on your computer. In fact, modular computers are the inspiration for modular cars.

In the early days of computers, they were tightly integrated the same way cars are today. Then the IBM PC came out and other companies started making clones. Some companies started making compatible parts: cases, disk drives, motherboards, graphics cards, memory, and even processors. Now people could choose the best processor, the best disk drive, the best motherboard, and so on. Instead of putting up with a so-so motherboard so that you could get the best graphics card, you can get the best of both. Or, if you didn’t care about graphics card but needed lots of memory you could do that. Competition for producing components heated up and innovation increased.

With cars it’s an all or nothing deal. You can’t choose the engine you like best and put it with the best transmission. I would love to have that option for my family’s 2003 Honda Odyssey which is currently on its third transmission. Ouch. Of course, we didn’t know about the transmission problems when we bought the car, and when we found out about them it was too late to do anything other than sell the whole car. With a modular car it’s never too late to change. You might end up with a module that’s a lemon, but replacing a module is much less expensive than replacing the whole car.

Not only that, but the transmission in a modular car is not an expensive, very complicated mechanical device, it’s a pair of wires. Okay, it might be stretching it a little bit to call wires a transmission. Really the transmission would be the axle between an electric motor and the wheel. Or a few lines in a computer program. Or all of the above. The point is that a modular, electric car can be much simpler than an integrated car.

Increased innovation and simplicity aren’t the only advantages of modular cars. I live about thirty miles away from the university where I work. I ride the bus as often as I can, but some terms I have a late class and can’t ride the bus. I would love to have an electric car to make that commute, and as far as I know, that’s within the range of all-electric (non-hybrid) cars. But what happens if I want to go on a car trip? Even a relatively short trip, say 200 miles round trip, would be too far for a non-hybrid, electric car. Yes, I could get a hybrid, but then I would have a car that’s more complicated than an integrated gas-powered car, not less.

With a modular car the problem is solved. For day-to-day commuting I would use a power module that has only batteries in it. For trips I would use a power module that has a gasoline or diesel powered generator. Yes, I would have to buy gas to put in the generator, but the generator motor would be specially designed just to generate electricity, and to do it as efficiently as possible. And the car’s software would know how to minimize use of the generator by doing things like monitoring the batteries and taking advantage of regenerative braking.

It’s a win-win situation. It’s good for me personally because I spend less money on gas, and on the car. It’s good for the environment because my car can make use of the cleanest power that’s available. At first I might be using electricity produced by a coal-burning power plant, but then when I put solar panels on my roof I can use cleaner energy without making any change to my car. That opens up lots of possibilities in terms of reducing dependence on fossil fuels, cleaning up the air, and helping to minimize climate change.

There’s a good reason why my family (some of us, anyhow) spends at least one day of our family reunion in the summer working on a proof-of-concept modular electric car (how nerdy is that?). There’s a good reason why we (at least some of us) work on that same proof-of-concept car on Black Friday every year when family members come to town for Thanksgiving. (Hint: It’s not just because of the insane crowds in the stores.) There’s a good reason why my brother, Ed, started A Truly Electric Car Company (ATECC) ten or twelve years ago. In fact, there are lots of good reasons: innovation, simplicity, flexibility, less environmental impact, and more.

So if you invent a flying car, I’d love to have one. As long as it’s a modular flying car.

This book tells how modularity transformed the computer industry: Design Rules, Vol. 1: The Power of Modularity by Carliss Y. Baldwin and Kim B. Clark

Geocaching by the bay

A few weeks ago I flew to San Francisco for the Game Developers Conference (GDC). The conference was great, but that’s the topic of another post (or posts – I might get long-winded (long-fingered?) and write a bunch of posts about it). Besides going to GDC I also enjoyed a great visit with my brother and his family. We had some delicious meals, including some tasty Japanese dishes.

As it turned out, my visit was perfect timing to talk to the patent examiners for a patent application my brother and I are working on for the company he founded, A Truly Electric Car Company (ATECC). The patent application, and the company, will also be the subject of other posts.

But that’s enough about topics of other (future) posts. The topic of this post is geocaching.

Since I live in a landlocked state (Utah), I like to go to the coast whenever I can. So I asked my brother about going to the coast while visiting him and he suggested that we go to the Pigeon Point lighthouse. I checked it out on geocaching.com and found out that there was a geocache there. Since I guessed that there wouldn’t be cell service there, I loaded the cache onto my standalone GPS. That wasn’t as easy as it should have been, since the USB cable for my GPS is flaky. I really need to learn how to set up offline caches on my phone.

Unfortunately the Pigeon Point lighthouse is not in very good shape. Even so, it’s in a beautiful place and the lighthouse adds an interesting historical element to the site. After walking around the lighthouse and enjoying the setting, my brother and I started looking for the geocache.

It was fortunate that I had loaded the cache onto my standalone GPS, because there wasn’t any cell service. We found the general area of the cache and started looking for it. I have some experience with finding caches (Pigeon Point was my 131st cache) but it was my brother who found the cache first. At that point it was getting dark and we didn’t have much more time to look, so he gave me a suitably subtle hint and I soon found it. I was a little disappointed that I didn’t find the cache without a hint, but considering the fact that I couldn’t easily return to look for it again, I was happy to have found it.

It was also nice that we didn’t have to look at the cache’s hint, which told exactly where the cache was. Unlike the cache’s owner, my brother knew the specific situation and give a hint that would help without spoiling the mystery. For me, that’s what geocaching is all about: solving mysteries. And I love mysteries.

Some people talk about liking geocaches because looking for a cache takes them to a place where they otherwise wouldn’t go and they can enjoy the place because they decided to find a particular cache. That’s sometimes the case with me, but more often I look for caches in places where I am going anyhow, so the cache isn’t the reason I go to a particular place.

The caches that I’ve enjoyed the most are the ones that presented the most challenging mystery that I solved. It’s kind of fun to find easy caches. If nothing else, an easy cache adds one to the total on my profiile on geocaching.com (currently at 133), but easily-found caches are usually soon forgotten. Caches that are too hard to find are not easily forgotten, but they are frustrating and not fun. There’s a sweet spot there that’s hard to hit. To put it in Goldilocks terms: not too easy, not too hard, just right.

From a game-design perspective, making a mystery that hits that sweet spot is a big challenge. The game has to give clues to the player, but no single clue should give away the answer. There can be clues that are useless, or even misleading (red herrings), but for the most part each clue should contribute some information but not so much information that no other clues are necessary. I think of it in terms of “partial information”.

With geocaching, partial information comes into play in a variety of ways. First and foremost is the partial information of GPS devices. Apparently there are mapping-grade GPS units that give very precise information, but the ones that most geocachers use might be off by anywhere from 3 meters to 10 meters. So when a device says that you are at a geocache’s location, you might be 10 meters away. Not only that, but the distance the device says will change. It might say you’re one meter away at one point and then a few seconds later say that you’re 5 meters away. For some applications that could cause big problems, but for geocaching it just adds to the mystery.

There’s also the question of hints. Hints are encrypted so that you won’t read them accidentally. A lot of hints tell you exactly where the cache is. That was the case with the Pigeon Point geocache, and I think that’s a good thing. I’ve looked for caches in some places where I know I won’t be able to return soon, and I would rather have a hint that gives away the location than have to leave without finding the cache. That’s especially important because caches sometimes disappear, so you could spend a lot of time looking for a cache that isn’t there any more.

On geocaching.com each cache can only have a single hint, which limits the possibilities for partial information. But there are other ways to give clues, or to find clues. Sometimes the description of the cache will contain clues. Sometimes other geocachers will give hints, accidentally or on purpose, in their logs. Log entries can be encrypted, like hints, so that you don’t see spoilers unless you want to, but sometimes there are bits of information that, taken by themselves, are not spoilers, but combined with other log entries make useful and interesting clues.

My next opportunity for finding geocaches was at GDC, which was at the Moscone Center in downtown San Francisco. There’s a park there, and I knew that there were some geocaches hidden in the park. However, when I tried to use the geocaching app on my Android tablet it got hung up. I think it was a problem with the tablet, which is a cheap one that has several issues, rather than a problem with the app, which is a good one.

The app is Neon Geo, which I used for years on my old Samsung Galaxy Note 2 phone. When I switched from my Note 2 to an iPhone 6S Plus I couldn’t use Neon Geo on my phone anymore, so I put Neon Geo on my cheap Android tablet and used the tablet for geocaching. I didn’t really look for an app for my iPhone because the official geocaching.com app has poor reviews in the App Store. I should have looked more, because when my tablet flaked out at GDC I missed out on an opportunity to find caches in an interesting place.

On my last day in the bay area my brother’s family and I decided to go to a park that’s on the bay near the San Francisco airport. I knew there would be cell service there, and I didn’t want to fuss with my GPS’s flaky USB cable anyhow. My cheap Android tablet was useless for geocaching at that point, so I looked in the App Store for an iOS geocaching app.

First I looked at the official geocaching.com app again: bad reviews. One of the reviewers mentioned an app called Cachly. While looking for information about Cachly I found a great geocaching web site: The Geocaching Junkie The lady who writes the web site compared Cachly with another app, Looking4Cache. The bottom line was that the differences are relatively minor and she liked them both.

I decided to go with Cachly, and it worked well. I like its visual design and it’s easy to use. My only gripe is that the text that shows the distance to the cache is very small, and I can’t read it without reading glasses. I have to use reading glasses a lot these days, so they aren’t a big deal, but making the distance text larger seems like a pretty easy change that other other users would also appreciate.

The park by the bay was beautiful, and we found a couple of caches there. I was the last one to find them, but I got to enjoy the park, a nice day (with only a few drops of rain), and some time with my brother’s family.

geocaching.com

Here are links to the three geocaches I found on my San Francisco trip:
Pigeon Point Lighthouse GCYGEB
Public Access GCP52D
Es Effo Bug Hotel

Captain on the bridge — Part 2

You’re a powerful warrior battling a huge fire-breathing dragon. You swing your great sword with all your might! Except…, um…, it’s not a great sword. It’s a little lump of plastic sitting on your desk: a computer mouse.

When you play a medieval fantasy game on a computer, the computer screen is a window into a fantasy world. The computer gives you the sights and sounds of a fantasy world, and as long as you’re looking at the screen you can be totally immersed. That’s fine if you have a big screen. Sort of. There’s still the fact that you’re typing on a keyboard or moving a computer mouse, which is not exactly the same as swinging a sword or waving a wand.

But here’s the thing about spaceship bridge simulation games: using a computer can be part of the game. Not only is it okay for the navigation officer to use a computer to plot the ship’s course, it’s what you would expect. You can quibble about what kind of peripherals and user interfaces a computer of the future might have, but it’s certainly possible to visualize a setting where the appearance (and maybe even the processing power) of computers hasn’t changed a lot but the propulsion and other systems of the ship are advanced enough to allow interstellar travel. Using computers adds to the ambience of the game rather than detracting from it as it might in a medieval fantasy game.

In Part 1 of this series I wrote about a tabletop game called Space Cadets where each player has a station on the bridge of a starship. It’s a great game, but the game mechanics are limited by the fact that players have to manually keep track of everything. What happens if you have a computer for each station? Then you have something that can look a lot like what you see in Star Trek and other space-themed movies and TV shows:


“Captain,” the science officer says, looking up from her computer screen, “sensors show an unknown vessel rapidly approaching.” The main screen shows an image of the approaching ship.

“Yellow alert,” the captain says. “Shields up. Comm, open a channel.”

“Aye,” the tactical officer and communications officer say, and use their station’s computers to follow the orders.

“Hailing on all standard frequencies,” the comm officer says. A moment later he says “No response.”

“The unknown ship’s weapons are charged,” the science officer says. “It’s preparing to fire.”

“Stand by to return fire,” the captain says.

Okay, I’m not going to get a job as a screenwriter for the next Star Trek movie, but the point is that with the right programs and a group of players who get into roleplaying you can get gameplay that’s a lot like a TV show or movie. The science officer is not pretending to do what a real science officer might do, she is doing what a real science officer might do. Granted, the data on her screen is fictitious, but it’s well within the capabilities of current computer games to produce very convincing data and displays.

Is there a game that does that? A game where each station has its own computer with appropriate data displays? Yes, there is. It’s called Artemis Spaceship Bridge Simulator, and it’s a great game. There is a comm station, a navigation station, a weapons station, and an engineering station. There’s also a main screen that can show an image of space in front of the ship or a map of part of the galaxy.

Each player has a job to do, and each player uses their computer to do their job, just like crew members do on the “real” spaceships in the movies.

“But wait,” you say, “how can I feel like I’m on a spaceship when I’m sitting in my family room that looks nothing like the bridge of a spaceship?”

That’s a good question. The answer is that when you get into the game, what’s important is what’s on the screens and not what kind of furniture is in the room or what picture is hanging on the wall. You could say a similar thing about a fantasy game, but even a family room with a picture of Grandpa Joe and Grandma Josephine hanging on the wall can feel like a spaceship bridge if it has computers in it and you’re paying attention to the screens. Sure, you could put some candles in a room and a sword on the wall and call it a castle, but you’d still have all those computers in the room, that look nothing like the things you find in a castle.

If I had to choose between a family room with computers and programs that have a fun and “realistic” game running on them and a room that looks like a spaceship bridge but has no functioning computers, I will take the family room, no matter how good the bridge looks. In fact, a few years ago my family went to the Star Trek Experience in Las Vegas just before it closed down. They had a reconstruction of the Next Generation bridge there, and I got a picture of myself sitting in the captain’s chair. I like the picture, and it was fun to be on the bridge, but after standing there and looking at it for a few minutes there’s nothing to do. I’m not even sure where the picture is now.

Isn’t there a way to get the best of both worlds? To have a great-looking bridge that has computers? Yes, there is, but it isn’t cheap. Some people make a room in their house into a bridge, or make a bridge that can be put up or taken down like a movie set. I think there are more people who want to do that, or have started doing it, than have actually done it, but at least one person has done a great job. There’s a link to a video of a great spaceship bridge at the end of this article.

What about virtual reality (VR)? If you really want to be surrounded by a spaceship, why not go with VR? First, that means that everything on the bridge has to have a 3D model and has to be included in the program, which means spending more time and money. A lot more. Game companies are fine with that, but what if I want to make my own games?

VR is great for vision. (At least, I think it is. I haven’t really had a chance to try it out other than a couple of minor demonstrations with Google Cardboard.) It’s probably great for sound as well. But what about actions?

A couple of weeks ago I was looking at the schedule for talks at GDC and noticed that there was a talk about a Star Trek bridge simulation game that Ubisoft is making. I had no idea there was a game like that in the works and at first I was really excited about it. But then I realized that I would have to spend $600 to $800 on a VR headset and controllers, and so would anyone that I wanted to play with. That’s a fair amount of money to spend on games, but obviously it would open up possibilities for lots of other games.

But then I noticed one of the station consoles in the trailer. It was a pretty simple console, with a few sliders on it, and I realized that because of the limitations of the VR controllers, there are limited options for the console. Sliders. Woo hoo.

I am still interested in the Ubisoft game, and I might buy it when it comes out. But when I’m a member of a starship bridge crew, I want to do more than drag a few sliders around while I watch a VR movie. I want to plot firing solutions and decrypt messages and write programs and research mysterious aliens and figure out how to stop the engine core from exploding and vaporizing the entire ship. And I don’t think I can do all of that with a few sliders.

One place where VR could really shine in my game is for away missions. I can totally see crew members putting on VR helmets that let them go down to a planet’s surface and explore on foot or in simple vehicles. Using VR controllers to fire laser beams at a ginormous alien creature that was about to swallow half a dozen innocent bystanders would be a blast. But for the bridge, I want computers that can be used in the usual way, not just with VR controllers.

In short, I want a starship bridge in my basement. I want lots of screens and computer-controlled lights and sounds, and I want the computers to be interesting and useful in a variety of ways, like computers are in real life. It won’t be easy to build the starship bridge and write the software, but with a modular, incremental approach i think it can be done, and I think it will be a whole lot of fun along the way. The journey is the reward.

There’s one other thing I want for my bridge simulation game: great stories. I guess I forget to mention that little detail. I don’t know what Ubisoft has in store for its new spaceship bridge game, but stories are definitely not a strong point for Space Cadets or Artemis.

Stories in bridge simulation games will be the topic of my next post in this series.

Links:
Artemis Spaceship Bridge Simulation
The Starship Bridge Simulation Network
Spaceship bridge at Kansas City Maker Faire

One more link:
Here’s a link to a great book that tells all about how you can write awesome adventures and build a cool starship bridge in your basement to run the adventures:
Oops, I guess there aren’t any books like that. Maybe some day I’ll write one…

Captain on the bridge — Part 1

A week or so ago I wrote about my bucket list, or at least one item on my bucket list. This week I’m writing about a dream. The dream is to walk on to the bridge of starship and take command. Just like the captains in Star Trek. I would lead the crew on all sorts of adventures: fascinating exploration missions, daring military raids, and heroic rescue missions. I would also (unlike the Star Trek captains, as far as I know) sometimes take the ship out and roam the galaxy just for fun.

Alas, my dream is unlikely to be fulfilled. There are real spaceships, but my chance of going on one of them is on the wrong side of .00000000000001. To put it bluntly, there is no chance at all that’s going to happen. Even if I did take command of the next version of the space shuttle (did I mention that the chances of that happening are ridiculously small?), no one in my lifetime will go to another star system, let alone going beyond Mars. Even going to Mars in the next twenty or thirty years is a long shot.

So what’s an aspiring starship captain to do? Content himself or herself with watching Captain Jameway or Commander Sisko or Captain Archer? Or maybe channel his or her inner child and watch Star Trek inside a suitably decorated refrigerator box? Fun, perhaps, but much too passive for someone who wants to take command and “boldly go where no one has gone before”.

Well, there are some options: games. After all, where books and movies are passive, games are active. And there are some bridge simulation games where players are the bridge crew of a starship.

A week or two ago I played a game called Space Cadets. I actually bought it a year or so ago, but didn’t get around to playing it until recently.

It’s a fun game. As with other bridge simulation games, there are various stations: captain, engineer, weapons, damage control, shields, sensors, jump drive, tractor beam, and helm. Each station has its own mini game. My favorite mini game is the weapons game, which is more or less a mini tabletop shuffleboard game where you slide a wooden disk along a track to see how much damage a torpedo does. It’s a nice risk-reward tradeoff game: you can play it safe and be almost certain you’ll do some damage, or you can gamble and go for a lot of damage with a big chance that you’ll do no damage at all.

All of the mini games are timed, which adds an element of tension, although when I played there were some games that didn’t take much time. Maybe that’s because the engineer (me) didn’t do a good enough job getting power to the other stations. That meant they didn’t have enough power to do things that take more time.

If each of the bridge officers is in her or his own little world, desperately trying to beat the clock and get a sensor lock or get a torpedo loaded, you might have some tension, but to get real excitement you need the players yelling and screaming at each other, and to get that you need connections between stations. In Space Cadets, the engineering station is connected to all of the other stations because the engineer determines how much power each of the other stations receives. The sensors station is connected to the weapons station because torpedoes will do more damage if there is a sensor lock on the target. And if a core breach is imminent, then all of the players have to work together to prevent it while also doing their regular jobs.

The game I played never got to the core breach level, and there wasn’t any actual yelling and screaming, but the connections between stations definitely played an important role. That shows good design of a bridge simulation game.

Have I found my wish-fulfillment game that lets me command a starship? Not yet. Space Cadets is fun to play and is a great game, but it’s not the ultimate starship captain experience.

One issue that I have with it is that some parts of the game can become tedious. I kept thinking “I could write a program to keep track of this”. There is a mobile app for the timer, which is good, but I kept wanting the app to do more, and it doesn’t. Nor should it, really. Computerizing more of the game could make some things less tedious, and it would allow more complicated rules, but it would also change the game a lot and it would lose its party game flavor. I’ll keep Space Cadets, but I’ll also keep looking for my ultimate game.

When we played Space Cadets, we set the stations out on our kitchen counter. The counter is black with lighter flecks in it and it sort of looks spacey. But the rest of the room is just a kitchen and doesn’t look like a space ship at all, even if it does have stainless steel appliances. A living room or a family room wouldn’t be any better. That’s not a problem if you just want to play a game for a couple of hours. But is it possible to get something more immersive? More on that in a later post. (Hint: I’m not talking about VR.)

In the mean time I’ll get out my crayons and paints and aluminum foil and start decorating that refrigerator box.

Writing and playing adventures

What’s on your bucket list? Going sky diving? Traveling to Europe, or Australia, or Africa? Climbing Mount Everest? Going to Mars, or to the moon, or at least going into space? Yesterday I listened to a podcast (Naked Astronomy) that talked about colonizing Mars and how many people would be there by 2024 (Elon Musk’s goal) or 2030 or 2050. The same podcast episode also talked about space tourism and how you could spend a few million dollars for a few minutes in space. All you need is money. I suppose that’s true for a lot of things on a lot of people’s bucket lists.

I wish my bucket list was that simple.

Maybe that makes it sound like money isn’t an issue for me and that I have piles of the stuff hidden under my mattress or stashed away in a secret Swiss bank account. I don’t. Sometimes I wish I had, but when I really think about it I realize that money won’t buy the thing that’s at the top of my bucket list: writing and playing adventures.

When I say that writing and playing adventures is at the top of my bucket list I don’t mean that it’s my most important goal in my life. And I don’t mean that it’s something that would happen at some well-defined moment, like reaching the summit of Mount Everest. It’s an ability that I want to acquire.

You might agree that the writing part is not easy and is not something that money could buy, but surely there are plenty of opportunities to play adventures, without even spending money. Not really. I’m hard to please. Out of the millions of games that are on the App Store and in Google Play, I have only found a few that I’ve played more than two or three times.

As for tabletop role-playing games, I have played in various campaigns and adventures that I liked. I’m even playing in a good campaign now, although it’s kind of an on-again, off-again thing.

If I really put time and energy into it I could find some good adventures to play in, especially since it’s now possible to play role-playing games over the Internet with virtual tabletop software. But even though playing adventures is part of my top bucket list item, it’s not the most important part. Writing is the most important part. Making adventures. Creating them.

I have written a few adventures that I liked reasonably well. I’ve started writing a whole lot more, more than I like to think about. But they’ve all fallen short of what I expect from a good adventure.

What makes a good adventure? I’m glad you asked.

First of all a good adventure has decisions. That’s what separates games, and role-playing games in particular, from books and movies.

Playing a good adventure makes a good story. The Angry GM’s definition of an adventure is “the smallest segment of a role-playing game that can be considered a complete and satisfying story.” Of course, that raises the question of what makes a good story, and that’s a big question.

I’ve spent a lot of time thinking and reading about what makes stories work. It’s a fascinating and difficult topic in its own right, but what makes it even more fascinating and difficult for me is how to take the things that I read and learn about stories and relate them to adventures.

One of the most important things to get right in stories is the characters. Kendall Haven, emphasizes that in his book Story Smart. In another book, Story Sense, Paul Lucey advises screenwriters to write simple stories about complex characters. He’s talking about movies, as opposed to novels or other forms of storytelling, but I consider it to be excellent general-purpose advice. If only I could do it.

Creating good characters in role-playing adventures can be tricky because often combat plays a big part in such adventures and combat often means that the character I worked so hard to create is killed in battle at the end of the adventure.

Speaking of combat, for some players that’s the be-all and end-all of role-playing games. I like having a good battle or two in an adventure, especially if there are interesting tactical decisions to make, but combat is less important to me than other aspects of adventures.

I love mysteries (as I’ve written elsewhere on this blog) so for me a mystery can make a great adventure. Or a mystery make an interesting subplot or component of an adventure. I suppose I could have been less specific and said “puzzles”, but “mysteries” sounds a lot better. One reason is because a mystery almost always means there are story elements involved: setting, characters, and plot, whereas a puzzle might have nothing to do with a story.

Whether it’s a “mystery” or a “puzzle” there’s one essential ingredient: clues. Saying that something is a mystery or a puzzle means that there’s unknown information, and that by itself is as likely to be frustrating as it is to be interesting or entertaining. But throw in some intriguing clues and you’ve got me hooked. That’s one of the reasons why I like debugging computer programs: the challenge of recognizing the clues and using them to track down and fix bugs.

One of my big gripes with traps in adventures is when there aren’t any clues about the trap. You either walk into it or you don’t. If you walk into a trap with no clues you get annoyed and frustrated and it detracts from the adventure. If you don’t walk into it you don’t know it exists and it doesn’t add to the adventure. On the other hand, if there are clues about the trap, and you put them together and figure out the trap, then you get a sense of accomplishment that adds a lot to the adventure.

Last and least are props and scenery. I say “least” because they are definitely secondary to decisions, characters and other story elements, clues, and even battles. And some people will argue that good verbal descriptions are as good as pictures. And there’s evidence for that in the fact that books are still popular even though there are movies and other visual and audio forms of entertainment.

But a good map can add a lot to an adventure. So can a hand-written poem or riddle on a scorched piece of parchment paper. Or a pouch of gems.

Some people like to improvise adventures and can do it well. But those improvised adventures are not likely to have maps and pictures and props so they aren’t as good as they could be.

So, I don’t need ten million dollars to cross off the top item on my bucket list. I just need adventures with interesting decisions, complex characters, intriguing clues, a battle or two, and some maps and props. Easy, right? I wish.

About the Angry GM
Here’s a link to the Angry GM’s article about what adventures are. Keep in mind that “Angry” means “swears a lot”. A lot of the swear words have been partially replaced with comic-style punctuation marks. Even so, I would like the site a lot better if it weren’t so angry. You have been warned.
The Angry GM’s article about what adventures are

The magic (unit) circle

This is the story of an index card, a trigonometry book, and a magic circle.

Once upon a time* I was helping my friend, John, prepare for a test in his trigonometry class. His teacher told him that he could take one 3×5 index card into the test. He sharpened a pencil to a fine point and started writing on the card. There are three tables in his textbook that he copied onto his card. One shows the values of trig functions for “special angles” (30°, 45°, and 60°). The book recommends memorizing that table. Another table showed values of trig functions for quadrantal angles (0°, 90°, 180°, and 270°). The third showed signs of trig functions in different quadrants: cosine and sine both positive in Quadrant I, sine positive and cosine negative in Quadrant II, etc.

John copied those tables onto his index card along with some definitions (sin = opp/hyp, etc.) Then he asked me for suggestions for other things to write on the card. I looked at the three tables and suggested that he replace the three tables with a drawing of the unit circle.

The trig book John had does talk about the unit circle a little bit, and John knew what I was talking about when I referred to the unit circle, but I had to look at the book pretty closely to see any mention of it. As far as I could tell, the place where it’s explained is in the section about wrapping functions. Wrapping functions? Never heard of them. Why bury the unit circle in a section about some kind of mathematical formalism that no one ever uses unless they have to learn it for a test? To me that’s heresy.

When I learned trig, back in the days when dinosaurs roamed the earth (~1975), the unit circle was the key to learning trigonometry. At least it was in Uncle Bill’s class. I remember sitting in a classroom at Skyline High in Salt Lake City, Utah and watching the teacher, Bill Earl (“Uncle Bill”), draw a unit circle on the board at the beginning of class. He would stand by the board and swing his arm around to draw the circle. He was just the right height to get a circle that fit nicely on the board if he had his arm fully extended when he swung it around.

I used the unit circle a lot in Uncle Bill’s class and before long had it memorized, kind of like the authors of John’s math book suggested that students memorize Table 2.2, Trigonometric Functions of Special Angles. But it wasn’t just that I had it memorized. It was that I understood how it worked so that I could draw it any time I wanted to. You could say that I could re-derive it any time I wanted to. Even forty-plus years later, which is what I did when I drew it for John.

Here’s my picture, scribbles and all:
drawing of the unit circle

As you can tell by the scribbles, I didn’t get it right the first time. And I cheated a little bit. But given a little more time I could have reproduced it without using a book or a calculator.

That picture, along with some of the basic definitions (tan = sin/cos) includes all of the information in Tables 2.2 (Trigonometric Functions of Special Angles), 2.4 (Values of Trigonometric Functions of Quadrantal Angles), and 2.5 (Signs of the Trigonometric Functions) in John’s textbook. So John could replace three tables on his index card with one diagram of the unit circle.

Memorizing the circle is easier than memorizing the tables in the book. If you’re familiar with the four quadrants, it’s easy to see why the sign of π/2 is positive and the sine of 3π/2 is negative. Instead of memorizing a table (2.4 or 2.5) filled with arbitray numbers or words you’re looking at quadrants on a graph. It’s true that the textbook’s explanation gives some context for Table 2.5, and there are some diagrams, so they’re not completely arbitrary numbers and words, but why not put everything together in one diagram, and then memorize, or even better learn, that one diagram?

Yes, there might be a few things that you need to memorize, like the values for sine and cosine in Quadrant I. But really the main thing you need to memorize is the sequence 1/2, √2/2, and √3/2. They all have 2 in the denominator, and you can think of the 1 in 1/2 as √1 so you get a nice sequence of √1/2, √2/2, and √3/2. If you understand the overall idea, it’s pretty easy to take care of a few memorization details like that.

If you learn the unit circle and understand it well you won’t need to draw it on an index card to take it into the test. You’ll understand the relationships between different parts of the circle and see how they all fit together, and that makes a big difference.

So why does the title of this post refer to a “magic circle”? Am I trying to convince you that the unit circle magic? No, I’m not. The unit circle is definitely useful, but it’s not magic.

I’m referring to the magic circle of games and game design. The idea is that when players play a game they agree to play by the rules. They pretend that the things in the game are important, even if (or especially if) those things are not at all important in the real world. They get into the game. If they do those things they are entering the magic circle.

If they don’t enter the magic circle, players will probably not enjoy the game. Even worse, they might prevent others from enjoying the game by arguing about the rules or not paying attention and taking their turn when it’s time, or saying out-of-character things.

I have another friend who was a year or two behind me in high school. At first he didn’t like math, he didn’t get good grades in his math classes, and he more or less considered it a waste of time. In game design terms he wasn’t in the magic circle and wasn’t even close to it. Then, for some reason, he decided that math was interesting, or even fun. I don’t know why. Maybe it was something a teacher said or did. Maybe it was an interesting application or just an interesting problem. Maybe he solved a particularly tricky problem and got a confidence boost. But something happened and he entered the magic circle.

Math wasn’t easy for him just because he entered the magic circle. But it was easier. Maybe a better way to put it is that it became easier for him to put in the time and effort needed to learn it. Because he put more time and effort into it, he made better progress, which in turn helped with motivation so that he could continue putting more time and effort into it. Instead of being stuck in a negative feedback loop, he was in a positive feedback loop. Or, as I like to put it, he was “spiraling up” inside the magic circle.

And that’s a good place to be.

Extra Credits video about the magic circle

* I’ve taken the liberty of changing some aspects of this story.

Flavia de Luce

A couple of years ago I was looking through the Overdrive web site (see http://pioneer.utah.gov if you happen to live in Utah like I do) for books to read and came across a book by Alan Bradley called The Sweetness at the Bottom of the Pie. I decided to try it, and I’m glad I did, because the Flavia de Luce books are my favorite of all the books and series of books that I’ve read in the past few years.

Why? First of all, they’re mysteries, and I love reading mysteries. I usually don’t realize who the murderer is in the Flavia de Luce books, but when I find out who the murderer is it makes sense. Also, the mystery is important, but there are enough things going on in the book that it’s interesting without a new corpse turning up every chapter.

The Flavia de Luce books have great characters. Flavia is an 11-year old girl who is fascinated by chemistry and poisons. The way she talks about her lab, her experiments, and her heroes of chemistry is entertaining and endearing. Then there’s Dogger, her father’s friend and servant. Dogger is knowledgeable and has impeccable manners. A little bit like Jeeves, but mysterious and sad in addition to being polite and capable. There are other interesting characters, like Flavia’s sisters, Ophelia and Daphne, her father with his wistful sadness and obsession with postage stamps, and the inspector, to name a few, but the ones who really make the books work for me are Flavia and Dogger.

Nowadays I listen to fiction much more often than I read printed books (or ebooks). In the case of the Flavia de Luce, listening is a plus because Jayne Entwistle, the narrator, does a great job. She has a distinctive voice and does a great job of portraying the character of a quirky 11-year-old girl who happens to be a genius of chemistry and a brilliant detective. Flavia is the most important character of course, but there’s something about the way that Entwistle does Dogger’s voice that nails the character.

Even the titles are great. As far as I know, the titles of the four that I have read are all quotes, with Book 4’s title (I Am Half Sick of Shadows) being a quote from a Tennyson poem. I can’t say that I understand the allusions of the titles, but I like them all the same.

I’ve read four of the eight or nine books that have been written in the series so far (I’m rationing them rather than binge-reading them), and every one of them has had things that make me laugh. A lot. The funny parts are perfect counterpoints to the mystery and don’t spoil the sense of mystery at all. There are a number of sad things in every book as well.

The books are set in England fairly soon (five or ten years?) after the end of World War II. I like historical fiction and have read a number of murder mysteries that are historical fiction, ranging from the Cadfael mysteries by Ellis Peters, which are set in 12th century England, to the Amelia Peabody series by Elizabeth Peters, which are set in Egypt in the late 19th and early 20th centuries. The Flavia de Luce books are more recent, but Bradley does a great job of making the historical setting interesting without belaboring it.

What makes a good quest?

Many RPGs (role-playing games), especially computer RPGs, emphasize quests. In fact, one computer game, EverQuest, even has “quest” in its name. Often completing quests is one of the main ways to for characters to advance. There are other ways to advance, but often the other ways are repetitive and tedious and amount to little more than wandering around and killing whatever monsters the character encounters. The term used to refer to that kind of repetitive and tedious activity is “grinding”.

Quests are not supposed to be repetitive and tedious, but unfortunately they often are, and they end up just being another kind of grind: kill 10 goblins, kill 10 gnolls, kill 10 orcs, etc. True, quests usually have some kind of story, but reading the stories isn’t necessary for completing the quests, so they are often ignored. Rather than reading a quest story and looking for clues in the game world, players often search the Web for information about the quest, leaving a beautiful, immersive game world for a third-party web site cluttered with advertisements.

Is there a way to make quests more interesting and fun? I like to think so. But before I get into that, I’m going to define the target by looking at what makes a good quest.

A good quest system provides variety: a variety of quests and (perhaps more importantly) a variety of ways to achieve quests. That means that there are interesting decisions for the player to make. I’m not talking about decisions like “Should I use my +5 axe of decapitation or my +5 sword of walloping?” I’m talking about “Do I kill the guard, disable it, bribe it, sneak past it, or try to find another way in?” Do I try to cross the mountain pass in a blizzard or go through the mines that are full of monsters. (Okay, that’s not my idea, but it is my idea of an interesting decision.)

Good quests are challenging. That means that failure is possible, but there’s a big difference between “challenging” and “hard”. A quest can be hard to complete because it requires the player to make more than one attempt, but if each attempt is the same except for the outcome of simulated die rolls, then the quest isn’t challenging, it’s just hard. It’s a grind. With a challenging quest, there might be only one attempt. That means that failure is that much more painful but success is that much more sweet.

Adding story elements to quests is a way to make quests better. A player won’t care about a character that he or she sees once when getting the quest and again when completing the quest, especially when no information about that character is necessary for the quest. On the other hand if a player character interacts a character from time to time, and hears stories and rumors about that character, and needs information about the character to complete the quest, then it’s a different story. The player will pay more attention to the character and is more likely to care about what happens to the character. Characters are one story element that can make quests better. Other story elements that can make quests better are pacing, timing, drama, and narrative tension.

Good quests draw players deeper into the game world instead of encouraging them to go on a scavenger hunt on the Web. And, completing a quest makes a difference in the world, even if it’s a small one. A change that lasts longer than the respawn timer of the quest monsters.

Is it possible to make good quests? Of course. Then why aren’t there good quests in EverQuest? There are some good ones, but a lot of them are so-so or ho-hum because of the time and expense that creating good quests requires.

Is it possible to reduce the time and expense required to make good quests? Stay tuned…