ZaBingo! Torque X Game Development Diary 1
by John Kanalakis · 05/31/2009 (3:11 pm) · 5 comments
ZaBingo! Torque X Game Development Diary 1
Next, I identify the behaviors, or actions, of the game that will be implemented as new game components... think in terms of verbs. New game tiles that enter the scene should slide into place and then slide over the tilemap when correctly picked – so – I’ll need a MoveToComponent to move game objects over time. I’ll also probably create a RotateToComponent to turn game objects over time. Lastly, I’ll create a PlayerProxyComponent (similar to the provided MovementComponent) to capture the player input.
Lastly, I identify game services that I need. These are not game objects that appear in the game and they are not behaviors or actions that game objects perform. Rather, these are generic engine-like services that are needed by this specific game that will be implemented as classes. For example, CardCreator is a class that will dynamically produce each player’s card at the start of the game. TileSelector is a class that will randomly pull the next tile to play. And Referee is a class that will enforce the game rules and decide which player buzzed-in first.
With the basic game play mapped out, I typically outline the user interface next. I start by sketching out the user interface elements in the main game play screen, such as the timer and the player scores. Next, I sketch out a block diagram that flows from the initial Splash Screen to the main menu and its options, and eventually to the game play screen. I also call out popup windows, such as a pause screen. Although User interface is nearly the last functionality that I will add to the game, I like to know how it maps out early for the art asset gathering phase.
I bought Scene-It for the family last year, and these controllers are perfect for my 8 and 6 year old children. Again, I’ll have complete support for the standard game controller, too.
For this “iconic-bingo” game, I’ll use simple clip art for the source. An online search for royalty-free clipart will produce a lot of results. So it’s just a matter of finding the price point and style that I like. Another search for royalty-free music loops and sound effects also turns up sites with great content available. Again, since I’m releasing this on Xbox Community Live Games, I need to be sure that the terms of use for the content accommodates royalty-free distribution. Read the fine print.
I quickly create a template that turns each clipart image (left) into a tile (middle) and then into a card piece (right) that will make up the playing card. Since I will be working with Torque X tilemaps, the tile and matching card piece should both be perfect squares of the same size.


I have about 80 clipart images that need to go through this process to create 80 different tiles and 80 different card pieces. Later, I'll create the accent artwork for the card decoration and a proper background; maybe even some particle effects. For now, it's just about getting a working prototype that the kids can battle-test.
In addition to the basic game skeleton that the new project template creates, I want to add some empty components and classes to help with the prototyping phase. I start by adding three new T2DComponent classes. In Visual Studio, that’s right-clicking the Game project and selecting Add + New Item… and picking the T2DComponent template (under the XNA Game Studio 3.0 category). I create them as: MoveToComponent, RotateToComponent, and PlayerProxyComponent.
For now, creating the game scaffolding is just a matter of creating a new Torque X 2D game project in Visual Studio 2008. Building and running the project is all I need for now. In the next installment, I’ll start fleshing out the game. Using the simple class template, I also create the three service classes: CardCreator.cs, TileSelector.cs, and Referee.cs.
The most important step of game development is out of the way. The idea is down on paper. I have mapped out the game objects, the game behaviors (components), and game services. I’ve mapped out the user interface for the in-game GUI and the game setup screens. A quick look at the game so far looks like this:
It doesn't look like much right now, but it's not supposed to. Graphics are not important right now, just the bare minimum is needed to let me focus on building up the game functionality. That's what I'll do over the next two days and share along the way.
Developer Diary Outline
#1 Designing and Preparing the Game
#2 Focus on Core Game Play
#3 Adding User Interface, Sound, and Effects
#4 Preparing for Xbox 360 & Commercial Release
John K.
www.envygames.com
Designing and Preparing the Game
I spend a lot of time producing tools and engine code, so once in a while it’s nice to take a break for actual game programming. This weekend, I decided to make a small game for the kids. (Well, it's already Sunday - so, it's a late start) And, being the compulsive writer that I am, I’ve decided to blog about every step of the game development from the beginning to release on Xbox Live Community Games. Also, there’s a lot of questions on the forums about working with tilemaps in Torque X, so I will be posting some code along with screen captures and tips.About the Game
This is a simple game for Anneke and Alyssa, my 8 and 6 year old girls. The game is basically an iconic form of Bingo for children. Not very innovative, I know. But a fun little exercise anyway. This will be a local two player game, but three or four player screens can be added later. Each player will have a dynamically generated ZaBingo! card with a random set of icons. Periodically, tiles will drop into the scene and the each player must buzz-in to claim the piece for their card. If the player is first to claim the tile, it will slide into position over that player’s card and they will earn a point. If the player buzzes incorrectly a point is deducted. It will all make sense later on. When a player's card is completely covered, ZaBingo! The player wins! This is a perfect game for Torque X 2D, quick to make, fun for the kids, and because it is iconic, it can be played in any language that Xbox Live Community Games supports.Game Design
Everyone has their own style and mine starts on paper. I always start by sketching out the game play screen. Next, I abstract out the visible and hidden game objects, things that ‘exist’ in the game scene… think in terms of nouns. For this game, it means a couple of tilemaps, spawners, sprites for the tiles, a background sprite, a timer that counts down, and a score for each player.
Next, I identify the behaviors, or actions, of the game that will be implemented as new game components... think in terms of verbs. New game tiles that enter the scene should slide into place and then slide over the tilemap when correctly picked – so – I’ll need a MoveToComponent to move game objects over time. I’ll also probably create a RotateToComponent to turn game objects over time. Lastly, I’ll create a PlayerProxyComponent (similar to the provided MovementComponent) to capture the player input.Lastly, I identify game services that I need. These are not game objects that appear in the game and they are not behaviors or actions that game objects perform. Rather, these are generic engine-like services that are needed by this specific game that will be implemented as classes. For example, CardCreator is a class that will dynamically produce each player’s card at the start of the game. TileSelector is a class that will randomly pull the next tile to play. And Referee is a class that will enforce the game rules and decide which player buzzed-in first.
Map out the User Interface
With the basic game play mapped out, I typically outline the user interface next. I start by sketching out the user interface elements in the main game play screen, such as the timer and the player scores. Next, I sketch out a block diagram that flows from the initial Splash Screen to the main menu and its options, and eventually to the game play screen. I also call out popup windows, such as a pause screen. Although User interface is nearly the last functionality that I will add to the game, I like to know how it maps out early for the art asset gathering phase.Device Input
Just as important as on-screen user interface is the controller user interface. Torque X games are NOT limited to the standard Xbox 360 game controller. This means you can leverage popular input devices, such as the Guitar Hero controller and the Scene-It game controllers – just be sure to equally support the standard Xbox 360 game controller as a backup (you can add native XNA code that determines which controller type is connected).
I bought Scene-It for the family last year, and these controllers are perfect for my 8 and 6 year old children. Again, I’ll have complete support for the standard game controller, too.Outline and Gather the Artwork
Again, this is just a weekend (maybe a long weekend) game, so the level of art will be modest. The graphic art will need to support the game play and the user interface screens. The audio art will include in-game sound effects and background music.For this “iconic-bingo” game, I’ll use simple clip art for the source. An online search for royalty-free clipart will produce a lot of results. So it’s just a matter of finding the price point and style that I like. Another search for royalty-free music loops and sound effects also turns up sites with great content available. Again, since I’m releasing this on Xbox Community Live Games, I need to be sure that the terms of use for the content accommodates royalty-free distribution. Read the fine print.
I quickly create a template that turns each clipart image (left) into a tile (middle) and then into a card piece (right) that will make up the playing card. Since I will be working with Torque X tilemaps, the tile and matching card piece should both be perfect squares of the same size.


