Wiktionary

When creating the Writer’s Block game, I needed a list of valid words. This is a fairly common problem in programming and so I was surprised that I couldn’t find a simple word list available online. There are plenty of online dictionaries, downloadable dictionaries that you have to pay for and word lists without definitions, but I couldn’t find a free downloadable list of words with definitions. Except Wiktionary.

Continue reading “Wiktionary”

Writer’s Block

I have been working on a new game for the multitouch table called “Writer’s Block”. In the game, players will compete to find words in a 4×4 or 5×5 grid of letters. 

The players have three minutes to find all the words they can. Words are scored based on length and if multiple players find the same word it scores zero points.

There have a few interesting problems to solve when creating this game:

Continue reading “Writer’s Block”

Hansa Teutonica – Post Mortum

Hansa Teutonica is nearing completion and I wanted to capture some of the lessons that we learned during development. Overall, the game has turned out to be a much larger project that we originally anticipated. We are very happy with the design that we ended up with and we think that future games can use the same design. The game is currently playable except for placing an office to the side of an exiting city. There are also some user interface improvements to make and quite a bit of testing yet to do. But the majority of the code is done.

Continue reading “Hansa Teutonica – Post Mortum”

Wits and Wagers

After taking a few days to start up this blog, I am ready to go back to game development. The next game that I am going to convert for the touch table is Wits and Wagers.

Wits and Wagers is a casual trivia and betting game. A game consists of seven questions. After the question is read, all players secretly answer. All the questions have a numerical answer and the answers are sorted and placed on the betting table. All players then bet chips on the one or two ranges that they think are correct. The answer is read and the correct range is paid out, all other chips return to the bank except for two permanent chips per player.

It is a fun game where having knowledge of the trivia is not nearly as important as betting well. There are several things that make this a good option for conversion.

  • It is a popular game that is still getting a lot of plays.
  • Everyone acts at the same time when writing their answer and placing their bets.
  • Chip management when doing payouts is a bit of a pain.
  • We would like to be able to have hidden bets and an enforced time limit as options.

The one big problem with this conversion is that we don’t want to type in all the questions. Instead, the original questions from the game will be used and one player will read the question and push a “start round” button on the game.

William and I have already started work on the board layout. As usual, the space is tight. It is a seven player game and each player needs their own numeric keypad and betting table. Plus we need a lot of space in the middle to display the potentially large numeric answers and up to seven different player’s bets.

I am going to write this game with the Torque 2D engine. I am guessing that there wont be any additional C++ code required and that it can all be done in script.

Practice Log published

The PracticeLog application has been released as freeware and the Android version is available on the Marketplace!

After using the program and app for a week and really enjoying the convenience, I have decided to  make it available to the public. In the unlikely scenario where this application becomes popular, I am worried that it may cause too much load on my web server. So I wanted to have some kind of potential revenue stream to offset this risk, but didn’t want to try to sell the software. So I have gone over to the dark side and added an ad to my Android App.

My first attempt to add the ad was a failure. I thought that I would use the Webkit GUI element to display an ad from my website. To that end I tried to setup Google AdWords but was rejected because the PracticeLog page had insufficient content. (At the time it wasn’t linked to the rest of my site). I know now that this isn’t the right way to put a Google ad in an Android App. The right way is AdMob. This is a free an painless system and they have an SDK that you add to the android app. (Note that you do have to be building the app with the latest version of the Android SDK to use AdMob.)

Putting the app onto the Android Marketplace was a bit of a pain. First you have to pay Google $25 for the privilege. This is a one-time fee to register as a developer, but it did make me hesitate, since I doubt I will ever make enough in ad revenue to pay for it. Then the app has to be digitally signed and you have to have perfectly sized screen shots and icons. This was all a hassle, especially through the slightly buggy VirtualBox VM.

Publishing the C# application was a little easier, the main hassle being adding it to various freeware sites. Fortunately, several of them accept .PAD files. This is a file that describes an application and the developer that the freeware sites can read to fill in their submission forms. It had been a long time since I had visited some of these sites, so I also took the time to let them know about the latest version of the MediaDB program.

So far I have 9 downloads and 7 users, 39 ad views, 0 ad clicks and so $0 in revenue. Of course it is still early and I am not really expecting this program to be very popular. Most people who are keeping a practice log are children who don’t have Android phones.

If it does become popular, I will add a “teacher” mode so that a teacher can have access to the practice logs of their students. The teacher could track their practice time and use the notes to assign tasks for the week.

You can get the C# application on my site: http://chadweisshaar.com/weissoft/practicelog and the Android app from the Marketplace.

Hansa Teutonica – Update 1

There has been a lot of progress made on the Hansa Teutonica conversion. The model is done, though the testing has been pretty light. Many of the graphics have been created and the GUI code for interacting with the player is started.

Here is a small portion of the board. The cites, offices, roads and houses are all on. The roads are being built programatically based on a source and destination city and a source and destination direction vector. The board still needs to show the upgrades that can be gotten at some of the cities.

