Building an XNA Game Studio XBox360 Indie Game.

[page 0047] ~ Confection de Logic:

Updates – . . .

Java Version 7 Update 45, Uninstalled Java 6 Update 20.  And the theme this month is CANDY.

What is Candy.

Candy, looking at it from a “normative” point of view, should be a sweet treat given and taken as a gift that makes someone happy.  It is truly a superfluous gesture of content, but carries a capacity to generate good will and denote a special time to extend a special moment, like dessert or an after diner mint.  And this is how I will be looking at this months theme in concern to this months game.

Building a Concept.

My mom asked me a question recently, “How can you see in the dark?”  And seeing that I’ve been doing a lot of computer coding lately I took the question away from the small talk we were having and later on thought about it with a little facetious spin.  Inside the computer it is dark, there might be some electricity to power it but in general it is dark.  The same goes for my brain, apart from my electrochemical neurons sparking greater pathways, however that all works, it is dark.  So how do I see in the dark?  Comparative memory of memories of what I have found or at least what I have been lead to believe and by having those memories become consistent from other past experiences.  This is how I see in the dark.  And with that thought, it started me off in another direction when it came to building this months game using the theme Candy.  And of course, I’ll continue to version my way through this month keeping the overall theme the game of chess.

Ceteris Paribus

This game, during game play, has two main states.  Clicking on either button titled White or Black to start the game the first game state is initiated.  This first major game state is seen through a mode where all of the chess pieces are scanned individually.  Each piece is highlighted for a fraction of a second as an algorithm collects data for each chess piece.  In that scan the viable path of that piece, if it protects another piece or if it has the possibility of taking an opponents piece are stored to be revealed in the second mode of the first state.  The second mode in this first game state is where there is a change on the screen that becomes updated to show this new information in a manner that looks like it came from a confectionary, thus following the Candy theme of the month.  The second game state can be selected from any of the chess pieces still in play.  Clicking on a piece of the team whose turn it is to move, shows the options of that piece alone, i.e. ceteris paribus.  The movement plot, any piece that that selected piece protects and any piece that that selected piece may be able to take are shown.  After a piece is moved, that player clicks on the opposing players button on the top of the screen advancing the move to the next player.  If at some point the King is put in Check, the screen changes showing the word Check and flashes the King piece in red.  The process continues back and forth until a checkmate or stalemate status is assumed from the players.

I’ll be doing the documentation differently for this game.  On previous game builds I would build, document and save, build, document and save, build, document and save.  This time around I decided to just build and save, build and save, build and save to finish the game and then work on the documentation.  What I’ll be doing now is reopening the save files, loading and running them to see just what got accomplished at each save.  At times the saves may have been redundant or possibly a panic save just in case but for the most part each save had some substantial change of code yielding new implementation of the added functions and logic.

The Builds, the Saves.


The base code comes from the last game Chess Sequester.  The initial change was to move the title from the center to the bottom of the screen placing it underneath the chess board and to add some flash to the opening screen.  I used some random RGB colors that changed the colors of the hexes so the screen would flash different colors randomly.  The intent here was to give the splash screen a happy candy look.  There doesn’t seem to be much else from the original game that had been changed other than that.


This next phase changed the candy coloring to shades of black and white that keep the general structure of the chess board using shades of gray that flash on the screen.  The title was also changed to Mind-Candy.  When the game is started the chess board is fully visible, unlike the previous game that started with no tiles showing on the chess board.


The splash screen has changed again and has (X, Y) coordinates of the pieces in black and white on either side of the chess board.  There are also black solid square symbols that originate at the position of the pawns with a black line that ends in a solid black circle following the movement plot of a black pawn.  The same is found from the position of the white pawns.  Starting the game and having all of the chess pieces placed on the board, the same movement plots using the described icons follow the pawns as they move on the board.


On the splash screen the pawns movement plots have been removed.  The time line has been changed.  The letters on the time line are gone and three numbers, one on either end and one in the middle.  Starting the game the timer ticks off the seconds and move the red line closer to the current player side.  When the next player start their turn the timer move in the other direction and the counter begins to accrue more time on that players clock while the opposing players clock stops.  The middle timer count up and down as the players trade turns.  The (X, Y) coordinates are also missing.


The clock time is now given in minutes and seconds, ” 0 : 0 “, instead of a single number given in seconds only.  The (X, Y) coordinates are back and when a piece is clicked on, selecting it for movement, the numbers change in how many are shown for either side, why I don’t really know.  But there are now magenta colored hexagons on the chess board that follow the square-line-dot icons described above.  The hexes also follow the movement plot of pawn as it moves.  There are also highlight squares around the chess pieces.  There is a yellow square around the white pieces and purple around the black pieces.


