May 22, 2009

There’s an XNA developer guy writing about the new avatars API in XNA Game Studio 3.1.  It looks pretty cool.  Now I am definitely going to be using some personalization aspects of XBox LIVE user accounts (such as gamertags and gamerpics), but I don’t see a place for avatars in my game.  I’ll probably still play around with them though.



May 19, 2009

If you’re looking into XBox LIVE Community Games or are an XNA developer, you might want to check out xblcg.info if you haven’t already.  They’ve put together a community games index complete with ratings and a very cool box art collage.  They’ve really capitalized on the RSS feeds coming out of the Creator’s Club website to create a very complete and feature-rich index.  It seems like they are adding new features each time I go and look at the site.

I came across a new feature – game “badges” which look like gamer cards for the community games.  Here’s the game badge for my first game on XBLCG:

More on the Core Game Design

May 18, 2009

So, I’ve been thinking a lot about how to round out the core gameplay and finally go about programming it.  It seemed to me that there are some things lacking in the offensive parts of battle gameplay.  I am modeling an RPG in some ways, so it makes sense to start thinking about how an RPG would model combat and put that into my gameplay model.

What I’ve come up with is to base combat on how well a player is doing to create words and how good of a weapon he has equipped.  Within the game, there will be many weapons that are available to either find or to be bought at the store.  Each of these weapons has a particular attack strength.  This is the base amount of attack that will be made to the opponent.  If a player makes a particularly strong word (indicated by word score), he will get a blow against his opponent using the equipped weapon.  The attack strength is then subject to modifiers.  There are two modifiers, strength and defense.  Strength is applied based on the word.  If it was a seriously strong word, you’ll get some extra strength to add to the hit.  Defense is what the opponent will carry with him.  It is based on his armor.  If the defense is non-zero, it will have some effect to the attack to reduce its severity.

So basically this boils down to you having an ATT (attack) and DEF (defense) variables.  Each is controlled by the equipped weapon and armor.

Let’s run through an example:

  • You spell a strong word such as ORGANIZATION.
  • Upon confirmation, you will get the MP points to replenish magic, but since this word is over the word score threshold for an attack, you get to deal a blow to your opponent.  This happens automatically.
  • An animation of the attack plays.
  • Your opponent’s DEF is subtracted from your ATT.  If the result is less than or equal to zero, it is set to one.
  • Any modifiers for a strong word score are then added to the result.
  • The result is then subtracted from the opponent’s HP.

It will be easy to add many diverse weapons because they are really just a set of simple attributes.  A more elaborate system could also be used.  For example, a particular weapon might have a magic component that also deals more attack based on, say, how many vowels you have or some other state you may have (maybe an item?).  This leads to much more strategy in how you decide to equip weapons.

Defense will also be important because without that, you will be dead pretty quickly.

The last question about the core gameplay revolves around fouling.  Recall that a foul is when your blocks touch and pass through the foul line at the top of the board.  This will result in a hit against the player and it will be quite severe.  You really should try not to foul!  It could deliver a blow as high as 25% of your HP regardless of level.

Spells still play a large role in the gameplay.  Spells do things to change the board (in a positive way for yourself, or a negative way for your opponent).  They also can do damage or heal too.  It will take a good strategic balance between spells and combat to successfully battle opponents.


May 13, 2009

In War of Words, there are basically three types of playable games – battles, chests, and puzzles.  Battles are the most important and largest part of the game, and I’ve discussed them before.  But there are two other “mini-games” available too.

Treasure chests are encountered at certain times within the game.  They are filled with loot, typically mostly gold and you also get experience for opening them.  To open them, you need to pick the lock.  Since this is a word game, the best solution is to guess the secret password that will open the lock.  The way this works is that you are presented with a set of letters in the normal game board.  This board is not moving.  You also see N blank spaces and so you know the size of the secret password you must guess.  The letters making up the word are on the game board mixed in with other random letters.  You are then given a series of hints which are just textual phrases.  You must use the hints to guess the word.  This mini-game is somewhat of a cross between hangman and twenty questions.  Chests get harder to open as you progress.  The words get tougher (longer and more obscure) as well as the random letters increase in number and the hints decrease in quality.  Opening a chest will then reward you with experience and gold (and possibly other things).

The second type of mini game are what are called “Tavern Puzzles”.  At the Inns in the cities, you have the option of visiting the tavern and playing word puzzles for loot.  These puzzles consist of a fixed game board with specific letters on it.  The goal of the game is to use the letters on the board to make words and eliminate all letters from the board.  There can sometimes be more than one solution.  To mix things up, some puzzles will give you a spell or two and some MP to use the spell.  You must not only solve the puzzle by making words, but the spells must be utilized at some point to eliminate letters from the board.  As long as all letters become eliminated, you will win the puzzle.  The puzzles can get harder by putting more letters on the board, using tougher words, and by making obscure uses of spells.  Your vocabulary and spell knowledge will aid you in solving the puzzles.

