Zovirl Industries

Mark Ivey’s weblog

Forest: A Meditation Game

The Super Friendship Club runs month-long game pageants where participants make games related to a theme. For the Mysticism Pageant I made a meditation game called Forest.

Most games are about doing: building empires, killing monsters, driving fast. This game is about not doing, about breathing. There's no score, no goal. It isn't fun like other games, but is hopefully enjoyable. It's not really a game, but that's the best word I can come up with. ("Experience" would be more accurate but that sounds silly and has too many syllables)

Go play it now.


I wanted to do a game about meditation but mediation usually involves closing one's eyes and sitting very still. While I was struggling to figure out how to translate this to an interactive game, my wife and I attended a meditation workshop with Thich Nhat Hanh. One of the techniques we practiced was walking meditation, and I saw this was the solution: One does not need to be sitting with closed eyes in order to fully experience the present moment. This became the concept I would try to communicate to the player.

I loved the first half of pOnd, and wanted to make something similar to that, but taking the subject more seriously. I think pOnd's ending cheapened the experience, as if the creators didn't really believe in what they had started. They had a brilliant mechanic, though: encouraging the player to synchronize their breathing with their actions is powerful.

The forest spirits that are so prevalent in Miyazaki's films kept popping into my thoughts. Not only did they fit the mysticism theme well, they improved the game in several ways. Their appearance (or startled flight) provides feedback to the player. They move with the player's breath, deepening the synchronization. Finally, they provide a simple narrative hook for the start of the game.


I decided the core mechanic would be walking through a forest by pressing space as you breathe in, releasing as you breathe out. A quick prototype showed this was relaxing and engrossing.

At first I wanted to make the player figure this out on their own, to encourage a sense of discovery. The original version of Forest dropped hints about going slow and only showed the instructions about synchronized breathing if the player slowed down. If they didn't slow down, there was a "failure" ending which hinted at the player being too hurried. Metrics revealed that almost no one went slowly enough, though, so I gave up on that. Now everyone gets the breathing instructions and there is no way to "fail."

I wanted there to be an "aha!" moment when the player stops running and starts walking slowly. I intentionally try to mislead the player at the start by telling them how to run, hoping to get the player to experience the contrast between running and then relaxing. However, I deliberately avoided artificially increasing this contrast by changing the way the game is rendered when running. It would have been easy to decrease color saturation, draw trees in less detail, etc. but that wouldn't be true to the theme. The whole point is that the player notices more when walking, not that the game shows them more when walking. The detail has to be there all along to be authentic and not just a fake effect.

When making most games, much time is devoted to finding pleasurable reward loops. Basic breathing meditation is already enjoyable, though, so the game just tries to nudge the player to try it. I avoided adding traditional reward loops on top of this, partly because this risked smothering the fragile pleasure from meditation, and partly because I was concerned about replacing intrinsic motivation with extrinsic motivation.

One Last Thought

Many of the best games teach the player something, improve them in some way. This is something I aspired to. Being conscious of one's own breath is a powerful relaxation technique that can be used anywhere. Learning to relax and release stress is important skill that most people can benefit from. I have no illusions about achieving wide-spread public health gains via this game, but I do hope that it helps at least one person lead a more relaxed life.

Hokkaido, Japan by Bicycle (part 3 of 3)

In 2009, we spent three weeks riding bicycles around Japan.
This is the final part of the story of that trip.
(Part 1 is here and part 2 is here.)

September 10, 7:30 am, Pension Birao, Teshikaga

Distance ridden yesterday: 89 miles. Weather: sunny, slight headwind.

Rode 89 miles yesterday, setting a new personal record for the second time in a week. Started in Rausu and rode down the coast for a couple hours. Several tunnels, one of which seemed especially dark until I realized I had forgotten to take off my sunglasses. Stopped at a market on the side of the road; they had white chocolate made with melons from Yubari. It tasted exactly like fresh melons.

Turned inland after the market, crossing flat farmland with mountains in the distance. Rode on small back roads between the fields with a slight headwind the whole way. Yana and I weren't putting enough effort into drafting tightly behind Piaw (it takes concentration to stay close enough). Once we dropped back it was too much work to catch him so we just trailed after him for many miles.

Found a nice inn in Teshikage where we left our bags before going back out to ride up to Lake Mashu, part of Akan National Park. When we were in the park a few days ago we skipped Lake Mashu because of poor weather; it was nice to get a second chance. The scenery was well worth the climb. The road goes up the ridge so we had great views; the farmland at the base of the mountain glowed from late afternoon sun streaming through the clouds. The lake is a deep blue color and lies in a volcanic crater, far below the road which runs along the crater rim. On the opposite side there was a steep set of cliffs with puffy clouds behind. It was cold up there, and the rapid descent was even colder.

Dinner was Western style, but with an unmistakable Japanese influence: many small, well-presented dishes. Delicious.

Japanese Cranes in a field

September 10, 10:00 pm, Ryokan in Ashoro

Distance: 60 miles. Weather: patchy clouds.

Fish-shaped ice cream sandwich

Omlettes for breakfast this morning. Very Japanese, with 10 different small dishes. Well prepared, just like last night.

Rode over two passes today. Cold at times, with a headwind. My bicycle saddle has become increasingly uncomfortable the last few days. I've been trying to stay seated on the bike since my fork started making an ominous popping noise last week but now I can only sit for about 10 minutes before I have to stand up and give my butt a break. On the first climb this morning I couldn't take it any more and stopped to make a simple adjustment: I tilted my saddle forward a few degrees. That made all the difference; no pain for the rest of the day. Funny how the angle was fine for the first week and suddenly became unbearable.

Saw Lake Akan briefly at lunch. That's the last of the three lakes in Akan Park. For lunch I ordered chicken gyoza, expecting dumplings with chicken inside. What actually arrived were chicken wings stuffed with gyoza filling. Meanwhile Yana ordered veggie tempurah, which turned out to be shrimp tempura served over vegetables. No matter, we're flexible and both dishes were good.

We've been passing lots of road construction. There is almost always a man standing at the front of the construction with a whistle, motioning to traffic to slow down. Today we passed a construction site where they had a robot doing this job. It had a whistle and waved its arm as we rode past.

Staying at a low-end minshuku tonight. It was billed as a ryokan, which is supposed to be a step up from a minshuku, but this is basically just a room in some family's house. The plumbing is questionable. We've now experienced the full range of toilet technology, from robotic toilets with digital control panels all the way down to squat toilets (both with and without plumbing)

Supper was sushi rice bowls at a restaurant in town. Piaw was still hungry afterwards, so we went to a second restaurant for another meal. Hard to satisfy cyclist appetites with Japanese portion sizes. Finally we stopped by Seicomart (a convenience store) and I got frozen mochi for dessert. We've tried almost every snack Seicomart carries, so we need to start looking for other places to purchase food.

Our convenience store ritual goes something like this: Find a snack that looks good. Is it small enough to fit in our luggage? Good. Pick it up to see how heavy it is. Heavy snacks are good. Light snacks are mostly air, put them back on the shelf. Next check the calories. More is better. Low-calorie snacks go back on the shelf. The ideal snack has a high calorie-to-cost ratio and is dense so it doesn't take up space in our luggage. Japanese snacks are usually over-packaged, with outer wrappers, inner wrappers, plastic trays, etc. After purchasing, throw away most of the packaging before leaving the store to reduce bulk.

September 11, 9:00 pm, Drumkan Minshuku, outside Shintoku

61 miles, partly cloudy, headwind.

Another headwind day, so more pacelining. Good weather still holding. Starting to feel like autumn with cool air but warm sun. Near the end of the day we stopped a few miles outside Shintoku and tried to find a minshuku that the Touring Mapple recommended. We couldn't find it. Couldn't even find the village that was supposed to be there. Finally gave up and decided to ride on to Shintoku. As we rolled away Piaw and I finally spotted the place but it just looked like a house so we kept riding.

Five miles to the info center in Shintoku where the lady at the counter called a few hotels for us. All full, due to a golf tournament that was in town (aside: we saw the people playing golf on the courses. It didn't look like the golf I'm used to. Instead it looked like a cross between croquet and mini-golf.) She tried hotels in the next town, same problem: all full. By now three other people behind the counter had joined the search, calling various hotels. Finally she found a place: the one we had ridden past. She was concerned that it was too far for us to ride back, but it really wasn't. When you've already ridden 56 miles another five isn't a problem, plus there was a tailwind.

The minshuku was run by two brothers. Front room filled with guitars (at least 10) and a drum set. Every inn makes you fill out an info slip with your name, address, etc. Here, though, one of the questions here was "what is your favorite song?" Music theme firmly established, the brothers drove us to an awesome onsen for an hour or two, then we returned to enjoy a meal of Jingisukan together.

After dinner one brother sat down at the drums, the other grabbed an electric guitar, and they played a short set for us. Surf rock, loud and good. They were having at least as much fun as we were, maybe more, smiling and laughing. Next they both grabbed acoustic guitars and sang folk songs with Piaw. Easily one of the best nights of the trip. If you're in the area, give them a call and you'll get a night you won't forget. Take musical instruments if you have any. Their web page is here and it has a contact form.

September 12, Noon, restaurant in Tomamu