I have about 80 clipart images that need to go through this process to create 80 different tiles and 80 different card pieces. Later, I'll create the accent artwork for the card decoration and a proper background; maybe even some particle effects. For now, it's just about getting a working prototype that the kids can battle-test.
Create the Game Scaffolding
The last step before full game coding is to create the scaffolding project. This is just the skeleton of the game with little or no functionality. The purpose of the scaffolding is typically two-fold for me. First, I use it to tackle the hardest parts of the game first. Don’t jump into game coding by first adding your cool graphics, models, and sound effects. The visual polish will come absolutely last. Instead, the first part to code will be the core game play – that is, revealing new tiles, letting a player claim it, and then moving that tile into place over the game card. The second purpose of scaffolding is typically to break the game development into parts that other developers can work with. For example, once I create the basic project, I can focus on the game play screen while another starts working on the GUI, using the same code framework. This is where SVN source control really pays off.In addition to the basic game skeleton that the new project template creates, I want to add some empty components and classes to help with the prototyping phase. I start by adding three new T2DComponent classes. In Visual Studio, that’s right-clicking the Game project and selecting Add + New Item… and picking the T2DComponent template (under the XNA Game Studio 3.0 category). I create them as: MoveToComponent, RotateToComponent, and PlayerProxyComponent.
For now, creating the game scaffolding is just a matter of creating a new Torque X 2D game project in Visual Studio 2008. Building and running the project is all I need for now. In the next installment, I’ll start fleshing out the game. Using the simple class template, I also create the three service classes: CardCreator.cs, TileSelector.cs, and Referee.cs.
Conclusion
The most important step of game development is out of the way. The idea is down on paper. I have mapped out the game objects, the game behaviors (components), and game services. I’ve mapped out the user interface for the in-game GUI and the game setup screens. A quick look at the game so far looks like this:It doesn't look like much right now, but it's not supposed to. Graphics are not important right now, just the bare minimum is needed to let me focus on building up the game functionality. That's what I'll do over the next two days and share along the way.
Developer Diary Outline
#1 Designing and Preparing the Game
#2 Focus on Core Game Play
#3 Adding User Interface, Sound, and Effects
#4 Preparing for Xbox 360 & Commercial Release
John K.
www.envygames.com
About the author
John Kanalakis is the owner of EnvyGames, an independent game development studio in Silicon Valley that produces games and tools for Xbox 360, Windows, and the Web.
#2
John K.
www.envygames.com
05/31/2009 (6:47 pm)
Thanks, OmegaDog. I should reach #4 pretty quickly. I'll also go through the same exercise with a 3D game a little later. I'm not sure what you mean about GG Press, did something happen? John K.
www.envygames.com
#3
05/31/2009 (6:53 pm)
on GG Press, Any new books in the works by you/others, say Complete Guide To Torque3D! :)
#4
John K.
www.envygames.com
05/31/2009 (8:28 pm)
Ahhh... sorry, I see what you mean. Not as far as I know, but I would not be surprised if Ed Maurina is thinking about or working on something for Torque 3D. I definitely hope so, as I really like his last two books. I might do another book on game development, but it's a lot of work and consumes a lot of time. John K.
www.envygames.com
#5
Speaking of books, I just ordered the The Complete Guide to Torque X.
06/03/2009 (5:09 pm)
Interesting idea. I do remember someone making a XBLCG game that uses the Guitar Hero controller and I forgot about different controller types until now.Speaking of books, I just ordered the The Complete Guide to Torque X.
Associate OmegaDog
YourSite->"Game Idea Generator" rofl :) Its all so true!