Archive for the ‘Hobbies’ Category

I have tried a few times over the years to grow a plant or two.  No luck though.  I had to give up on an herb garden after one season—it completed molded over.  And the other plants have just plain died.  Likely from over-watering. Or under-watering.  I can’t tell.

We’re getting some work done on our lawn this week and I would love to plant something with flowers in my yard.  I think that individual flowers would be too delicate for me to care for and a tree would be too big for our yard. So, I’m looking to find a flowering bush that can survive in the Seattle climate.  And that requires almost no work from me. It’s probably safer for the plant that way 🙂

Anybody have any suggestions?

I’d love to plant a hydrangea or something similar.  I think it’d be pretty full in appearance and there would be some nice flowers to bring in and put in a vase.

One side of our house gets a ton of sun and the other side gets almost none—go figure!  Any thoughts?

I’m sure everyone has been waiting with baited breath to see what became of the typing game that I mentioned in my last post.  It’s coming up on the last weekend of my vacation, and I wanted to make sure to finish the game before I have to go back to work.  It’s always incredible how much work there is to ‘finish’ any project.  In particular, I always forget that with games you want to support sound effects, music, icons, etc.  It took a while, but I’m finally decently happy with the game as it stands (meaning that for a brief moment I’m just too tired to think about any more changes).

I learned a lot about XNA from this project.  Particularly about 2d sprit manipulation.  The XNA content pipeline is a thing of beauty really, it’s so convenient just to be able to plop all of your assets into the content project and load them using the content manager.  It’s also a great place to do build time processing and manipulation.

I also learned that I still have no idea how to draw good looking sprites.  I had originally planned to have several different space ships that varied depending on the length of the word being typed, but ultimately gave up after I had started on the first ship.  I spent a  lot of time tweaking the ship I did end up with, and it still looks awful.  It’s not so much the general shapes that seem to cause me problems, but the actual texturing of the object.  I have like 16 million colors to play with, and my ships look only slightly worse than the 16 color Gameboy sprites. 

I thought about trying to craft some music myself.  I even watched several videos explaining how to use FL Studio.  The videos convinced me that no matter how good the software has gotten you still need to have some form of rhythm to compose decent music.  The guy giving the tutorial would often put together a quick pattern and then play it, and I’d be bobbing my head and thinking wow that’s awesome, and then he’d spend the next 30 minutes explaining how terrible that sounded and showing all of the things that needed to be done to make it sound reasonable.  If I ever switch professions, video game composer is not going to be high on the list of options.

The game itself ended up being pretty close to what I had envisioned.  The basic idea is that ships fly across the screen with words ‘mounted’ on the top.  The goal is to type those words before the ships make it to the other side of the screen.  You start the game with 3 lives, and each time a ship reaches the left side of the screen, you lose a life.  When you have no lives left, the game is over.  There are 10 ships per ‘level’, with an unlimited number of levels.  A ship’s speed is dictated by the level that you are on, insomuch as the speed increases on each level.  There are 3 difficulties, easy, medium and hard.  The difficulty controls how quickly a new ship will start heading towards your left side.  I’m not convinced that hard is really that much more difficult than easy, so maybe I’ll need to tweak that.

There were several problems that I hadn’t considered when I started, which are amusing in retrospect:

  • I had to find a word list to use which wasn’t too hard.  Unfortunately after playing the game a bit, I started to notice that there were all sorts of profanity in the words it was choosing.  Honestly the random number generator seems particularly prone to picking out the dozen or so swear words from the dictionary, because pretty much every game it would throw something out there.  I had to remove these by hand, which almost certainly means I’ve missed some.  Oh well…
  • It turns out that playing on landscape was way easier than portrait for a long while.  The reason?  Landscape is quite a bit wider than portrait, and since the ships go from right to left, it took them longer to get across the screen.  I eventually fixed it by just scaling their speed appropriately.
  • There is no API at all for the phone keyboard (it’s meant to be ‘invisible’ to app developers).  Unfortunately that makes programming a game that needs to know what kind of keyboard is being used, how large it is, what keys have been pressed, etc. very difficult.  I think I figured out most of the issues, though ultimately the choice of landscape vs. portrait, and hardware vs. software keyboard is made in the options page prior to starting a game and can’t be switched until the next game.  Worse, it’s entirely possible to claim a hardware keyboard even if you don’t have one (which means that the software keyboard will be drawn, but the ships might fly below it).  There is still one bug sitting around where the software keyboard will randomly disappear.  Touching the screen brings it back… but I have no idea why this happens and cannot figure out any repro for it.

I will probably throw this up in the Windows Phone Marketplace after I get some folks to try it out and let me know what they think.  Anyway, I thought I’d include a short video showing what the game looks like:

A few weeks ago at Thanksgiving, Irfaan introduced us to a new board game called Betrayal at House on the Hill.  The game is a lot of fun and it’s different from any other board game that we have played before.  The game is divided into two main phases.  The first phase consists of exploration where there is no real objective other than to try to ‘improve’ your character by finding items, increasing your character’s stats, and triggering events that may help you in the second phase.  The second phase, known as the ‘haunt’, starts after a random number of turns.  In this phase one of the players turns into a traitor and the objective of the game is revealed.  There are roughly 60 different unique scenarios in the game, again randomly determined, all of which have unique objectives.

The game itself is a blast to play, but pretty quickly we realized there was one major flaw.  The stats, which dictate whether a character is alive or dead, how far the character can move during a turn, how well the character survives various events, and pretty much every interesting aspect of the game are tracked by moving 4 small plastic pointers up and down the side of a cardboard character cutout.  The problem is that these plastic pieces tend to slide and the space between each of the values of any given stat is very small.  For the first couple of times that we played the game, we resorted to paper and pencil to keep track of the stats in addition to the cutout to make sure that we were tracking them accurately.  Ultimately, since I was on vacation last week, I decided it would be fun to solve this problem with a Windows Phone 7 app. 

I hadn’t written a full WP7 app before, and it’s been something I’ve been meaning to do for a while.  I figured the stats tracking app would be a good starting place because the app itself was conceptually pretty simple.  I figured it would have two screens, a character selection page and then the page on which the stats were actually tracked.  The trickiest, and most interesting, part of the app had to do with tracking the actual value for a stat.  In the game it’s important that for any given stat you can see the value that immediately precedes and immediately follows the current selection.  The reason this is important is because the game often gives you a choice about what stat to increase, and the scales for the stats are nonlinear.  It’s entirely possible to increase speed, for example, w/o actually being able to move any faster (e.g. the scale might be 3 3 4 4 4 5 5 6 6 8).  In that case, it might behoove you to increase your might instead.  Unfortunately there was no ‘out-of-the-box’ control that had exactly the look and feel that I wanted.  The DatePicker/Calendar control was probably the closest, except that I didn’t want the selection ‘wheel’ to disappear when it lost focus, and I wanted it to be horizontal instead of vertical.  Ultimately I decided to write my own control.

I finished the app near the end of last week, though it really only took a couple of days to get it entirely functional.   I learned a lot in pretty short order – all of which I think are fascinating, and will probably bore anyone else to tears that managed to read this far:

  • The selection of a listbox in WPF and Silverlight is tracked via hashcode.  So if you happen to databind to a List<int> and your list duplicate multiple values then your selection will be wonky.  In the multi-selection case it will select all of the numbers of the same value, and in the single selection case it will simply select the one that appears first in the list.
  • The performance tools for WP7.1 are really good.  It was pretty easy to figure out why selection in my app was slow (which I didn’t even notice until Luke said – hey! why is selection so slow!).  Sadly it was non-obvious on how to make it faster.  In reading about performance tips for phone apps, it turns out that I did pretty much everything wrong.  In general, my biggest performance problem was simply that the visual tree for my character stats page was too complicated.  Outside of removing controls, optimizing the display, and removing certain converters, there was little I could do to speed it up.  Ultimately I delay loaded some controls which made the experience better but didn’t actually speed up the loading of the page.
  • Microsoft Express Design is a fun product to use to make small graphics, such as for the icon of your app.  I made a haunted house design of which I’m very proud.  Everyone else that’s seen it hasn’t thrown up, and given my artistic talent, that says a lot for the software.
  • JPGs load faster than PNGs, content loads faster than resources.
  • The new Beta option on the marketplace is really cool.  It publishes the app comparatively quickly.  My experience was the app could be downloaded within 12 hours of being published.  That said, it sucks that you cannot update a Beta app.  I ended up creating a second ‘Beta’ after I got some feedback and wanted people to try out the new version.  That requires putting in all the same information again.  It also sucks that you cannot tell when the app can actually be downloaded by people.  You know when it’s ‘published’ (which happens within an hour or so), but it’s many hours after that before the folks you’ve added to the Beta can actually get the app.  They don’t get sent email, so you sort of just have to keep trying it until it works for you and then send them email yourself.  The best practice seems to be to wait a day or so.  Until they fix the update thing, you really shouldn’t bother until you think you’re really done the app and you want broader testing.  The best thing about it, of course, is that the people trying the app don’t need a developer unlocked phone.
  • Saving state is pretty easy, but implementing the INotifyPropertyChanged pattern just generally sucks in C#.  There is so much boiler plate code.
  • I remain confused about capabilities.  I tried removing all of the ones I don’t need (which is all of them), and the next time I opened the project the tools prompted to me add them all back.  I figure I’ll just leave them there for the moment.