Touring gives you funny food cravings. We daydream about food even while eating. So far I've wanted a good hamburger, milkshake, breakfast cereal (corn flakes, frosted flakes, corn puffs), donuts (especially apple fritters), pizza, burritos and all manner of American sweets.

September 12, 10:20 pm, Yubari Forest Youth Hostel

82 miles, good weather, no headwind.

Turned into another long day. Left Shintoku and rode along twisty roads winding through the mountains towards Shimukappo. Followed some train tracks through a narrow canyon for a while, then rode next to the Doto Expressway, an unfinished superhighway. We originally planned to stop in Shimukappo. Weather was still holding, though, and no headwind so we decided instead to push on to Yubari. Wanted to spend another night in the lovely hostel there.

Some very busy roads, tunnels with no sidewalks, mountain descents with large trucks. Glad we didn't have to do it in the rain. We kept leap-frogging a military convoy. They weren't much faster than us when driving so we would pass them when they stopped and then when we stopped they would pass us. They kept the traffic speed low.

Made it to the hostel by five so we had time to shower before dinner. They put us in the cute cabin next to the main building. Lightly raining now but we have a warm fire and dry beds.

Spending so much time on the bike that days are starting to blur together. Life consists of the three essentials: eat, sleep, ride.

September 13, 6:40 pm, Lapland Lodge, Shikotsu

55 miles, overcast.

This morning I was tired of riding. Tired of pedaling, tired of wind, tired of bugs hitting my face hard enough to hurt, tired of traffic, ready to put the bike in its box and not see it again for a long time.

Met a group of serious cyclists outside Chitose. The first group we've seen. They were getting ready for a ride in a parking lot. We pulled in and chatted with them, trading snacks.

We stopped for lunch in Chitose at a sushi-boat place. Dishes come around on a small conveyor belt. Fish, fried chicken, mini-burgers, dessert. Plates are color-coded to indicate price. At the end you pay based on the stack of plates you've accumulated. Small faucet at each seat dispenses hot tea. Enjoyed this place more than most sushi places because we could eat exactly what we wanted and nothing we didn't.

After eating my spirits were restored and I felt like continuing. Since we rode extra yesterday we had enough time to take a side trip to Shikotsu today. It is another National Park east of Chitose with a large lake. Found a bike path to take us most of the way there. The path was separated from the road and a little overgrown.

Shikotsu is hilariously touristy. Between the parking lot and the information center I counted seven ice cream stands. We arranged lodging, looked at the stores selling touristy junk, ate some snacks, looked around the museum. They have evacuation instructions in case one of the local volcanoes errupts.

We're staying at the Lapland Lodge near the shore of the lake, a short ride from the main village. On the way over there was one long straight section of road. Far behind us I heard a couple motorcycles start accelerating. Sport bikes, by the sound. They kept accelerating. Even knowing they were coming I still jumped when they flew past. I've never seen motorcycles go so fast.

Parked our bikes at the lodge, then the owner drove us to a nearby onsen (which happened to be right back by the information center we had just been at). After bathing, we returned to the lodge where the owner made Jingisukan for us. We enjoyed it along with the other guests.

September 14, 2:00 pm, Train to Sapporo

21 miles, sunny.

Gentle downhill ride to Chitose this morning, along the overgrown bike path most of the way. Perfect weather. Disassembled and packed our bikes in the lobby of the airport hotel. Took about two hours. Quick showers then down to the train station below the airport to catch a train to Sapporo. Glad the ride is over, glad it went so well, glad our gear worked and glad we saw so many amazing places and met, if only briefly, so many wonderful people.

September 14, 8:30 pm, Train to Chitose

Old Ramen Alley

In Sapporo we wandered through several shopping malls, including an underground one called Pole-Town. Purchased gifts for people back home. Found socks with separate pockets for the big toe so they can be worn with flip-flops.

After shopping, we took the ropeway up Mt. Moiwa to watch the susnset. Mt. Moiwa overlooks the city and at the top there is an observation deck and a gift shop (of course). It was crazy to look off across the plains to the distant mountains in the west and realize that Yubari was over there. It seemed impossibly far away but it had only taken us a single day to ride there.

Once it was dark we went back down to the city to get dinner. We'd already seen New Ramen Alley so decided to go to Old Ramen Alley. Very similar setup: narrow alley lined with ramen shops, all serving giant bowls of steaming noodles.

The food on this trip was fantastic. A lot of the places we stayed mentioned that much of the food they served was grown locally. Makes sense, as we rode through farmland most days. Some food was even homegrown, like the mushrooms and homemade bread in Shikotsu. We noticed that the salads and fresh vegetables all tasted amazing, especially the tomatoes. Hard to know how much of this was because they were high quality, and how much of it was because we were riding hard enough to get very good appetites.

September 15, Plane to San Francisco

We're done.

Checked in for our flight early today; found out it was cancelled but we were early enough that they were able to book us onto a different plane instead. Much apologizing and bowing from the ticket agents.

Our bike boxes were too big to fit through the x-ray scanner at the airport. Instead some ANA staff with white gloves had us open the boxes for manual inspection. More apologizing and bowing.

Enjoyed one last Japanese meal at Narita airport, then boarded our plane home. And yes, the plane was Pokemon-themed, inside and out.


Over three weeks we rode 952 miles, across Hokkaido and back again.

Even though I ate almost constantly, had ice cream at every opportunity, tried every snack at Seicomart, even forced myself to eat when not hungry on a few occasions, I still lost 10 pounds by the end of the trip.

The first week after returning to the US, Yana and I kept bowing to people. We bowed when someone held the door, when taking the receipt from a store clerk, or when saying goodby to someone. We must have looked ridiculous.

Not long after returning we got rid of our bed and replaced it with Japanese-style futon mattresses stuffed with cotton. They can be moved out of the way or stacked in the corner of the room when not needed. We find them more comfortable and are getting better sleep on them. They are very firm and there's absolutely zero motion transfer when the other person moves around.

Took most of a week to get around to putting the bikes back together. Went out and climbed Old La Honda (one of the classic Bay Area bicycle climbs) to set a personal record while we were still in peak shape. It was many weeks after that before I felt a desire to ride again.

I never heard the popping noise from my front fork again. The only explanation that makes sense is that the quick release wasn't quite tight enough and had a little bit of play.

Yana and I have traveled several times since this trip, but only rented a car once, finding that we prefer to tour by foot or bicycle now. Without a car we can really see and smell and hear a place, and get to know it in a way that drivers don't.

Hokkaido, Japan by Bicycle (part 2 of 3)

In 2009, we spent three weeks riding bicycles around Japan.
This is part 2 of the story of that trip.
(Part 1 is here)

September 3, 8:00 am, Daisetsuzan Youth Hostel, Asahidake

Distance ridden yesterday: 35 miles. Weather: sunny, increasing clouds through day.

Yesterday morning fog covered Biei but burned off during breakfast. The Potato hostel in Biei served toast with breakfast. We had all been craving bread and ate almost a whole loaf during the meal, plus an entire jar of honey.

Left Biei after breakfast and rode across the valley, up the long gentle climb to Asahidake. Asahidake is the tallest mountain on Hokkaido, and like Tokachidake is part of Daisetsuzan National Park. There's a small ski town near the base of the peak with a nice hostel. After checking into the hostel we took the ropeway (gondola) up the mountain. It dropped us off by a small pond and a group of sulfur vents in the crater. From there, a trail headed straight up the rocky ridge to the cloud-covered peak. Loose volcanic rock, some dark and some yellow from sulfur. Above tree line the whole way. On the left side of the ridge the mountain dropped steeply down to the crater which was obscured by shifting clouds. On the right, it dropped down to alpine forests far below us.

The clouds cleared away from the peak for a while as we climbed, then returned. At a small shoulder just before the peak, we could look out above the cloud layer. When we reached the peak, the view down into the crater was blocked by clouds but we could see east across the park. Peaks and high hills extended that way for miles.

Met a backpacker at the top whom we had also seen on the trail at Tokachidaki two days before. While we had biked down to Biei and back up to this peak, he had hiked across the park to get here. Shared food and stories with him as we enjoyed the views from the peak.

To keep a light load on our three week trip I only brought two pairs of shoes: my cycling shoes and a lightweight pair of flip-flops. Cycling shoes are terrible for hiking so I wore the flip-flops on our hike. I wasn't sure how well they would work but I had done some training hikes with them back home to toughen my feet. Ended up being fine on the ascent, though they were amusing to the Japanese hikers we met. Most of them were well-equipped with sturdy boots, hydration packs, bear bells, trekking poles, etc. and they laughed when they saw my footwear.

On the steep descent the loose rock made for treacherous footing. With flip-flops, the trail required concentration to avoid slipping. Clouds started getting thicker as we descended. Soon the air blowing over the ridge was cold, gray, and damp.

When we got back to the hostel we were tired, dirty (especially my feet) and ready for the hot springs. The hostel's bath consists of an indoor hot pool and a beautiful outdoor pool formed out of lava rock with lush green plants growing all around. Very relaxing after a long hike.

At breakfast this morning we met a lady visiting from France. She works for the government and gets 10 weeks of vacation a year (sounded pretty nice to us). She wasn't enjoying the food in Japan, though, and ended up giving us some of her breakfast. We gladly accepted the extra calories. Portion sizes in Japan are healthy, not the ridiculously over-sized portions that American restaurants serve. This seems to be great for Japanese waistlines, as we have seen very few obese or even chubby people. Bicycle tourists, however, need massive numbers of calories every day so we are always on the lookout for extra food.

