Free app: Trello Burndown

BlueLine Games is a small team and we NEED to move fast (time is money!). Because of this we need awesome (and lightweight) project managment solutions.

Thanks to recommendations from Vicky Carlsson we found the tools Toggl and Trello. Toggl is a simple tool for time-tracking (might blog more about that later).

Trello is a lightweight project management tool for tracking tasks on cards (somewhat Kanban style if you want it to be). It’s relatively new, and one of the few drawbacks I found to it is that there isn’t a clear way to estimates tasks so it’s hard to figure out how long an entire project will take.

Since I couldn’t find a good solution, I built one: Trello Burndown. To use it, just connect with your Trello account (the API uses OAuth so we never see your password). There is a place next to each task for a time-estimate. Just fill that out (and update it if your estimate changes). Each day that you log in, the app will store the total of your estimates & chart your burndown. In addition, it will estimate your completion date. The more days you login, the more accurate the total will become.

We’ve recently switched to using Scrum-like sprints, and have found that the Burndown charts are working pretty well for that. This will also be driving us to have more scrum-like features for the app in the near-future (like setting a sprint-duration and comparing your burndown to expected velocity, etc.).

Let us know in the comments if you found it helpful or if you have any questions!

Trello Burndown Chart2012-05-23 Update: Tonight I’ve released an upgrade to switch from the old Google Image Charts API (which is deprecated now and will disappear in 11 months) to the new Google Charts API. In simple english: the charts now look better, they have mouse-over info on every point, and they have two lines (“Hours Elapsed” and “Hours Completed”).

Calculating the bounding board for Hive

THIS POST IS LONG! If you don’t care to see how the answers were calculated and just want to know the size of the 3D area into which all possible Hive games could fit, just skip to the bottom of the post for the results.

While doing secondary-research to get ready for writing AI for our Xbox version of Hive, I noticed that there wasn’t much published about the game-theory for Hive yet. That’s strange for such a popular abstract-strategy game but the game, but I guess someone has to be the first …so it’s going to be us!

This is hopefully the first post in a series which will seek to start more in-depth research on Hive by calculating some of the common measures of the complexity of Hive.

This post is going to show how we calculated the bounding-board for Hive. For a very easy comparison, chess and checkers are played on a square board that has 8 rows and 8 columns and thus has 64 spaces. Since Hive doesn’t have a static board, and instead is created by whatever undirected graph of hexagonal tiles is laid down by the players, calculating the bounding board is less straightforward.

Hive Board Size Calculation – Background

Quick background:

  • As shown in the official Hive rules, the basic game has 11 black tiles and 11 white tiles for a total of 22 tiles. Our calculations will refer to this core version of the game without modifications unless noted otherwise.
  • For the sake of calculations and nomenclature, we’ll be using the coordinate system described in our recent post about representing hexagonal boards in 2-dimensional arrays. This post will be very hard to follow if you haven’t read that.
  • Since the Hive board can be reshaped dynamically and could actually be moved end-over-end in any direction indefinitely, there is no actual physical board that you could make which could be used to contain an ongoing game. Rather, the “bounding board” we seek to calculate is the smallest area in which absolutely every legal permutation of board states could be contained. In more simple English: we could use this to make a box such that any legal game of Hive could be covered with this box. If we lift the box and another play is made, we could again cover the board with the box (even if the box is in a slightly different location).

Step 1: Building the bounding board

Now it’s time to start imagining all of the extremes. To make the examples easier to visualize, we will picture all of the white tiles on one side and all of the black tiles on the other side, with their point of contact being the queen from each side. Now we can build the board:

  1. click for fullsize version

    Because of the way our coordinate system works, if all of the tiles were layed out from (0,0) downward so that the next piece was at (0,2), then all of tiles would take up 44 rows and 1 column. This is the most extreme vertical case.
  2. If the tiles were laid out to maximize the number of columns, they would follow a zig-zag pattern from the left to the right. Since each two pieces would equal one-column, then there would be 5 columns taken up by white pieces, then the white queen and black queen would share the center column, followed by 5 more columns of black tiles. This leads to 11 columns. This can be done in 2 rows, but the next example will show that the number of rows used could also be increased.

  3. To create the most extreme diagonals, interestingly, the number of columns does not decrease at all in this coordinate system. However, when the pieces are laid out so that they are all 45-degrees off from each other, the maximum number of rows now increases to 22.

  4. If all of the extreme examples are superimposed upon each other, the minimum bounding-area becomes clear. Awesomely enough, the bounding area is a heaxagon! Patterns everywhere, man. It tickles my math-parts that the hexagon is also rotated 90-degrees from the orientation of the hexagonal tiles themselves.