The app ended up looking like this:


The icon for the app, of which I continue to be happy with of despite the looks of confusion when I show it other people, looks like this:


I don’t know that I’ll actually post the app to the real marketplace or not.  I’m waiting to hear back from the company about whether they would be okay with the usage of some of the artwork from the game.  That said, it turned out pretty much exactly how I imagined it which is always gratifying.  Phone development is really a lot of fun since it brings back that feeling that it’s possible to write a complete app by yourself.  That said, the quality of a lot of the apps on the store is pretty amazing.  In particular, a lot of the games are flat out astounding.  Still, it’s fun to write apps that you can use at least for yourself 🙂

I was going to switch over to do some Windows 8 development, but I had so much fun working on the app above I decided I would do another quick phone app this week.  I wanted to try a 2d XNA game.  My general premise is a ‘typing texting tutor’.  The idea is a simple game that has words that fly across the screen.  You try to type the words before they get to the other side.  The dictionary contains normal words + a lot of SMS acronyms.  I just started, but already I’ve found that the keyboard API for the phone is woefully inadequate for what I’d like to do.  The other thing that is woefully inadequate are my drawing skills.  This is what the app looks like so far.  Hopefully it will look much better, and be functional, by the end of the week:


So, I’m finally getting back into training for the Walk of Hope 5k (Anson and I are “running” it in October).  Phew!  I’ve been pretty worried about it recently since I’ve been giving up after about 20 minutes on the treadmill for the past week or so.  I wasn’t feeling great—or, at least, that’s been my excuse.  Anson recommended I give running outside a shot again.

This afternoon, I decided the weather was nice enough that it might actually be fun.  I put on some jogging clothes and headed over to Bridle Trails. For those of you on the east coast, Bridle Trails is a park that’s a couple of blocks from our house.  There are a lot of horse owners in the area so it’s mostly used by people on horseback, but a few people (like me) use it for jogging. I like it because it’s pretty deserted most of the time–  nobody is there to witness my huffing and puffing.  Also, there are a TON of trails, so you can easily change up your routine if you’d like.

I usually do a 1.8 mile loop, walking parts and jogging others. Today I jogged over 2 miles WITHOUT WALKING! Wahoo! New Record!  Take THAT allergies!  I was so proud I even took a picture.


It was an almost perfect workout.  Almost.  Something odd happened towards the end.  I was about 0.1 miles from the end of my jog and I saw a woman picking blackberries.  I was trying to avoid eye contact and just zone-out because I really wanted to go the whole way without stopping.  But, she stopped me:


Lady:  Did you see a tall man on the trail with you?

Me: No, nobody was out there. <jogging in place>

Lady:  Because he watched you as you were entering the trail and then followed you in.

Me: (gulp!)  Really?

Lady:  Yeah, I saw him follow you and decided to wait at the entrance to the trail to make sure you got out okay.  I was praying the whole time. He was REALLY creepy.  He just had that look, ya know?

Me:  Wow.  That’s kind of scary.  Lucky I didn’t run into him.  Thanks so much for keeping an eye on me!

Lady: No problem!


Needless to say, I made it home safe and sound.  But, we’ll have to see if Anson is still excited to have me jog outside after this incident 🙂

And, of course, we’re still fundraising for the event.  Anson and I want to thank the Perez and Dallavalle families for their support!  You guys are AWESOME!  And I would like to thank Fiona for making a donation yesterday. Not only did she make a donation towards a great charity, she gave me all the fundraising credit—which means I’m beating Anson! 🙂

Also, Jane recently tagged me in her blog to write about my 7 favorite posts that I have done.  I’m taking votes/suggestions for favorite entries.  Anson has said he likes the ones with pictures. Or, at least, that was the trend from the ones he listed off yesterday (“I like the one where Kira is doing tae-bo.”).  I’ll have to look through some of my old posts (considering has been around since 2002, this might take a while), but expect that post to come out later this week. 🙂

I’ve been playing in a bell choir at my church for a couple of years now and I really enjoy it.  Recently we’ve been ringing some pretty difficult music (at least, difficult for me).  At Palm Sunday service, we played a song called King of Glory. It was a really neat song! For me, it was particularly challenging because it changed from a 6 count to 9 count to 6 count to 4 count to 6 count…you get the idea :) 

Anyway, we actually got a pretty good recording of it, so I thought I would share it  so that all of my friends/family across the country can enjoy: