Thank you for visiting Blazing Games

Drop Dead Alpha

Now that I have another issue running through my mind, I am finding it very hard to concentrate so this section took me much longer to put together than it should have. Still, despite having bad news running through my head and feeling under the weather, I am going to do my best to get this game finished today, hopefully before supper. That being said, I started working on the alpha at 11:00 and finished it at 12:45. I am now going to take a late lunch.

The alpha version was essentially re-working the game so that the game being played would be Drop Dead instead of being Poker Dice. While this sounds like an easy enough task, the thing about Drop Dead is that you have a variable number of rolls that can be made, so to handle this proper game states had to be worked out. Because dead dice don't get counted, the life of a die had to be tracked. This is a simple boolean flag, but when working out the rolling and the calculating of score this added a lot of complexity. If you are thinking about what has to be done, this is fairly simple stuff, but when other things are on your mind coding game logic becomes much more difficult.

Essentially what is happening is that when the game starts, a state variable is assigned to the constant value STARTING. When the player clicks on the roll button, all the values of the dice get checked to see if any are 2 or 5 so those can be moved down and the DEAD message shown for them. The problem is that when the game is starting, the values from the last game are all dead so you need to have code that checks to see if the game is starting and if so roll all the dice. Why couldn't I just set the dice to all 1s when a game starts? I like to keep the last players values until the new player has officially hit the roll the dice button. Minor point, perhaps, but it was a design decision that had to be made.

Scoring the game is done though this is not visible to the player yet unless the player has a version of flash that can show them the trace output. I suppose I didn't really need to get the scoring done until I was at the state where I was implementing the final versions of the player class (beta) but at the end of the roll the game state is changed to PLAYING so I figured I might as well get the preliminary scoring work out of the way. This is tricky as you need to only take into account the dice that were not dead at the start of the round and zero the score if there are any new dead dice.

Overall, this task wasn't too difficult and probably should have only taken about 45 minutes, but like I have said I am not with it today.

Previous page
Making Drop Dead Page 4

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2008 Blazing Games Inc. All Rights Reserved