September 3, 8:00 pm, Tomato Minshuku, Biei

Distance: 49 miles. Weather: sunny.

This morning Brooks, Yana, and I took a side trip to Tenninkyo Gorge to see the waterfalls. A short gentle climb brought us to a small group of hotels nestled in a narrow canyon. Both sides of the canyon were cliffs of some kind of columnar basalt covered with trees and brush. Asked directions to the falls with my limited Japanese. A short trail brought us to the first one, Hagoromo-no-taki; smooth streams of water flowing down curved rock. We continued down the trail, along the edge of the river which flows through the canyon. The water had an odd blue color but was clear and cold. We soon reached the second falls, Shikishima-no-taki. Enjoyed the solitude for a while before heading back down to our bikes.

Daisetsuzan is a large park but only has a few roads approaching its edges, and none crossing it. The interior is only accessible by trail which concentrates visitors on the edges of the park and makes it feel like a small place. Yesterday on Asahidake we met the backpacker we saw at Takochidake. Today at Tenninkyo we met a mother/daughter pair whom we had talked to on the ropeway up to Asahidake.

After Tenninkyo we rode down to the information center in Biei. Talked to same helpful lady as before. She told us Piaw had already reserved lodging at a local minshuku (a sort of bed and breakfast) then she took our luggage, to be delivered to the minshuku. Service!

We headed out to lunch and the flower fields in Bibaushi. Rode along the "panoramic road" which offered wonderful views of the hills around Biei and the peaks of Daisetsuzan. Without heavy luggage the bicycles felt alive, snappy, full of energy. Ate lunch at a restaurant along the way then stopped at the ice cream stand next door. The lady running it seemed happy to see us and betwen her limited English and our limited Japanese we figured out what the flavors were and ordered.

The flower fields were filled with all types of flowers, arranged in bright stripes down the hill. They are at their prime in the spring but even in September the colors were beautiful. The whole operation was extremely touristy but I'm starting to expect that in Japan, where every scenic vista and tourist attraction has a gift shop next to it. Regardless, it was enjoyable to walk around among the flowers with mountain peaks rising in the background.

On the ride back to Biei we had our first flat tire of the trip. Caused by an old patch giving out and not road debris. Not surprising considering how clean the roads are here. The Japanese are either too polite to litter, or someone is doing an excellent job of picking it all up. Either way it leads to pleasant riding.

Went to a BBQ place for dinner. There was a small grill in the middle of the table, but it was so shiny and clean that we weren't sure whether we were supposed to put food directly on it on whether there was supposed to be a pan. Finally our waitress came over and demonstrated that we were in fact supposed to put the food directly on the grill.

September 4, 6:00 pm, Sounkyo Youth Hostel

61 miles, rain clearing to sun.

Left early this morning on our way to Akan National Park. This was our last time with Brooks as he has to fly home this weekend and opted to stay in Biei. It is sad riding on without him.

We left Biei and skirted the edge of Asahikawa on our way towards Sounkyo. Rained a bit so we were wearing our foul-weather gear. As we crossed the bridge over the river outside Asahikawa, Piaw noticed a bike path below us running along the edge of the river. It didn't show on our maps, but it looked quite nice and seemed to be headed the direction we wanted. Weren't sure it would take us to Sounkyo, but decided to try it so we left the road for the bike path.

Soon we saw a sign showing the distance to Sounkyo which reassured us that this path went where we wanted. Every kilometer we would pass another sign showing the decreasing distance to Sounkyo. The path was well built, looked new, and was mostly deserted. Unfortunately it turned out to be so new that it wasn't even finished yet. It ended abrubtly at a rest area, with a sign explaining that when the path was finished it would indeed go all the way to Sounkyo. Back to the road for us.

Arrived in Sounkyo at about 1:30. Lots of hotels nestled in the bottom of a river gorge, like Tenninkyo but larger. Ate lunch in the village then rode over to the waterfall viewing area.

There used to be a pedestrian/bicycle road through the bottom of the canyon, along the edge of the river. The road was closed after a landslide many years ago and never reopened. The gate across the road had various warning signs on it. We couldn't see any landslide and there was no one around so we went exploring. Weeds were growing through the pavement but the road was still in good condition. So much abandoned engineering back there: errosion-controlled steam beds, tunnels, bridges, all slowly getting overgrown. Found a second, taller gate across the road after maybe a mile, with a few large rocks in the road past the gate. This gate seemed harder to climb over so we rode back through the weeds to the gift shop and had ice cream.

Japan is in love with ice cream. You can buy soft-serve for 200-300 yen ($2-3) at every tourist stop, and there are tourist stops everywhere in Hokkaido. Every shop has a cute statue of an ice cream cone so it is easy to find the ice cream stands. We've been eating at least one ice cream cone every day. One of the benefits of touring by bicycle is that you need a lot of calories so you can eat pretty much anything you want.

Forgot to take off my outdoor slippers when I came back into the hostel after working on my bicycle. Very embarassing. Here's a quick rundown of the slipper system in Japan: There are three kinds of slippers: outdoor, indoor, and bathroom. Everywhere we've stayed has provided communal slippers for these purposes. You don't wear outdoor slippers indoors, you don't take indoor slippers outdoors, and obviously bathroom slippers stay in the bathroom. As an aside, you don't wear any slippers on tatami mats. This is all second nature to Japenese, but gaijin tend to screw it up and do shocking things like taking indoor slippers outside, or wearing bathroom slippers around the house.

Our hostel tonight doesn't have a bath so we paid to go to one of the fancy hotels to use their onsen. It was very nice with 2 different baths. One was on the 7th floor and had a great view of the gorge and surrounding mountains. The other was at ground level and overlooked a perfectly manicured lawn with lovely trees. Again Yana couldn't join us so we met up with her after.

September 5, 9:00 pm, Bihoro Youth Hostel

75 miles, rain in morning.

Drying socks while riding

Long day: 75 miles. Longest ride Yana and I have ever done. Still feeling great too, so we must be in good shape. Piaw says it is common for riders to get stronger during a tour, assuming they are eating enough. Rain this morning as we climbed the pass. Started with a 3.4km tunnel through Sounkyo Gorge. It had a sidewalk and large ceiling-mounted blowers to move air through the tunnel. Emergency phone booths the whole way. We rode with earplugs to escape the noise from the cars and the blowers.

The descent was cold and wet through the mountain forest, then gradual downhill across farmland to the city of Kitami. Traffic was heavy near the city and the road was narrow. Not much fun. No English speakers at the tourist info center in Kitami so we decided to just ride on to Bihoro.

Couldn't find the youth hostel when we got to Bihoro. As we were riding around looking for it we stumbled onto a street fair. A security guard told us we had to park our bikes in the bike parking area. We asked if he knew where the hostel was, but he lives in another town so he didn't know either. We wandered through the fair and bought a few snacks. When we got back to our bikes the same guard ran up to us. He had asked around and obtained a hand-drawn map showing where the hostel was. We ran into this kind of helpfulness over and over while we were in Japan. It was amazing.

Checked in at the hostel, showered, did laundry, then went back to the fair for more food. We were quite the curiosity, attracting lots of attention. People would say hello to us in English and get excited when we said hi back, but their English wasn't practiced enough to have a conversation. Everyone was excited to sell us food. At one food stall, Yana asked for crepes with blueberry and banana. This must have been unusual because all the people working in the stall sounded amazed and the order was repeated several times to confirm, then everyone laughed. At one place I think we got free chicken skewers just for being gaijin (foreigners).

In the middle of this fair, we suddenly heard someone speaking perfect English. This seemed surprising, since we hadn't seen any other foreigners. It turned out to be an Indian man making naan in a tandoor oven. He was serving it with curry and it was really good.

September 6, 8:30 pm, Lake Kussharo

43 miles, foggy in morning, headwind.

Short ride today, over the hill to Akan National Park. Headwind most of the way; foggy on top of the mountain. Foggy enough that my arms were wet and we couldn't see the visitor center from the parking lot. While we ate a snack the fog cleared so we had a good descent to Lake Kussharo on a damp road. The lake is pretty with clouds and fog on all the surrounding hills. Very humid.

As we get farther from Sapporo and deeper into fall it keeps getting harder to get tourist info in English. Either the information staff doesn't speak English (and is without English brochures) or the information desk is closed for the season. More and more we find ourselves on our own. Fortunately there aren't a lot of other travelers so lodging is easy to get and there is less need for reservations. We've just been riding into town and looking for a place we like.

For tonight we found a lovely hotel with good food next to Kotan onsen, an outdoor hot spring. There's also an Ainu museum next door. The Ainu were the native people who lived here before the Japanese colonized the island. The museum is a recreation of an Ainu lodge, filled with smoke from a wood fire in the middle of the floor.

The hot spring was the first free public spring we've been in and the view was fantastic, right on the shore of the lake. Separate parts for men and women, but right next to each other so Yana didn't feel isolated. After soaking in the hot spring we still had time before dinner so we rode back along the lake to ride around the Wakoto Peninsula, which sticks out into the lake. The trail which goes around the peninsula turned out to be a narrow hiking trail so we ended up mountain biking on our road bikes.

