June 30, 2009

Moihang: a word guessing game

I programmed almost exclusively on Microsoft Windows and DOS from 1988 until 1999. I started doing batch files, Quick BASIC, Visual Basic, and soon thereafter C/C++ Windows SDK/MFC/ATL. Along the way I programmed for a few flavors of UNIX and most Mac OS versions (Power Plant/Carbon). There for a while a did quite a bit of Palm OS and other embedded systems.

Around the turn of the century -- I love to sound that old (Logan's Run kind of old!) -- I discovered Linux and Free BSD and above all... C#

As Dewey Cox would say: “It's been a beautiful ride”.

Yet playing a wave sound file on Linux from a desktop application is, in my opinion, somewhat harder than in Windows. Of course, there are obvious reasons for this. Microsoft as well as Apple and other commercial OS providers could always dictate a simple, standard and unified way to give you an API call with just a couple of input parameters (file name and/or path usually). The Bazaar nature of Linux programming with its multiple desktops and various low level audio interfaces give you many choices lost of granularity but with all that, comes a lot of homework for those who just want to have a sound clip play when an event in their application takes place.

My beloved daughter Monica is always asking my wife Maria and I to play 20 questions and other word guessing games from the back seat of the car whenever we go from point A to point B – In Texas that may take a long time since point A usually is at least 30 to 40 miles from any point B. One day, we started playing hangman in the car using a piece of paper and a pencil. Both Maria and Monica liked it, and I decided to make it a cross platform desktop app for all our computers.

Although, my first impulse was to make a Gtk# app -- 90% of our computing at home is done on Linux on top of a GNOME desktop -- I instead decided to use WinForms because I wanted try to create RPMs for openSUSE in hopes that I could virally propagate the good news of .NET and WinForms to billions of .NET/Mono embracers that I always read about in slashdot and OSnews <-- sarcasm alert.

Tomorrow, I will make another blog entry where I will share more about my humble solution to the simple programmatic playback of wave and au files while on Linux. Also, the Martinez-Figueroa family Hangman clone: Moihang


Posted by martinf at June 30, 2009 10:14 PM