Step 2: Measuring the bounding board

Since the board is not a simple square, a bit more math needs to be done in order to calculate the size of the bounding area. This will be done for the general-case of Hive in terms of the number of tiles which each color has available. This gives the bonus of making it trivial to calculate a maximum board-size for the other existing variants to Hive also.

It’s actually pretty easy to calculate the size of the bounding hexagon:

The number of tiles which each color has will be called “X”. In the default Hive game, for example, there are 11 tiles of each color. eg: X = 11
For simplicity, the hexagon can be broken into three parts. Triangle A on top, rectangle B in the middle, and triangle C on the bottom.
The number of spaces (the area) of the bounding board is just the sum of these parts. Area = A + B + C
This is a hexagon, so A is just a mirror-image of C, but the size of A and C is the same A = C, so
Area = 2A + B
The way hexagons get laid out in a triangular shape makes it so that row 1 has 1 tile, row 2 has 2 tiles, etc. Therefore, the area of A is the triangle number of X. We’ll use T(X) to represent the triangle number of X. A = T(X)
B is a rectangle on the hexagonal grid, so it contains rows whose width fluctuates between being X tiles wide and X-1 tiles wide. Therefore, we can say that B is the sum of the longer rows (which appear on the top and bottom) plus the sum of the narrower rows (of which there is one-fewer because they are neither on the top of the rectangle nor on the bottom). Area = 2T(X) + B
B = (sum of pieces in the wider rows) + (sum of pieces in the narrower rows)
The wider rows are X+1 tiles wide, and the whole rectangle is X tiles high. sum of pieces in the wider rows = ((X+1 tiles) * X rows)
The narrower rows are X tiles wide and there is one less row of these because they are bounded on each side by the wider rows. sum of pieces in the narrower rows = (X tiles * (X-1) rows)
Therefore… B = ((X+1) * X) + (X * (X-1))
Substituting that back into the area equation we get… Area = 2T(X) + ( ((X+1) * X) + (X * (X-1)) )

So that gives us the maximum area of the bottom layer of the minimum bounding board of Hive. Bottom layer, you say? Yup: we haven’t accounted for that wily Beetle yet! For the unacquainted: the Beetle is a special piece in Hive which has the ability to climb on top of other tiles and trap them.

Step 2.5: Modifying the total to take height into account – a.k.a. “What about the Beetle!?”

Since Hive pieces can be stacked, the board is technically 3D: it is a hexagonal prism. Therefore we need the total volume of the board to measure the number of board-spaces.

In Game Theory, it’s most important to create an upper-bound on the number of board spaces (cells), the state-space complexity (number of valid board configurations), and game-tree complexity (all possible moves), rather than necessarily having the exact number. While the calculations shown above for the bottom-layer of the board are exact, when taking height into account we can over-estimate a little (for simplicity) to get a general case equation for the upper-bound of all variants of Hive.

Since the total number of spaces (on all levels) needs to be calculated, the equation can be modified by multiplying the maximum size of a layer by the maximum height the board can achieve. The maximum height that the tiles can achieve will be referred to as H, so the new equation is:

Max board spaces = H * (2T(X) + ( ((X+1) * X) + (X * (X-1)) ))

Step 3: Applying the equation: the actual upper-bound of the Hive board size!

As mentioned above, this is a slight over-counting which we might explain and tweak in a later post, but this will still give us an important start if we just fill in the numbers to the general-case equation above.

Plug and chug:

General equation derived above Max board spaces = H * (2T(X) + ( ((X+1) * X) + (X * (X-1)) ))
Hive without any modifications has 11 tiles of each color. X = 11
In the basic edition of Hive, the maximum height is achieved by piling all 4 Beetles (2 from each color) on top of the same non-Beetle tile. This maximum height, therefore is 5. H = 5
The general equation for Triangle numbers is T(X) = (X * ((X+1)/2)) T(11) = (11 * ((11+1)/2))
T(11) = 66
Substitute these values in Max board spaces = 5 * ((2*66) + ( ((11+1) * 11) + (11 * (11-1)) ))
The maximum possible number of board-spaces in the smallest bounding region which could contain any legal configuration of a game of Hive with no modifications: Max board spaces in Hive = 1,870

So there you have it, there are no more than 1,870 spaces in the virtual board for Hive. For comparison, chess (which is pretty complex already) has 64 spaces.

Did you have as much fun with that as I did? 😀

Please comment if you’ve looked over my reasoning and it seems solid, if you’ve found some errors to correct, or if you have any questions.
Thanks!

Update: In the comments, Hive Champion, Randy Ingersoll, helps narrow it down to 1,290 spaces in the virtual board for Hive.

Representing a board of Hexagonal pieces in a 2-dimensional array

When working on Hive and Proximity, we’re dealing with boards of hexagons. If you look at a bunch of hexagons together, you’ll notice that they don’t sit next to each other in a way that’s a straightforward analog to square pieces like you’d find in a chess board.

In the process of working on these two games, I came up with a system of mapping all the pieces to a 2-dimensional array (rows and columns).

As shown in the diagram: if you offset every other row by half of a tile, you can address every space using normal row/column coordinates. The red arrows show a path of traversing across columns in the same row and the blue arrows show a path moving down rows in the same column. In a board with square pieces such as chess, these would both just be straight paths instead of the blue lines zig-zagging. As an exercise, can you see where the next column to the right of the blue lines would be? The second column would start at (1, 0) and would go to (1,1), then back to (1,2), then (1, 3) and so-on. Not so complicated! 🙂

The math for finding the coordinates of a space in a specific direction from a starting-space is still slightly more complex than normal square boards because the calculation is different based on which row you start in. To completely remove the necessity for doing these calculations more than once, I started using helper functions to help get a piece in any direction or to get a collection of all adjacent spaces.

As you might be aware, Proximity is Open Source, so you can check out exactly how we handled things.

To make things quicker, I’ll post a peek at some of the helper functions we used in Proximity. One quick note: this code forces all pieces to have positive-integer coordinates because the board for Proximity is a predetermined size. Since Hive is a bit more dynamic, that game doesn’t have those restrictions. Fortunately, this coordinate system still works fine with negative coordinates.

Here is the helper-code for Proximity (in javascript):
[crayon lang=”js”]
/***** DIRECTIONAL HELPER FUNCTIONS *****/
this.leftOf = function( row, col ) { return new Proximity.Coords( row, col-1 ); }
this.topOf = function( row, col ) { return new Proximity.Coords( row-2, col); } // need to jump two rows in the array to work visually
this.rightOf = function( row, col ) { return new Proximity.Coords( row, col+1); }
this.bottomOf = function( row, col ) { return new Proximity.Coords( row+2, col); }
this.topLeftOf = function( row, col ) {
var coords;
if( row % 2 == 0 ){
coords = new Proximity.Coords( row-1, col-1 );
} else {
coords = new Proximity.Coords( row-1, col );
}
return coords;
}
this.topRightOf = function( row, col ) {
var coords;
if( row % 2 == 0 ){
coords = new Proximity.Coords( row-1, col );
} else {
coords = new Proximity.Coords( row-1, col+1 );
}
return coords;
}
this.bottomLeftOf = function( row, col ) {
var coords;
if( row % 2 == 0 ){
coords = new Proximity.Coords( row+1, col-1 );
} else {
coords = new Proximity.Coords( row+1, col );
}
return coords;
}
this.bottomRightOf = function( row, col ) {
var coords;
if( row % 2 == 0 ){
coords = new Proximity.Coords( row+1, col );
} else {
coords = new Proximity.Coords( row+1, col+1 );
}
return coords;
}

/**
* Returns an array of all of the coordinates surrounding the given coordinates.
*/
this.getSurroundingCoords = function( row, col ){
var allSurroundingCoords = [
self.topLeftOf(row,col),
self.topOf(row,col),
self.topRightOf(row,col),
self.bottomRightOf(row,col),
self.bottomOf(row,col),
self.bottomLeftOf(row,col),
];

// Only return coordinates which are on the board (not off the edge).
var validSurroundingCoords = [];
for(var index in allSurroundingCoords){
var coords = allSurroundingCoords[index];
if((coords.row >= 0) && (coords.col >= 0)
&& (coords.row < self.getNumRows()) && (coords.col < self.getNumCols())){ validSurroundingCoords.push( coords ); } } return validSurroundingCoords; }; [/crayon]

Hive for Xbox starting Alpha Testing!

Something's not right about the placement of that cursor... good thing we're doing an Alpha test!


Development has been cruising right along on Hive. While we’re still a few months away from a final version, we’ve gotten to the point that the game is playable as local multiplayer “pass-n-play” (where you share the same controller).

Obviously that’s very limited functionality, but it’s a very important milestone. Right now, players can start to hammer on the game to make sure the rules are exactly as expected and that the controls feel right.

We know there are a lot of die-hard Hive fans out there, and we’d love to have your feedback while we continue to develop the game so that we can make sure to do justice to the boardgame.

That’s why we’re starting a private Alpha Test and asking anyone interested to apply!


Hive Alpha Test

Here is some more info:

  • You need an Xbox-controller with a cord and a PC with .NET installed.*
  • You’ll get a download-link and will be notified when new versions of the alpha are available to download (probably every couple of weeks).
  • You will be invited to a private Alpha Test forum, where you can leave as much feedback as you want and discuss things with us as well as the other testers.
  • The PC Alpha-test version of the game will expire in a few months since we don’t have rights to distribute the game on PC (we got special permission for this Alpha Test).
  • We’ll need your email address. We will only email you about things relating to the Alpha test.**
  • Your name (or alias, if you prefer) will appear in the credits of the game.

Apply for the Private Alpha

If you’d like to be part of the Alpha, please do one (or more) of the following:
UPDATE: PLEASE NOTE THAT THE ALPHA IS OVER. THE GAME IS NOW AVAILABLE ON XBOX 360 AND ON STEAM!

  • Tweet that you’d like to be in the alpha (here is a pre-assembled tweet!), and follow @BlueLineGames so that we can direct-message you more info.
  • “Like” the BlueLine Game Studios facebook page then post on our wall that you want to be in the Alpha Test (we’ll fb-message you more info).
  • We prefer the other two methods but if you don’t have twitter or facebook, just send an email to “sean” at this site (bluelinegamestudios.com).

Thanks in advance for helping us make sure that Hive for Xbox is the most amazing adaptation imaginable of the game we all love!
– Sean


* Download .NET for free here. Xbox doesn’t have a good way to let non-developers test games that are currently in development, but we can just build the game for PC and run the test there. We’d like testers to plug the Xbox controller into their USB port though, so that they can get a feel for whether the controls work right. Technically, you don’t need a wired controller if you happen to have a Wireless Gaming Reciever for Windows.
** If you want to be notified for all of our new game announcements and releases, please sign up for our mailing list.

Proximity HTML5 game for Pokki is now Open Source

Last week, we announced Proximity for Pokki.

Tonight – in hopes of helping other game developers get off the ground with HTML5 games and/or developing new apps for Pokki – we’re making the code for Proximity open source.

If you have some questions about anything we did in the app, please let us know in the comments and we’ll try to respond right there or write some tutorials for more complex answers.

Here are the interesting links:

When you’re done grabbing the code, see it in action by downloading Proximity for Pokki!

New game: Proximity!

BlueLine’s first game release is Proximity for the Pokki platform!Proximity HTML5 game.

We’re still hard at work on our larger project, Hive for Xbox 360, but we took about a week and a half aside to make Proximity. The game was an entry for the Pokki 1UP contest which is currently going on.

Proximity is a territory-based abstract strategy game – like Chess… or Hive ;). You place colored tiles with a number of armies on them and try to conquer the surrounding territories. Also: the tiles are hexagons (we may be obsessed).

The game currently supports single-player vs. AI (the AI is pretty decent) and local multiplayer.

Pokki is a platform which wraps HTML5 apps and makes them downloadable and automatcially-upgrading & has an app-store. The contest is to make a game for the platform using HTML5 and other web-standards (flash is forbidden). There are 3 judged awards and a people’s choice award which goes to the app with the most active players by the end of the competition.

Please go download and play Proxmity! 🙂

So far, most of the feedback is along these lines:

  • It’s maybe a bit too addictive
  • Are those numbers really random?
  • Oh, you can click the squirrel! 😀

Please let us know what you think of the game in the comments!

Proximity with Military skin

Proximity with Pokki skin

Proximity with Portal skin

Configurable-radius deadzone for thumbsticks in XNA

Yesterday, while co-working at The MADE (a cool game museum that lets Bay Area developers work out of some of their space), the topic of thumbstick deadzones came up. Ian Stocker mentioned that he had recently made a blog post about using the Xbox analog sticks as a DPad in XNA.

Since Hive deals with hexagons, I didn’t do my implementation quite the same. The deadzone code I used is separate from the code for getting directions, so it should work regardless of what your game is using the thumbsticks for.

We discussed the methods that we used for adding a “deadzone” to the analog sticks. A deadzone is the area near the center of the stick where you ignore input because slight movements (or even old controllers while their sitting still) could trigger unintended input otherwise. He explained that his deadzone was square and thought that people might benefit from my code which makes a circular dead-zone, so here it is!

I did the entry-level trigonometry so that you don’t have to! 😉

Example usage of the thumbstick “deadzone” code.
[crayon lang=”c#”]
PlayerIndex playerOne = PlayerIndex.One;
GamePadState gamePadState = GamePad.GetState(playerOne);
Vector2 leftThumbstickState = gamePadState.ThumbSticks.Left;
if ( ThumbstickMovementIsSignificant(leftThumbstickState) )
{
// Actually use the leftThumbstickState.
}
[/crayon]

And this is the general code that I put in my GamePadHelper.cs.
[crayon lang=”c#”]
///

/// Returns true if the movement is significant, false if the movement was so slight
/// that it shouldn’t be counted. This uses a reasonable default for how much to ignore.
///
///

/// ///
public static bool ThumbstickMovementIsSignificant(Vector2 thumbstickState)
{
float percentToIgnore_default = 35.0f;
return ThumbstickMovementIsSignificant(thumbstickState, percentToIgnore_default);
}

///

/// Determines if the thumbstickState passed in is significant enough, given the constraint
/// of how much movement should be ignored.
///

/// /// Percentage of the unit-circle which is ignored. If 25.0f, then the inner-quarter of movements will be considered too slight. If 50.0f, then the inner half will be ignored, etc.. public static bool ThumbstickMovementIsSignificant(Vector2 thumbstickState, float percentToIgnore){
bool isSignificant = true;
if (percentToIgnore > 0)
{
// Uses pythagorean theorem to see if the hypotenuse ends inside of the “significant” area or not.
float a = thumbstickState.X;
float b = thumbstickState.Y;

// Thumbstick numbers are in a unit-circle so scale the percentToIgnore to the range of 0.0 to 1.0
float minHyphotenuseLengthForSignificance = (percentToIgnore / 100);

// This function is likely to be called every tick, so we square the minimum hyptotenuse instead of comparing it the sqrt of a^2 + b^2 (square roots are a bit slow).
if (((a * a) + (b * b)) < (minHyphotenuseLengthForSignificance * minHyphotenuseLengthForSignificance)) { isSignificant = false; } } return isSignificant; } [/crayon] I haven't played around with the thumbsticks that much, so I'm not sure how big of a deadzone is ideal. I stuck with the default of percentToIgnore_default = 35.0f;, which means that the inner 35% of the thumbstick’s radius is ignored. Feel free to tweak the default or pass in a custom value as the second parameter to ThumbstickMovementIsSignificant().

Hope the code is helpful! 🙂

Announcing our first game: Hive for Xbox 360!

We’re buzzing with excitement for this announcement…

BlueLine Game Studios has been given an exclusive license to bring the extremely popular Hive boardgame to Xbox!

If you’re not familiar with it yet, Hive is a boardgame that’s grown a huge following.  It was created by British Inventor John Yianni of Gen42 Games.  In his own words:

Hive is a board game with a difference. There is no board! The pieces are added to the playing area thus creating the board. As more and more pieces are added the game becomes a fight to see who can be the first to capture the opposing Queen Bee.

Hive for Xbox 360The gameplay is really easy to pick up, but just like chess the possibilities in gameplay are endless.  This makes it great for starting right up with family, friends, and roommates but complex enough to give even the sharpest minds a challenge for years to come.  …and I really do mean that: the geniuses at American Mensa saw fit to give Hive the prestigious Mensa Select award!

I think the versatility has a lot to do with why Hive has become such a worldwide favorite.  People really go nuts for this game… in this fan gallery (all 42 pages of it) you can see pictures of people playing in front of the Great Pyramids, using hand-made sets, next to a pool, at the bottom of a pool, on the ocean floor (seriously), and pretty-much anywhere at any time.

We’ve already begun development and we think we have some great ideas on how to work with Gen42 Games to bring a great version of this game to the Xbox 360 …and we would love to hear your thoughts too.  So if you’re a Hive fan, pipe up in the comments! 🙂

If you’re as excited as we are, sign up to be notified when the game launches!

Update: As of Feb 8th, 2013 – Hive is now available on Xbox 360!

The Starting Line…

Welcome to the BlueLine Game Studios blog!  We’re a scrappy startup of Indie Game Developers who are starting out our first releases in this new company by making Xbox games from award-winning boardgames.

Here are some ways you can follow along with what we’re up to:

Thanks for stopping by and please check back soon for the announcement of our first game!!

Much love,

 – The BlueLine Game Studios Team (Sean & Geoff)