My fork started making a popping noise yesterday. Every time I try to pedal while standing up it pops. Piaw is worried that it may be breaking so we are hoping it doesn't get worse before we find a bicycle shop with a fork for sale. Until then, I'm staying seated while pedaling since it doesn't make popping sounds when I'm seated. Fingers crossed.

September 7, 8:00 pm, Utoro Minshuku

61 miles, tail wind turning to headwind in the afternoon.

Today Yana and I got tired of having wet feet. Piaw's fenders keep his shoes fairly dry, but our feet are constantly getting sprayed with water from our front wheels. Tried taping plastic bags over our shoes to try to keep them dry. Mixed results; fenders would be better.

This morning, while photographing funny swan-shaped paddle boats at Lake Kussharo, a young lady approached me. She was studying English and was excited to be able to practice with some native speakers so we told her about our ride and had a short conversation.

Though Lake Kussharo is beautiful, Lake Mashu is what Akan is really know for. It sits in the crater at the top of a volcano. The tops of the mountains were in the clouds today though. Didn't seem worth climbing up the volcano since we wouldn't be able to see the lake anyway.

Instead we opted for another long ride to get us to Shiretoko. Fast tailwind for most of the ride; 20mph at one point. Made good time until the road turned and the tailwind became a stiff crosswind. To cope, our paceline had to spread across the lane in an echelon formation, but the traffic was light and drivers were polite so it wasn't a problem.

Stopped at one bicycle store along the way but they didn't have any forks for my bike. They mostly had casual/commuter bikes, not road bikes. I'll just keep babying the fork and hoping for the best.

Saw the ocean for the first time on the trip today, and now we're in a minshuku overlooking the Utoro harbor. On this northern part of the island, signs have started to be in Japanese and Russian.

Ate dinner at a fish market down by the water. Had a sashimi dish that consisted of carefully arranged salmon on a bowl of rice, topped with salmon roe. Very good. It was called "Mother and son."

September 8, 7:30 pm, Rausu Hotel

20 miles, rain & wind.

So wet today. Rain almost all day. Took the bus out from the Shiretoku nature center to Kamiuiwakka-no-taki, a hot spring waterfall. It was interesting to wade up the creek in the rain and not have cold feet but the trip was ultimately disappointing. The rangers didn't let us go all the way to the actual waterfall. The water where we were was tepid, not even warm.

After returning to town on the bus, we started our ride. The climb up Shiretokotoge pass was lonely, as we all rode at our own pace and were soon separated. I listened to the rain on the trees, watched drops of water form on my helmet brim, watched the water drip off my head and shoulders down past the bike, and watched the water run down the road into storm drains. I unzipped my jacket, trying to find a balance between getting sweaty with the jacket on or drenched with the jacket off. It didn't matter much, as I was wet all day anyway. Cars and buses drove past and it was like their drivers were in separate universes, speeding along in a little bubble of comfort, warm and dry. Once they disappeared in the rain I was alone again and still wet. At least the deer shared my universe, and understood what it was like to be drenched as they stood in the wet brush and watched me ride past.

Near the top I rode into the cloud and it felt like my universe got smaller. The wind picked up and occasional patches of lighter fog blew past. Soon the wind was racing past and I could see glimpses of blue sky over the pass, promising better weather on the other side. A false promise. At the top I let the wind push me into the parking lot. The road I had just climbed was hidden by a dense gray wall of cloud. Looking down the other side of the pass showed sunny hills and blue ocean below, with clear sky beyond. The wind whipped over the pass, pushing me around even as I stood. Yana and I dressed for the descent in the bathroom as drivers/passengers braved the cold for a few minutes to look over the edge. They would scurry back to their warm cars after snapping their photos, while we stood in the doorway of the bathroom, wet and cold and preparing ourselves for the descent.

The first few turns were ok, then the wind picked up. It shoved us around our lanes, threatening to push us off the road or into incoming traffic. It alternated between a tailwind, hurling us down the mountain faster than we wanted to go, and a gusting headwind trying to stall us and throw us to the ground. It was scary and beautiful. Around one corner the headwind was so strong I couldn't shift down fast enough to keep pedaling. I wobbled to an unsteady stop as the wind gusted into my face. Around another corner, a rainbow appeared over the green hills below me. By the time we reached the town of Rausu at the bottom we were all cold and mentally exhausted. We decided that was enough riding for the day, even though we had only gone 20 miles. Shiretokotoge in bad weather is not to be taken lightly.

Rausu gave us a view of Russia* and really felt like the end of the world. Tried four or five places looking to find lodging. They kept saying they were full. Never did figure out whether that was true or whether we looked so wet and bedragled that they decided we wouldn't make good guests. Finally ended up going to one of the more expensive looking hotels only to find it wasn't expensive after all. We have a view of the harbor from our room.

Dinner was sashimi across the street from our hotel. On this far end of the island there are no English menus, no picture menus, no wax models of the food. Piaw and the waitress ended up writing kanji on a napkin to communicate. Wonderful food and presentation. At the end of the meal we asked about dessert. After thinking about it the chef and the waitress decided they could serve potato mochi. It was fried and sweet, weird and delicious.

* The islands off the coast are currently under Russian control, though Japan claims them as part of their territory.

View more pictures

Continued in part 3...

Hokkaido, Japan by Bicycle (part 1 of 3)

In 2009, we spent three weeks riding bicycles around Japan. This is the story of that trip.

August 26, 1:20 pm, Flight to Tokyo

We’re finally on the plane to Japan. There are four of us: Piaw (the trip leader), Brooks, Yana, and myself. The plan is to spend three weeks riding around Hokkaido, the northern-most island of Japan. We’ve been preparing for this ride for months: buying supplies, preparing equipment, building new wheels, studying maps, learning a bit of Japanese, going on training rides. The last week has been a blur with time flying by constantly as we finished packing. Now there’s a sense of calm: we’re on the plane and there is nothing else to prepare. The trip has been set in motion and we’re just along for the ride.

Below us, in the cargo hold, our bicycles sit in their boxes. Above me I’ve stowed my two small carry-on bags. Bicycling forces you to travel light: those two bags are all I have for three weeks of riding. It is oddly liberating to not have a full suitcase of stuff to lug around and worry about.

August 27, 8:42 pm, Sapporo International Youth Hostel

Distance ridden today: 30 miles. Weather: rain, tail wind.

Flight landed at Chitose airport late last night. Piaw had arranged lodging at the airport hotel so we didn’t even have to leave the terminal. Retrieved our bulky bicycle boxes from baggage claim, loaded them onto luggage carts, and took the elevator up to the hotel. Went straight to sleep.

Assembled our bikes in the hotel room this morning. They had been packed, partially disassembled, in cardboard boxes for the flight. The airline (ANA) handled the boxes quite carefully; not a dent or scratch on them. Moved the furniture around in the small hotel room to get a space big enough to work in then built the bikes back up, piece by piece. Pedals back on. Chains back on. Handlebars reattached and adjusted. Front wheels attached. Rear derailleurs bolted back on. Luggage racks reattached. Quiet, cathartic work which reminded me of the book Off the Map: Bicycling Across Siberia by Mark Jenkins. After finishing with the bikes we droped the boxes at the hotel desk and got breakfast in the airport. We’ll be staying in the same hotel on the last night of the trip so they are willing to hold our empty boxes until we return.

When we took our bikes outside after breakfast, it was raining lightly with overcast clouds. Piaw had previously warned us about his route-finding. He likes to find obscure back roads, dirt roads, and trails whenever possible. Twenty minutes into our ride, with the airport still in sight, the side road we were on came to a dead-end and so we found ourselves climbing over a chain-link fence with our bikes in order to get back to the main highway. Piaw was pleased.

The gently rolling road cut through miles of forest as it headed northwest into Sapporo. Had a strong tail wind, making the riding easy. The rain continued off and on; not enough to be miserable but it kept the road wet so my rear tire was spraying water up onto my back. My shorts were soon wet and muddy, which was a little awkward when we stopped for lunch and I had to sit in a restaurant. I regret not bringing fenders.

Once in Sapporo, traffic was heavy enough that we decided to follow local custom and ride our bikes on the sidewalk instead of in the traffic lane. Still somewhat harrowing as we had to worry about pedestrians, other bicyclists, and various obstacles. There are bikes everywhere in Sapporo, all of the commuter variety with no road bikes in sight. Many riders were carrying umbrellas while riding with one hand. One enterprising young man was holding a clear plastic umbrella in front of him like a windshield.

Tonight we’re staying at the Sapporo International Youth Hostel. The accommodations are quite nice: small private rooms with tatami mat floors. There is a tiny entryway for removing shoes (wearing shoes on tatami is frowned upon) and hanging our wet rain jackets. In the middle of the room there is a low table with chairs; for sleeping the table folds up and stores in the closet so we can lay thin mattresses on the tatami. Downstairs there’s a Japanese-style bath and a dry garage for our bikes.

Washed my clothes in the shower (only brought two shirts so I’ll be doing laundry most days) then headed out for supper. Ended up in New Ramen Alley, an odd underground tunnel packed with ramen shops (there’s also an Old Ramen Alley). We picked one mostly at random, ducked inside, and were immediately enveloped by hot, humid air. The interior was dark and cramped. We took four seats at the counter and gave our order to the chef by pointing at the picture menu. He cooked the noodles right in front of us and served them in huge bowls. They were delicious.

