Comes Full Circle

Back Where We Started

After almost two months of development, I’m back to doing what I started on the first days of development which is updating the sprite graphics.  Updated all of the wire graphics, so now those are filled with light gray (#e0e0e0) with white (#ffffff) and black (#000000) around the edges.  It seems to make the wires stand out a lot better.  Unfortunately, since the shading is on specific sides of the sprites, I can’t do the quick flip/rotate trick that I used when first creating these sprites.  However, Gimp provides the ability to zoom to make the pixels really large, which makes adding the outlines rather easy.  Just tedious.  It should just display as a slightly darker shade of yellow, since Yellow is used as the color parameter of the draw method.  Thought about adding an option to allow the player to select their flow color, but it’s too late to add that now.  Maybe a new flow color will be the reward for completing all of the stages.

 

While I was making graphics, I went ahead and replaced the GameThumbnail.png and Game.ico graphics.  I modified the resistor image with four connections, and replaced the number with just the letter R.  The size for the GameThumbnail was 64×64 pixels, which I believe is used for the dashboard.  The graphic I created is simple, but it does the job.  The Game.ico I believe is only used for when it is running under Windows, and maybe under the XBox system menu.

 

You’re on Trial

Made a trail screen in the game, which subclasses the basic Screen class.  It was a little frustrating to test this, since the game is not in trial mode as I am developing it.  There is a Guide.SimulateTrialMode value that can be set to make the game run in trial mode for testing.  Or I can run the game as trial mode from My Game list, but the game has to be deployed from Xbox Studio Connect first.

Copied a lot of code from the Pause screen to implement two selections, “Buy” and “Back to Title”.  Choosing “Buy” will call the Guide.ShowMarketplace method.  This doesn’t actually purchase the game, but instead takes the player to a standard XBox screen where they can purchase the game.

Added a check in the update method of the trial screen to see if the game has been purchased.  If it has been purchased, then it displays the “Thank you” message and removes the buy option from the screen (leaving only the “Return to Title” option).  From there, the player will have to use level select to pick up at the last level they were playing, because it’s too late now to rework the code for an event that will just happen once for each player.  Ideally, I would have a “Continue” option from the main menu, but I wanted to keep the main menu simple.  Having to find the last level played in the level select screen is the “price” the user has to pay in time for having the simple menu.

Added my cheesy Indie game “song” into the trial screen.  I had to work it in somewhere.

  


Other Fixes

Had to add a special case to fix the level 10 LED (piece ID 30), just as I had to do with the level 10 battery.  Made comments in the code that these should be optimized later.

Added code to center the numeric text of the batteries and LEDs, since the “10” value was displaying near the edge  of the battery and LED.

Maybe it’s just me, but the scrolling background for the game level screen on the XBox seems choppy.  It doesn’t do this for the PC version.  Not sure if that is fixable, or if it’s just my eyes playing tricks on me from looking at monitors too long.  The scrolling background for the title screen doesn’t look this way either.  I may have to re-evaluate some of the code that I used for the slow scroll method.  Alternatively, I could just set the level select background to scroll one pixel per update, just like the title screen does.

Noticed a problem when the level ends and tries to save.  If the Guide is already open, then the game will crash, because the file save operation uses the BeginShowSelector method which conflicts with the Gudie.  To fix this rare scenario, I think I can just pause the game when Game.IsActive is false which is suggested by this article.  This only happens if the player draws the connections to complete the level, and then presses the Guide button before the level is complete, which will cause the level to complete while the Guide is open.