Here is the player board. This is for the active player. Inactive players wont have the buttons at the bottom. It still needs to show the cubes covering the non-upgraded ability levels.

Here is a code snippet of two functions that I wrote to try out the new C++ 11 features. They are both doing the same basic thing: Given the value of a member variable, find the object in a vector that matches that value. First, here is what it would have looked like before:

Item* Object::findItem(const string& itemAttribute)
{
  for ( vector<Object*>::iterator oIter = myItems.begin();
        oIter != myItems.end(); ++oIter )
  {
    if ( (*oIter)->attribute() == itemAttribute )
      return *oIter;
  }
  return nullptr;
}

Here is the same basic idea using the new “for each” syntax. Notice that it is much cleaner. And I don’t have to create the iterator variable at all. There are certainly cases where you are going to need the iterator, but this isn’t one of them.

City* Board::findCity(const string& name)
{
  for each ( City* city in myCities )
    if ( city->name() == name ) return city;
  return nullptr;
}

Finally, here is the version using lambda functions. I’d had high hopes for this approach and was a bit disappointed with the results. There are certainly cases for using lambda functions, but this isn’t really one of them. Though, if this were in a performance critical part of the code, the lambda function might be a bit faster. Also notice the use of the “auto” keyword to declare the iterator. This is another new feature, and is a great benefit. Using either of the two new approaches, I don’t have to know what kind of collection I have to use the collection.

Player* Board::findPlayer(const string& name)
{
  auto pIter =
    find_if(myPlayers.begin(), myPlayers.end(),
            [&name](Player* p){ return p->name() == name; });
  if ( pIter == myPlayers.end() ) return nullptr;
  else return *pIter;
}

Yacht

I have started a new project for the Touch table called Yacht. It is a public domain version of Yatzee. To take advantage of the multi touch screen, and to make the game faster, I am doing a “shared-dice” variant where all the players share the same die rolls. As a player locks/selects dice, they no longer use the shared roll of those die.

It is going to be eight player with each person having a score and dice region.

I am trying to pick a simple game in order to learn the Torque 2D scripting and game builder. The Hansa Teutonica project used Torque 2D as well, but William is handling all of the script and GUI parts. He has been using Torque for years and is going to help me learn the scripting sytems. He is also going to build the graphics that the game will use.

Practice Log – Android+MultiUser completed

The changes to the PracticeLog application and the associated android app are completed. They both access the database on my website through the php interface.

I have created a simple user system:

  1. When you create a new user, I store the username and email along with an encrypted password and generated GUID in my user table.
  2. When a user logs in, the given password is encrypted and compared to the stored password. If correct, the GUID is returned.
  3. The other tables are accessed by the users GUID.

The C# changes were fairly simple. I created a login/new-user dialog and left the local database code so that someone could use the program in a offline mode if they didn’t like the idea of logging into my website.

The Android app was a much bigger job. I was able to use all built-in GUI elements, but the life-cycle issues were much more serious than they were in my first Android application. I didn’t want the user to have to log in every time, so I store the users GUID in the application’s configuration data. I also needed to preserve both the timer’s start time and the entered but unsaved practice time when the application is killed. I learned how to prevent the screen rotation from happening and learned how to store the downloaded data from the web during a screen rotation.

Testing the app was a hassle because my phone loses its connection to eclipse after a few seconds. This is probably a problem with the virtual machine that I am using to do the development with. If I had it to do over, I would go ahead and install java and eclipse on my main machine.

I am still considering releasing this application and app, but would like to figure out the ad model for the android app.

Here is what the app looks like:

Hansa Teutonica

Now that we are getting a multitouch table, it is time to write some games for it.

William has already written GemHoarder and we have decided that the next game will be Hansa Teutonica.  It is a relatively new game that we really enjoy. The game doesn’t have a lot of different cards or exceptions that make a conversion difficult.

We are going to write the game with the Torque 2D game engine. William has already incorporated TUIO events into the engine. It is a C++ engine and I will be creating the back-end game model. The game is turn based, and on each player’s turn they can perform 2-5 actions. We know that we will need to be able to undo actions because the player may click in the wrong place, or just change their mind. The later happens regularly in the physical version. So I am going to create a model of the players and the board and then a move system that modifies the model. Finally, there will be some kind of game-runner that interfaces with the GUI to find out what the player wants to do, constructs the move, has the move apply itself, and then saves the move so that it can be undone.

I am also looking forward to trying out some of the new features in C++ 11. My previous C++ application was written with Visual Studio 2008 because the CLI/.NET intellisense is broken in VS 2010. Since I wont be using any of the managed code for this project, I can use VS 10 which supports most of C++ 11. The features that I am planning to try out are the “for each” statement and the Lambda functions.

Price Tracker – Software

I have added a new feature to my personal PriceTracker application. I can now add computer games to the wishlist and get price updates from Steam. Since Steam doesn’t have an API like Amazon, I am simply scraping their web page. This makes the application even less likely to be released, since Steam could change their page layout at any time.