August 28, 9:40 pm, Sapporo International Youth Hostel

Distance: 2 miles. Weather: some rain.

Woke early this morning and crossed the river to explore Nakajima park. It was green and beautiful. The clouds had lifted enough to offer views of the mountains at the edge of town. Saw a group of bicycle tourists preparing their breakfast on a small stove. They had spent the night camping in a gazebo in the park.

Ate our breakfast back at the hostel. Japanese breakfast consists of steamed rice, fish, miso soup, various vegetables (some pickled), and eggs. More rain forecast today. Instead of riding in the rain we decided to see the town. There was a subway station right next to the hostel so we got day passes and were off to explore. Brooks and Piaw wanted to explore the fish market while Yana and I went to the botanical gardens. The gardens were green and lush, likely owing to the recent rains. We walked along through the park in the damp air, enjoying the beautiful collection of plants.

Called Piaw and Brooks from our mobile phone and arranged to meet at the Sapporo beer museum. Had a hard time finding it. Tried asking a lady for directions but our Japanese is not good enough and we couldn’t explain where we wanted to go. Eventually spied its tall tower after wandering around some more.

Found Piaw and Brooks at one of the museum restaurants, where they had just finished lunch. We joined them for a tour of the museum, then headed back to downtown to spend the afternoon looking at sights and shopping.

As dinner time approached, Yana and I remembered how good the food at the beer museum had looked so we decided to return. When we arrived it was crowded, hot, and smoky from meat being grilled. We managed to order by pointing at the menu and using hand signals. The restaurant specializes in Jingisukan (sounds like Genghis Khan), a popular local dish. The food arrives raw: a huge plate of vegetables and meat. There is a domed skillet in the middle of the table on which you cook the food. Similar to Mongolian barbecue, only cooked at the table.

Back at the hostel we took advantage of their Japanese bath. The centerpiece is a large pool of hot water. There’s also an area with short stools, faucets, and buckets for washing before entering the pool (getting in the pool without washing is a major faux pas). After walking all day in flip-flops, my feet were sore but alternating between soaking them in a bucket of cold water and then hot water felt great. There are separate baths for men and women since everyone is nude. Not a problem for the three guys but Yana was lonely in the bath by herself.

August 29, 8:57 pm, Yubari Forest Youth Hostel

56 miles, sunny.

Long day of riding today, east across the plains and up to the mountain town of Yubari. We took a wrong turn leaving Sapporo but didn’t realize it for half an hour. Eventually we got suspicious when we re-crossed the river that had gone past the hostel and could still see downtown Sapporo on our left, where it should not have been. After some careful map checking we realized our mistake. By then it was easier to pick a new route than double back. Our map (the Touring Mapple) showed a trail through the nearby Nopporo forest park which went exactly where we wanted so we headed towards the park. In the town of Oasa, just outside the park, we happened across a bike store and showed him our map, asking about the trail. The owner told us that our plan wouldn’t work: we wouldn’t be able to bike across the trail with our road bikes.

A lesson soon learned when bike touring is that you can’t trust route advice. Drivers underestimate the size of hills, non-cyclists underestimate how far you are capable of riding, and casual cyclists assume you can’t ride off pavement. During our training we had specifically practiced riding over dirt roads with loaded bicycles (because we knew that Piaw would ride on dirt if possible), so we decided to ignore the shopkeeper’s warnings and check out the trail anyway.

The park was flatland forest. Some parts looked natural, others were obviously planted (with trees in rows). The trail turned out to be a dirt road which cut right through the middle of the forest. It was perfectly rideable except for one fallen tree that we had to carry our bikes over, which made two days of climbing over obstacles in two days of riding. Again, Piaw was pleased.

After the park, most of our day was spent riding past fields and farmland, headed east across the plains toward the mountains. The sun was warm when we stopped at a small restaurant for a late lunch. Had donburi, a rice bowl with egg on top followed by ice cream from the place next door.

There are a lot of vending machines in Japan.

The climb up to Yubari was gentle and not very long. Road was well-built, like all the roads here. Although it was out in the country it had a sidewalk wide enough to drive a car on. Even when the road went through a tunnel, it still had a wide sidewalk. At the top, Yubari sits nestled in a small valley. In the winter it is a ski town, but in August it sleeps, waiting for the snow to come.

Had some trouble finding the hostel. It is outside of town a bit and we were riding around the farms and hills looking for it. Stopped to ask a lady gardening if she knew where it was. She bowed to us, went inside and came back with her whole family. They decided we were on the right road and just had to keep riding. We thanked them, bowed quickly, and rode on.

There is a lot of bowing in Japan. Asking for help leads to lots of bowing. Every purchase involves bowing. Usually entering/leaving a store does too. Hold a door open for someone and you're likely to get a quick bow. We even had a lady riding a bicycle in the opposite direction to us bow as she rode past (I think she was worried she had inconvenienced us). It is a very polite society and very pleasant to visit.

The hostel is a beautiful wooden house that reminds me of a cozy ski lodge, complete with wood stove. Japanese-style bedding again, with sliding doors on the rooms. Back home, this place would be called a bed and breakfast, not a hostel. The dinner they served was amazing. 2 kinds of cooked fish, pickled tomatoes, figs for dessert. Best food of the trip so far.

August 30, 9:00 pm, Highland Onsen, Furano

65 miles, overcast.

I woke up early again and went for a ride before breakfast, looking for a spot to photograph the fog in the valley below us. Air was fresh and cold, with the smell of flowers and woodsmoke. A good, crisp, mountain morning.

Rode through the mountains today northeast towards Furano. Long gentle climbs and open, relaxed descents. The top of every climb ends with a tunnel. Most tunnels were short but one was 2.7 km. It had curves so you couldn't see the end. We turned on all our lights and rode in a tight group. The air was cold and smelled like exhaust; passing cars and motorcycles filled the whole tunnel with a roar that you couldn't escape.

There was no food or water along the route through the mountains so we brought snacks from a convenience store with us. Stopped by a lake to eat some and a beautiful red fox came begging for food. It was odd because it seemed like we were in the middle of nowhere but this fox obviously had seen enough people to be accustomed to handouts.

Later we stopped at Sandantaki, a pretty series of craggy waterfalls, and ate more snacks. Bicycle touring involves a lot of eating. After Sandantaki there was a long descent towards Furano. Brooks got up front and we all tucked into line behind him. He had to pedal but the rest of us could just coast, out of the wind as we drafted behind him.

Tonight we're staying at the Highland Onsen, a hot-springs resort perched on a hill above town. Furano is another ski town so there are mountains all around. Across the valley to the east rise the mountains of Daisetsuzan National Park. The onsen has large baths, with multiple pools: hot, cold, really hot, plus one outside that overlooks the valley. Separate men's and women's bath again, though the wall dividing them does not go all the way to the ceiling so Yana can hear our chatter as we all soak.

The dining room at the onsen overlooks the valley, and as we ate dinner we got to watch as the setting sun behind us painted the mountains of Daisetsuzan with brilliant red light.

Western-style beds tonight. A common concern among innkeepers is that we won't want Japanese-style meals or bedding. I can only assume that they have had bad experience with picky tourists before. Our Japanese is not good enough to explain that we are traveling to see something different and that if we wanted western-style food we could have just stayed home, so instead we just smile and reassure them that we find Japanese food delicious.

August 31, 9:32 pm, Kamihoro Onsen, Tokachidake

43 miles, overcast.

Glad I learned the kanji for "men" and "women", as this morning the bath I had enjoyed last night was labeled "women's" instead of "men's." Apparently they swap the rooms back and forth. The layout of the two baths is slightly different; I assume they rotate them so that guests can enjoy both.

Took a morning walk through the woods around Highland Onsen. Judging by the pictures in the lobby and the gift shop full of lavender products, the onsen's claim to fame is the lavender fields out front. Walked through the fields this morning but we're too late in the season and there is nothing to see this time of year but low-cut bushes.

After breakfast we rode down to the Furano Cheese Factory and had some really good samples of cheese: the creamiest brie I've ever had and a couple other varieties. Their cheese-making class was full so we attended an ice-cream making class instead. After putting on cow-print aprons, the teacher had us mix the various ingredients together, then we put the milk mixture into a freezer. While that was freezing she showed us how to make waffle-cone bowls and gave us the batter so we could make our own bowls. Being hungry cyclists, we ended up making a lot of waffle cones. Apparently the lady hadn't expected this, as when she saw us with more than four bowls she quickly came over and took the batter away. Oops. They were delicious, though.

After eating lunch at Furano Cheese Ramen, where they put slices of cheese on the noodles, we finally got around to the day's riding. Our goal was the Kamihoro Onsen on Tokachidake, one of the mountains on the other side of the valley. We took the long way, through Rokugo and the foothills. Along the way the light on my bike fell off and skittered into the road where it was promptly run over by a truck. The other drivers, having enough time to react, all politely slowed down and steered around the debris. At a break in the traffic I was able to retrieve the pieces. Slightly misshapen now, has to be held together with tape, but it still works. Good thing LED lights are durable.