On the non-selected piece screen the all the pieces on the chess board show their movement plot in the hex color of the highlight square that surrounds that piece.  The hexes line widths are also larger.  The board is very cluttered and indiscernible.  There is also another clock timer on the center top of the play field that shows the total elapsed time of both players.  The hexes don’t follow any rule that places them on top of the highlight squares of the pieces.


None of the movement plots on the non-selected piece screen are shown.  The Rook is the piece that was being worked on.  The Rooks movement plot now shows a half-hex on the board in the non-selected piece screen.  The movement plot has been changed for the Rook so that when it comes up to an ally or opponent piece the movement plot stops.  In previous versions the movement plot continued through and past the blocking piece.  Also only one Rook from either side has this new feature, none of the other pieces has this feature implemented as yet.


Hmm, the black and white (X, Y) coordinates are back on the side lines of the chess board.  Maybe something else significant happened, maybe, but nothing noticeable.


Only one Rook, black, has the half-hex movement plot working.  The movement plot only works for the white side.


All four Rooks, two white two black, have their respective highlighting and all four have the movement plots blocked when they run up against another piece be it ally or foe.


Hmm, more extraneous numbers on the screen.


Working on the Bishops now.  The colors of the movement plot are of the same side for both the ally and foe.


Still working on the Bishops but I can’t notice any real change on the screen.


Working on the Knights.  Each have their own color for their movement plots.


More Knight stuff.


All of the chess pieces are highlighted except for the pawns.  All of the pieces have their movement plot shown in their respective color, except for the pawns and the King.


All the pawns show their highlights and the selected screen shows a change of the movement plot that is more constricted than previous builds.


The letters of C-H-E-S-S are printed to the splash screen in random positions.


The name of the game has been changed to “Confection de Logic”, and the King has its movement plot shown in the non-selected piece screen.


The pieces in the back row no longer have their highlights in the non-selected piece screen, only the pawns.  The black and white (X, Y) coordinates numbers are back, along with a couple of other numbers showing about the screen.


Hmm, panic save?


Starting to work on the movement plot of the pawns in the piece selected screen.  The pawn no longer shows all four spaces that a pawn can move, leaving only two forward tiles before a pawn moves and then one there after.  The two diagonal movement plots are only shown when a piece is in that tile.  The two modes are, if an ally is in the diagonal space it is highlighted with a cyan hexagon showing that it is protected by another piece and if a foe is in the diagonal space it is highlighted with a red hexagon showing that it is in peril of being taken.


Hmm, panic save?


All of the chess pieces are highlighted again.  There are two numbers in the bottom left and right sides of the screen that show the coverage of the chess board that a piece can move to.


The first glimmers of a logic scan are started.  The side that goes has each piece highlighted and scanned one at a time, pawns first then the crown pieces, to show the movement plot for the turn to come.  That scan also shows which pieces are protected, cyan hex, and which are in peril of being taken, red hex.


The switch is to the back row being scanned first.  The scan moves at one piece per second, or 16 seconds per side each turn.


Hmm, panic save?  Minimal back ground tweaking?


The one piece per second scan, at the end of the scan, updates the movement plot of all the pieces and also shows which pieces are under protection by another by another ally piece with a cyan hex and which foe pieces are under perilous threat with a red hex.  The hexes have a smaller line width than the movement plot half-hexes each with the given sides color, yellow or purple.


There are only a couple of numbers on the screen testing something or other.


Changed each time a player is switched to scan all of the chess pieces for movement plot, ally protection and foe peril.  This scan takes about 30 seconds each time a player switches to the other player.


I can’t see too much of what might have been changed.


Knocked the whole scan time down to 6 seconds, that’s 3 seconds per side.


Hmm, panic save?  More minimal back ground tweaking?


Changed the foe is in peril, red hex, to a half-hex.  This lets the ally is protected whole hex underneath show.  A chess piece can now be seen as protected and in peril from the non-selected piece screen state.  The single selected piece screen mode still shows whole hexes for the movement plot (green), ally protection (cyan) and foe peril (red).


Cut out all the commented code and cleaned up the white space in-between the code lines.


Cleaned up the screen so no test numbers are printed to the screen.


Enlarged the numbers that show how many tiles are available to be moved to for the remaining chess pieces on the chess board.  Also those same numbers are shown in the respective sides colors either yellow or purple.  During the scan, if the King is in peril from an opponents piece in the same place where the title of the game “Confection de Logic” is shown, Check pops up written in red.  After the scan the King slowly flashes in red to leave no doubt that the King is in check.  Checkmate is still up to those involved.

The Game is Complete.

Play the Game Here.

Confection de Logic.

Until then,


October 30, 2013 Posted by | 2013 [0019] to [00??], The Process | Leave a comment