Technically speaking, both of these games are examples of “levels”.  I will create XML data to describe them.  For example, treasure chests are defined by the loot they give you, the secret word, and the hints.  I would write this data into an XML file (possibly by using a custom built editor) and then create a custom content processor to write this data as an XNA binary type to load into the game via the Content Pipeline.  For the tavern puzzles, there’s a little more to them and so I decided to create a “level editor” for it.  Here’s a screen shot of a prototype of the editor:

Tavern Puzzle Editor

As you can see, it is nothing elaborate.  But I will be able to use this to create puzzles fairly quickly.

Which words are in the dictionary?

May 12, 2009

A common question has been “which words are in the dictionary?” of the game.  Are proper names in there?  Well, here’s my take on it and the definitive answer:

The dictionary in War of Words has 172,500 words.  It does not contain the following kinds of words:

  • Proper names that are also not commonly used words in the English vernacular are not in there.  Examples would be:  Spain, Erica, Internet, or Arizona.  Names like Jack or Joe are in the dictionary (Joe is slang for coffee, for example).
  • Almost any word requiring capitalization is not in the dictionary.  Examples would be names of the months, or days of the week.  I am thinking about adding these however.
  • Single letter words (such as I) are not in the dictionary.
  • Contractions such as “Shouldn’t” or “can’t” are not in the dictionary because there is no apostrophe playable character.
  • Abbreviations for the most part are not in there, however there are some common ones.
  • Offensive words are not in the dictionary.  These are picked at my discretion.  I would like this to remain a G-rated game (as far as language is concerned).

The good news is that when you spell a word, the system will indicate whether it is present or not (with a checkmark or red-X indicating validity).  This takes out the guessing as to whether you can confirm that spelling or not.

Results of Testing the Networked Game

May 12, 2009

I am pleased to say that the networked multiplayer version of the game is going quite smoothly.  I’ve been testing using System Link between my Xbox and my PC.  One of the things that you must do to get a more accurate picture of how the game will play over the Internet is to use simulated packet loss and latency.  I’ve done some testing up to 100ms latency and up to 10% packet loss.  So far, it looks good.

I did run into some issues with the scrolling of the game board.  My original plan was to send the scroll rate of the board with every network update (which happens 10 times a second).  That didn’t work out so well for the scrolling of the board.  The reason is because if a player lets off the trigger during this time were no packets are sent, the two simulations of the game get a little out of sync (the remote simulation has not received the “stop” command and keeps scrolling the board until the next network update).  To fix this, I placed a another piece of data in the network update: the position of the height of the board.  This too had problems though.  The main problem here is that the board would then jerk back into position when it received the network update.  This would look pretty stupid and was not what I wanted.

So I came up with a different solution.  In my solution, I send the scroll rate with the network update.  When the user starts scrolling, it receives this and pushes the board upwards.  But if the player stops scrolling, a reliable packet is sent as a “stop” command.  It also synchronizes the heights of the boards across the two machines to ensure accuracy.  I’ve found that it works well at 100ms latencies and 10% packet loss scenarios.

I also was able to start testing the game over Xbox LIVE with a friend.  We are a few cities apart but got good (probably typical) average response times of about 30ms.  The game works beautifully over this kind of speed.  The only thing that did not work was game invites because I forgot to hook up the InviteAccepted event handler!  So, we will be testing invites shortly.  One of the coolest things about Xbox LIVE is the ability to go and invite a friend who is not playing your game.  They can see the invite and then join the game which will then reboot the console and start the game to join right in (by going to the lobby screen).  If the other player doesn’t have the game, they will be prompted to download and buy it (which is a cool marketing feature).

I still have several tasks to get the networking part of the game a little more polished:

  1. Spells don’t work yet over multiplayer; going to have to add that.
  2. Random letter generation needs to be fixed to be truly random over multiplayer.
  3. The game crashes if a player exits – there is no pause menu to do a true exit.
  4. The lobby screen has a bug that if you “ready-up” while the only player it starts the game.  This shouldn’t happen.
  5. Gamer profile download didn’t work in my testing so something must be wrong.

This is still a lot of work, but it should be fun getting it ready for primetime.  I would really like to restart my work on the single player experience considering that it is the majority of the game.  That part really has to be rock-solid.


May 5, 2009

I think I’m going to be tracking quite a few statistics over the lifetime of the player’s campaign.  Here’s a list of everything I can think of:

  • Total Experience
  • Total number of words formed
  • Total word score
  • Highest scoring word
  • Longest word
  • Prowess – this is a skill measurement relating length and word score.
  • Average length of words
  • Average word score
  • Number of quests completed
  • Number of battles won and lost
  • Battle win percentage
  • Most frequently used spell (or spells)
  • Total play time

These are relatively easy to capture and store however I’m not exactly sure where they will be displayed on the UI.  It seems to me that they are not essential and should be placed away in the UI but still visible.