The views back into the Furano valley were amazing: sweeping fields backed by big mountains. Rolled through the foothills and stopped at a natural spring to refill water bottles before starting the serious part of the climb. Volcanoes tend to get steeper the higher up you go. The closer we got to the onsen at the top of the road, the slower we were going. At 6 miles, we were going 6 miles per hour. 45 minutes later, we were going 3 miles an hour with 3 miles left. This carried on until we finally rolled up to the onsen at about 5 pm.

The Kamihoro Onsen is situated on the side of the mountain, with an amazing view of the valley. We briefly soaked in their outdoor bath looking at the land we had ridden over. Our room and the dining room also overlooked the valley so we got to continue enjoying the views while we ate. As the sun set it lit up the foothills below us in dozens of shades of orange.

Dinner was Jingisukan again. Smaller portions than the beer museum but more variety. One of the most tender pieces of meat I've ever had. Dining room was mostly empty, must not be a peak time for them.

After eating we retired to the baths for the second time to soak our sore muscles. This bath was built from rustic wood. They must not filter the hot spring water because it was somewhat murky and smelled like minerals. They have a fantastic cold pool and although the others couldn't take more than I quick dip I kept my legs submerged they were numb.

This is where you wash

Cold pool on the left, hot on the right.

September 1, 8:00 pm, Potato Hostel, Biei

44 miles, heavy rain in morning then sunny.

Weather was unsettled this morning, with gusts of wind blowing through our open window when we woke up. It started raining before breakfast but we went on a hike anyway. Went up to the volcano crater. Weather got worse as we climbed, leaning into the wind, the rain stinging like hail. The crater was in a steep valley with sulfur steam vents. The weather was the perfect compliment to the location.

When we got back down to the onsen we were dripping wet. They kindly let us warm up in the hot water baths again. The rain quit while we were relaxing but the road surface was still wet so I attached a makeshift fender to my bike by cutting a plastic water bottle in half and bolting it to my fender. Between that and my front light which is now held together with electrical tape, my bike is starting to look like some kind of improvised contraption instead of a stately touring bicycle.

After our descent the sun came out and we rode through beautiful rolling farmland to Biei. At the visitor center in Biei we met the most helpful lady. She spoke excellent English and helped us get our lodging reservations for the next couple nights. Checked in at the hostel. There was some confusion with our reservation and they did not have dinner for us, and the local restaurants were already closed. After talking with the cook they decided they could provide food for us, but they must have seen how much bicycle tourists eat because they warned us that they wouldn't be able to provide large portions. We gladly accepted.

With dinner arranged we went out for a ride along the back roads of Biei before it got dark. On the way back I stopped to take a picture of a house while the others continued riding. I jumped back on the bike and rode hard to catch up with them, but couldn't manage to get them back in sight. After a while it dawned on me that I should have seen the hostel already. I had taken a wrong turn. Rather than go back, I decided to keep riding as up ahead there was a cross road that I could take to circle back to the hostel. When I reached the hostel, I saw only two bikes outside. Yana's bike was missing so back out I went, looking for Yana as she looked for me. Eventually we met up and returned to the hostel.

View more pictures

Continued in part 2...

Solarized Cheat Sheet

I’ve been enjoying Ethan Schoonover’s Solarized Color Scheme. However, when setting up various programs to use it, I’ve found I wanted to have the example pictures right next to the table of RGB/Hex values. This makes it easier to find a color in the picture then look up the values in the table. So, here are the images and the table, together:

base03 #002b360 43 54 1931002115-12-128/4 brblack 234#1c1c1c
base02 #0736427 54 66 19290 2620-12-120/4 black 235#262626
base01 #586e7588 11011719425 4645-07-0710/7brgreen 240#585858
base00 #657b8310112313119523 5150-07-0711/7bryellow 241#626262
base0 #83949613114815018613 5960-06-0312/6brblue 244#808080
base1 #93a1a11471611611809 6365-05-0214/4brcyan 245#8a8a8a
base2 #eee8d523823221344 11 9392-0010 7/7 white 254#e4e4e4
base3 #fdf6e325324622744 10 999700 10 15/7brwhite 230#ffffd7
yellow #b589001811370 45 100716010 65 3/3 yellow 136#af8700
orange #cb4b1620375 22 18 89 805050 55 9/3 brred 166#d75f00
red #dc322f22050 47 1 79 865065 45 1/1 red 160#d70000
magenta#d3368221154 13033174 835065 -055/5 magenta 125#af005f
violet #6c71c410811319623745 775015 -4513/5brmagenta61 #5f5faf
blue #268bd238 13921020582 8255-10-454/4 blue 33 #0087ff
cyan #2aa19842 16115217574 6360-35-056/6 cyan 37 #00afaf
green #8599001331530 68 1006060-2065 2/2 green 64 #5f8700

A fighting platformer, in HTML5

Back in October, Google hosted a two-day HTML5 game jam at their San Francisco office. Chris Killpack and I both attended and paired up to make a game. This is a playable log of our progress.

Brief note on the demos: They work in Safari, Chrome, and Firefox. They don't work in Internet Explorer 8. I haven't looked into why (this is game jam code after all).

Day 1, 2:45 pm

We got started a bit late and don't have much of a plan. The intial idea is to make a simple 8-bit fighting game, two player hot-seat. Chris sets up a repository on his subversion server while I start a simple game loop rendering to a <canvas> element.

Day 1, 4:00 pm


