Saturday, November 21, 2009

The Making of BlockBattle.net

Welcome to the first of a series of blog posts I'll be writing about the ongoing development of BlockBattle.net. Although the project is several weeks old, it is still early in the development life of the game and I am hopeful that these posts will provide some insights to other developers about working with some interesting new technologies, as well as random tetris and network-programming related tid bits.


BlockBattle.net is in essence a modern implementation of the classic Tetrinet game. For those who are not familiar with Tetrinet, it is a fun and well-made multiplayer version of Tetris. Up to six players can join a game, then divide themselves into teams. Once the game starts, every player gets to control a single tetris field. When they make a line in their field, a random block will turn into a special power/attack and if a line is destroyed that includes that special power/attack, the power gets transfered to the player's attack queue. As the game progresses and players make lines and accumulate powers, they can use those powers/attacks either on themselves or on other players. For example, if a player gets a Clear Line and Add Line powers, they use use Clear on themselves and Add on an opponent.


While the original Tetrinet was great, it is now an old game (it was first released in 1997), works only desktop OSs and makes it really hard to find players on demand. BlockBattle.net (so named so that it does not infringe on any trademarks) will be web-based version, available across modern web-enabled devices (iPhone, Android etc) as well as any modern web browser. In addition, BlockBattle.net will offer automatic on-demand player matching and focus on simplicity of game play. It is my hope that BlockBattle will turn out to be a novel, fun and engaging game for users, while offering an interesting exercise in game, UI and web development for the developers.

The major design outlines of BlockBatte.net are:
  • The front-end game play will be done in JavaScript. Piece movement, generation, etc will be done client-side, while major events (dropping a piece, attacking an opponent) will be sent to the server so all player fields are synced at all times.
  • Using HTTP Long-polling (AKA Comet) to enable the sever to push events to the client, such as the player getting attacked.
  • Rather than the Tetrinet way of finding players, whereby one person starts a server and other players connect to the IP, BlockBattle.net will try to automatically match players, so users can simply log in and start playing
  • Making the game accessible on mobile devices by embedding a WebBrowser within an application, then making local inputs (buttons, gestures, taps etc) control the game.
Some of the technologies we'll be using:
  • JavaScript/DHTML for the game front-end.
  • Tornado Webserver - Tornado is a real-time python webserver that powered FriendFeed's website. Tornado was chosen because it is a fast, lightweight framework well suited to the needs of a push server. As well, it is written in Python which is popular, easy to develop for and quite powerful.
  • Mobile Apps: Popular mobile devices such as the iPhone, BlackBerry and Google Android phones will have native apps for BlockBattle, each of which will offer as simple UI customized to the handset and the kind of controls that are suitable for it.
----------
For some silliness, check out the Forex Chart Monkey that helps you with Pickpocket Prevention and Forex Technical Analysis.

1 comment:

googlebot said...

As an old fan of TetriNET, best of luck on your cross-platform implementation. It's a good strategy, and including mobile phones is an excellent addition to the usual desktop hoards.