Basic keyboard controls started. A and D move, R punches (we're expecting the player to use two hands for this, by the way). Chris is working on sprites. We found a collection of adorable 8-bit versions of Street Fighter characters, and they're animated. We'll use these as stand-in art until we either can get permission to redistribute them or until we replace them. [In the end getting permission got complicated so we drew new art from scratch.] Chris is converting the animated gifs into sprite sheets and writing a class to manage them.

Day 1, 7:00 pm


Sprites are working. Now there are keyboard controls for both players (player one still uses A, D, and R. Player two uses left/right arrow to move and comma to punch). Moving away makes you block punches. Player health is shown at the top of the screen, and the game resets when one player runs out of health.

Added debug mode (press P), which draws the exact locations of the players, collision boxes and shows keycodes as you press keys.

We have enough working to start tweaking gameplay. Made it so players can't move while punching. Fiddled with the punching range a lot until it felt right. Made getting hit push the player back a bit (which makes the punch seem a lot more powerful).

Day 1, 9:15 pm


Worried that a straight fighting game will be boring. Decide it should also be a platformer with pits that the players can fall into. This requires a bunch of new features:

Still tweaking the gameplay in a lot of ways:

Done for the day.

Day 2, 8:45 am

Chris can't make it today. I start off slowly by cleaning up code from yesterday.

Day 2, 1:00 pm


Added throws. You can't block throws, so if someone is blocking all your punches, throw them. Throws also take a long time, though, so if you miss you'll be vulnerable.

Made scrolling stop if O is pressed (scrolling is annoying when developing)

Lots of tweaks to the feel of the game:

Day 2, 2:00 pm


A few more tweaks to gameplay: Players start farther apart, there are more holes, and players actually die in the holes now.

The official game jam will be over soon so I added some instructions, an intial "Fight!" screen and a "Game Over" screen. It is surprising how much more finished this makes the game feel.

Day 2, 6:00 pm


After I got home I worked on the game a little more. Tweaked damage values. Only start killing players after they fall a long ways into a pit. Made the game loop exit if you press ESC.

I also added some noise to the sky and ground. This is a trick I learned from Amit Patel and it does wonders for pulling things together visually.

This is the final verison of the game. You can get the code to this game on code.google.com

In addition to the keys documented in the instructions, there are a couple other keys useful for debugging:

(Note: I've modified the code slightly in these snapshots. To make it easier to post, I've jammed everything into a single .html file instead of splitting out separate .js files. Also, as mentioned above, these aren't the character sprites we started with because we didn't have permission to redistribute those.)

A Short Update

Writing regularly is a habit. For me, it is one which requires a bit of discipline to maintain. A little over a year ago, a combination of three obstacles broke my habit of writing regular posts on this site.

A trip that left no time or energy for writing

At the end of August 2009, my wife and I went on a bicycle tour in Japan with two friends from work. Over the course of 3 weeks we rode almost 1000 miles. Preparing for the trip took a lot of time: we built new wheels for our bikes, sewed dry bags and arm warmers, and did a lot of training rides. It didn't leave much opportunity for writing.

A project that wasn't making any progress

I tend to write about projects I'm working on. I've been working on a game called Island of Naru for a while. After our bicycle trip, though, I got stuck and wasn't making progress. I tried various approaches and made a lot of prototypes, but in the end didn't find anything fun. That didn't give me much to write about.

Technical difficulties

Finally, the server on which I was hosting this site had some problems last winter that made it difficult to write new posts. WordPress was loading pages very slowly, and the admin interface was too slow to use. I never did figure out what the problem was. It went away on its own, but by then I had gotten out of the habit of writing and was busy with other things.

Now that I'm coming back to writing, these three obstacles take on a different light: they have become potential topics to write about. The Japan tour deserves a trip report. The problems I hit with the game left me with material for several posts, plus an exciting new field to explore: game design. The website slowdowns helped convince me to migrate my site to Google App Engine, which was an interesting experience. Expect to see posts on these topics soon.

Overnight ride to Pigeon Point Lighthouse

The weekend after our Point Reyes trip, Yana and I did an overnight bicycle trip to the Pigeon Point Lighthouse.  We wanted to join a friend from work, Piaw, on a 3-week cycling tour of Japan which he was organizing at the end of the summer.  Every year before he tours, he organizes a prerequisite shakedown ride so we were joining him for that. Pigeon Point is his usual destination for these shakedowns.  It lies on the coast between Half Moon Bay and Santa Cruz, about 50 miles from Silicon Valley, and there’s a youth hostel (with a hot tub overlooking the Pacific!) so it is an ideal destination for an overnight bike trip.

The hostel is quite popular (at least during the summer months) and we were only able to get reservations for Sunday night.  It was forecast to be hot in the valley on Sunday so we got up early.  After meeting our friends there were some last minute gear adjustments (mounting extra water bottle cages, for example) before we departed.  After leaving Sunnyvale, we rode out past Steven’s Creek reservoir, then up Montebello road.  By the time we reached the climb the sun was high enough to be warm.  Montebello starts out steep as it leaves the reservoir, then gets a little more gentle once it approaches the top of the ridge.  When we reached the end of the pavement (Piaw likes finding dirt roads to ride on), the sun was hot. The 2-track dirt fire road goes right over the top of Black Mountain and we pedaled along, baking in the heat as we crunched through the dusty gravel.  The rolling hills were covered in dry grass, being bleached by the sun. I had already finished two full bottles of water before we reached the top.  Fortunately, on the other side of the peak, there’s a lonely drinking fountain next to someone’s driveway.  I don’t know who the kind landowner was who provided such an oasis, but we were certainly grateful as we stopped to refill our water bottles.

Having crossed the mountain, we had a long descent ahead of us down Alpine road.  Everything was hot at this point; my brake levers and handlebars felt warm to the touch. The air was hot, and dried out our eyes as we sped down the hill.  The road descended down the spine of the hill, playing with the steep ridge, first on one side of the ridge, then crossing to the other side, occasionally winding around a small hill then back to the ridge.  On either side the grass-covered hill dropped away sharply and riding felt like flying as we banked around corners with the landscape far below. Each turn offered views of broad vistas when we were able to glance away from the road.  It is a curse of biking that on the way up the hill you are too oxygen-starved to enjoy the view, and on the way down you are going too fast to look away from the road.  (Of course, one could always ride slower, but that thought rarely occurs in the moment). About halfway down the hill the road made a sharp right turn and dropped off the ridge, plunging into the trees.  It wound its way down to a creek at the bottom of the steep, wooded valley.  The road here was narrow, without a centerline, and the corners were tight.  After the sweeping vistas above it felt cramped, the riding no longer felt like soaring.  The corners demanded attention and plenty of braking.

We regrouped at the bottom of the hill.  Having already conquered the main climb of the day, we only had a few smaller hills between us and the ocean.  The air was already cooler here, and much of the road was through the forest.  We rode on to the small town of Pescadero where we stopped for lunch. The market sells wonderful garlic artichoke bread fresh from the oven. We bought two big loaves, still warm and moist in the middle, and enjoyed them at the picnic tables on the lawn behind the store.  This close to the ocean, the air was chilly and over the course of the meal we moved out from under the shade of the table’s umbrella to recline in the sun on the grass.  After our meal, we returned to the store for groceries for the evening’s meal.  We picked up pasta, two more loaves of half-baked bread (we would finish baking them at the hostel), and a fresh pie.  All the food was stored away in saddlebags and paniers, except for the pie.  It was delicate, but since Piaw and his girlfriend, Lisa, were on their tandem bike, Lisa was able to hand-carry the pie as we rode.

We left Pescadero via Cloverdale road, a lovely little road that heads south through a small valley, paralleling the coast.  Although we had seen that there was fog closer to the water, Cloverdale road was one hill inland and that was enough to grant us sunshine.  After several miles of rolling past fields, the road got narrower and met up with Gazos Creek road to wind along the creek bottom until it dumped us out on Highway 1 at the ocean.  The weather here was overcast and windy; cold. It seemed a world away from the dusty, dry heat we had been in just a few hours before, only 50 miles away.  We had a brisk headwind as we backtracked a few miles to the lighthouse. After checking into the hostel, I explored the beaches by foot.  North of the lighthouse was a long beach being pounded by the waves and wind, but south of the lighthouse there was a quiet cove, with stairs down to it.  I had brought a swimsuit, so I went in for a very (very) brief swim.  Although I would have enjoyed the freezing water earlier when we were roasting in the sun on top of Black Mountain, it was much too cold now that the sun was gone.  I got my head wet and then stayed out of the water until we hit the hot tub after dinner.

Monday morning we got up early because we had a long ride in to work.  It was cloudy and cold as we rode north along the coast, cutting inland to ride through the rolling hills and farmland.  Our goal was Tunitas Creek road, a beautiful climb up a ravine in a dense redwood forest.  Redwood trees are magnificent in grey overcast weather like this, and the temperature was great for climbing.

Even though we had only been gone one night, I still had an odd feeling of independence as we rode in to work.  It was similar to what I had felt the previous weekend, on our Point Reyes ride.  There’s something about traveling by bicycle: knowing that you’re carrying whatever supplies you need and that you have the freedom to ride wherever your legs can take you.

Bicycle Trip to Point Reyes

For our wedding anniversary this year Yana and I rode our bicycles to Point Reyes for the weekend.  Our previous bike touring experience was limited to a single overnight camping trip, so this was a fun new adventure for us.  Several weeks ahead of time we made reservations at the Bear Valley Inn in Olema, a great bed and breakfast that gives a discount if you arrive by bicycle.  This is one of my favorite places to stay as the owners are both very active and know lots of great places to hike and ride.  It is also the only bed and breakfast we’ve stayed at where the innkeeper went running with us in the morning.  A few days before our trip we planned our route and checked our bikes over to make sure they were working.  Friday morning we packed everything up and rode to work.


After work on Friday I jumped on Caltrain and rode up to San Francisco.  Yana met me at the station and we started our ride at about 5:30 PM, heading along the waterfront towards the Golden Gate bridge.  When I first started road biking a couple years ago, riding in traffic was scary.  It still is sometimes, but as I’ve gotten better at it I’ve started to realize there are different kinds of traffic.  We had the good kind of traffic: polite and slow.  When the cars are driving about the same speed as the bikes, they tend to be more patient when passing and it is easier to take the whole lane when needed.  If there’s a delivery van parked on the shoulder, say, it’s easy to merge into the traffic lane without cutting off any cars.  I was pleasantly surprised to find that there are also a good number of bike lanes and small empty streets between the train station and the bridge.  Quite a bit of the route didn’t have any cars at all.

The bicycle lane on the Golden Gate bridge was mostly empty when we arrived so we didn’t have to worry about colliding with other riders.  Instead we admired the view of the Marin headlands and watched a ship leaving the bay with a small tugboat following.  The wind was steady and cold and we leaned into it as we rode along the span.  At the bridge’s towers, the sidewalk sharply bent around the massive orange columns and the wind changed angles, alternately trying to push us into the tower and then into the fence.  On the lee side of each tower the wind briefly stopped, giving us a moment of quiet warmth before rolling back into the chill crosswind.  After leaving the bridge we went through the tunnel under 101 and descended into Sausalito.

On the first climb in Sausalito, Yana’s chain fell off.  Then it fell off again.  At the top of the hill we stopped to look at the chain but couldn’t figure out what the problem was, so we kept riding.  On the next hill, it fell off a couple more times.  I tried riding her bike, hoping to watch what it was doing, but the chain stubbornly stayed on the bike.  I couldn’t figure out what was causing the problem, so eventually I gave up and just adjusted the front derailleur to rub a little in the lowest gears, hoping the derailleur would physically block the chain from coming off the chainring.  It worked, although Yana had to put up with the rubbing noises this generated for the rest of the trip.

Marin is pretty serious about bicycles and they have a great network of bike paths.  Between Sausalito and Mill Valley, for example, we rode on a wide bike path that cut through the wetlands, far away from the traffic.  It was big and empty and the terrain was open and grassy and beautiful.  We took the path until it ended in Mill Valley, then found a twisty little street called Camino Alto that took us up and over the hill into Larkspur.  After grabbing sandwiches at a grocery store, we continued on through all the small towns along Sir Francis Drake Boulevard.  The sun finally went down as we were climbing the hill outside Fairfax.

The other side of the hill is home to the San Geronimo golf course, and the road here is straight with a gentle down grade.  We were flying along this road through the dusk when I got a flat tire.  We sat down in the grass and I had just started fixing it when a friendly sheriff’s officer (or CHP?  I didn’t get a good look in the dim light) pulled up.  He checked to make sure we were ok, then made sure we knew where we were going and didn’t need any help before driving off.  It didn’t take long to fix the flat, but at this point it was getting pretty dark.  We pushed on, getting back up to speed on the slight downhill.

After passing the golf course the road winds through Samuel Taylor State Park.  The road follows a creek at the bottom of a canyon filled with redwoods.  I’ve driven here during the day and it was beautiful, with cool green light everywhere.  At night, though, it was pitch black under the canopy of trees.  We rode side by side to share each other’s headlights, taking up the entire narrow lane as it wound back and forth through the dark.  Nothing was visible outside the small pool of light from our headlights but we could listen out into the night, hearing the creek and occasionally a small waterfall as we raced past.  We pedaled on and on, curve after curve.  Finally the trees came to an end and we were at the base of the final hill.  A short climb got us to the top of Bolinas Ridge, right above the town of Olema.  Nothing but a quick descent between us and bed.

[Stats: 40 miles, 4.5 hours including supper]


Saturday morning we were hungry and tired.  After a delicious breakfast we opted for an easy day, starting with a short ride to the farmer’s market in Point Reyes Station.  This was a small-town farmer’s market, with only a couple dozen vendors but great selection and just the right amount of quirkiness.  We were sadly too late to catch the cooking demonstration (wish our farmer’s market had that!), but not too late to eat an early lunch.  We ate some wonderfully unhealthly grilled cheese sandwiches made with local cheese.

After lunch we meandered over to Shell Beach in Inverness.  A short climb up Camino Del Mar brought us to a tiny parking lot on a hill above the beach.  There was a trail snaking down through the forest to the water which was rideable assuming a little mountain biking experience.  The switchbacks descending through the dense foliage reminded me a little of some tropical hikes in Hawaii.  At the bottom of hill the trail hit the beach and turned to sand.  Not wanting sand in our bikes or our biking shoes, we switched to sandals and parked the bikes against a hill. Shell Beach is on a small cove facing Tomales Bay so the water is very calm, not at all like the pounding waves out on Point Reyes Beach. We sat on the sand, watching children wading in the cold water and watching boats go by on the bay.

We normally could have stayed at the beach for hours, but we didn’t have anything to lay down on and our thin biking clothes weren’t enough to protect us against the chilly breeze, so we decided it was time to do more riding and headed for Mt. Vision.  The road up Mt. Vision was steep and rough.  The pavement was not broken or cracked, just rough so the whole bike vibrated as it crawled up the hill.  The road was narrow, too, without even a centerline. We had started in trees but near the top left them behind and rode through rolling hills covered with low bushes.  It was beautiful up here, with small ponds and views of Drake’s Bay down below.  The road ended without ceremony at a small power station for the nearby aircraft navigation beacon.  Weather changes quickly at Point Reyes, and as we turned around we noticed there were already more clouds forming below us; the afternoon fog was starting to form already.  We had a quick descent down through the cold ocean air, the rough pavement rattling us and our bikes.  By the bottom of the hill our hands hurt from squeezing the brakes and tingled from the cold and vibrations.

By the time we got back to Inverness we were hungry again.  Again!  It was amazing how we were continually hungry.  Cycle touring seems to require almost constant eating.  The Busy Bee Bakery was open and we’d been wanting to try their food for several years (somehow they had always been closed when we drove by).  The inside of the bakery was small and cozy, with small tables by the windows.  It would be a wonderful place to wait out a winter storm with a cup of tea and a scone, but since we were still warm and sweaty from riding we enjoyed our pastries on the bench out front.  After finishing our snack, we headed back to the inn for showers before dinner.  We were done with riding for the day, so we walked to the Olema Farmhouse where we enjoyed entirely too much food.

[Stats: 30 miles, 6 or 7 hours including many stops]


Sunday morning it was time to get on the bikes and head home.  We opted to ride home via a slightly different route from the one we had arrived on: instead of leaving Olema via Sir Francis Drake Boulevard, we rode through Point Reyes Station then out towards Nicasio.  The road follows the creek through a small canyon and around the base of Black Mountain before wrapping around Nicasio Reservoir.  This is really beautiful country in July, with dry golden grass on all the hills and wonderful blue skies.  The hills by Nicasio were open and empty as we rolled past, then as we joined back up with Sir Francis Drake Boulevard the land started getting more populated and built up as we returned to the city.  Soon we entered Fairfax and were back to city riding, leaving the country riding behind.

While eating pizza in Fairfax, we noticed people kept walking by on the sidewalk with ice cream cones.  They were all coming from the same direction so after we finished eating we headed up the street.  Sure enough, there was a small ice cream shop a few stores down, which we never would have found except for the fact that their ice cream cones were very effective advertisements.

Somewhere between Mill Valley and Sausalito we started seeing tourists on their rented bicycles.  As we rode crowds kept getting thicker and thicker until, by the time we got to the Golden Gate bridge, the bike route was clogged with mobs of tourists swerving all over the place.  If you want to ride over the Golden Gate, I heartily recommend you do not do it on a Sunday afternoon.  The crossing was much more enjoyable Friday evening when we mostly had it to ourselves.  I finally managed to jump on the rear wheel of a faster rider and let him clear a path through the slower cyclists.

The ride from the bridge to Caltrain was much more exciting in this direction.  Because of the layout of the one-way streets, we were one street over from where we rode on Friday, and because of where the hills are we had quite a bit of downhill riding.  This was great because it meant we were as fast as the cars, and faster than the buses (several of which we passed).

Our tiredness caught up with us on the train ride home.  Neither of us had the energy to talk so we both read news and blogs on our phones.  By the time we arrived in Sunnyvale we were both thankful that we lived only a few minutes from the station.

[Stats: 50 miles, I'm not sure how long it took.  Total mileage for the weekend: 120 miles]

Appendix: Gear and Tips

I was very pleased with my Detours Toto Panniers.  I appreciate their simple, clean design.  I also found them very usable.  They are held closed by a simple magnetic clasp so it is very easy to open them to get gear.  I was actually able to fish an energy bar out of my pannier while riding!  (One small caveat: the bags I got had sharp screws protruding too far into the interior of the bag.  Detours has pretty sweet customer service, though, and sent me replacement bags)

Low gearing is great for touring.  I was borrowing a friend’s wheel with a 34-tooth cassette, and it was awesome for climbing up hills with a loaded bike.  I’ve since gone out and bought a 32-tooth cassette for my own wheels.  I’m firmly convinced that road bikes should have mountain bike gearing if they are going to be used for touring.

The Marin County Bicycle Coalition sells a bicycle map that was very helpful both while planning our route and while riding.

A towel would have been nice when we were at the beach.  Cycling clothes are not very comfortable beach attire.  Towels are bulky and heavy though, so I’m not sure there is an easy solution to this.

Putting a pair of flip-flops at the bottom of your Carridice saddlebag can give some support and prevent it from bulging down between the bars of the saddlebag support.

Teaching kids how to create a drum machine with Python

I’ve been thinking for a while now about how software engineers can help their communities.  Lawyers have pro bono work.  Engineers and contractors can help build houses for people.  But computer programming is really specialized; most people don’t need custom computer programs.  This spring, though, I found a rewarding way to use my computer science skills: teaching kids how to program. I did this though the Citizen Schools program, which encourages members of the community to share what they know with middle school students.   It is a really neat idea: the kids get to learn things their school probably doesn’t have the expertise (or time) to teach, and the “citizen teachers” get a chance to help the community and work with some fun kids.  The topics which people teach vary widely.  For example, here are some of the topics other people were teaching during this last semester:

So what did I teach?

I showed the kids in my class how to use Python to create a drum machine program which plays various drum sounds when you hit different keys on the keyboard.  For example, pressing S played the snare drum, C played the cowbell, and B was the bass drum.  The finished version of the program had about 20 different drum sounds which the user could play.  There were some colorful graphics (drawn by one of the students) showing which drums were being hit.  The program could record drum loops, letting the user layer more beats on top of the original beat, and could save and load the sequences of beats.  The kids ended up being much better at laying down beats than I was.  At the end of the class, the kids presented the program to their parents & teachers, plus had a field trip to a local cafe to demo their work to the community.

What’s it like teaching a class?

Citizen Schools took care of most of the logistics, provided some training on effective ways to teach, and paired us with advisors who helped us work with the children every week.  This was really helpful for me, because I was a bit lost figuring out how to present computer programming in a way that middle school students would enjoy.  Arturo, my advisor, was super helpful.  He worked with the kids every day so he knew them all, plus he had lots of great ideas for ways to present the material and keep the students’ attention.

The semester I taught was a one hour class per week, for ten weeks.  That’s not very much time, so I had to work really hard to keep the material short and simple so the kids could learn it.  Code is like essays: being terse takes a lot more effort than being verbose.  I definitely spent more time preparing for class than I did teaching it.

The kids all knew how to use computers, thanks to myspace, youtube, etc. but none of them had ever written a computer program before.  For the first several classes, I would project some simple code and have them type it in and run it.  Then I would have them change it or write some similar code.  For example, one week we were making the program play different sounds.  I showed them how to make it play a snare drum sound, then had them figure out how to make it play a bass drum sound, cymbal sound, etc.  They got very good at the repetitive code.  There were some one-off lines of code that I don’t think they ever did understand (a function definition, for example).

It was interesting to watch as they learned how to make the computer do what they wanted it to do.  I was a little worried a few weeks before the final presentation because the kids weren’t able to explain how to make the program play a new sound.  However, when I asked them to code it they knew exactly how to do it.  It turns out they just didn’t know the right jargon to explain what they were doing.  By the end of the semester, they could make simple modifications to the program to change the way it behaved, or to fix bugs in the code.

Would I do it again?

Will I teach another semester?  Yes, I think so.  Although it turned out to be a pretty big time commitment this time, I should be able to reuse my lesson plans the next time around so it should be much easier.  Like I said at the beginning, it is a really good way to use software engineering skills to help the community and it was really cool to see the students figuring out how to modify their programs on their own.  I think that’s reason enough to do it again.