Even Software Developers Need a Break Sometimes

Burnout

Took a coding break on Sunday, since I was starting to feel the burnout.  Participating in a programming competition on Saturday really pushed me to the limit as far as writing code goes.  I had done little game playing in April, so I’ve dropped a few places in the XBox gamerscore leaderboards on TrueAchievements.  Therefore, I picked up an easy game from Redbox and scored a quick 700 gamerscore for a quick rank boost.  I also played a few Indie and XBLA games to check out some of the currently independent developed games.

Level Design

I was able to do a little level design, but that was about it.  One thing I’ve got to watch out for is placing two LEDs next to each other, because the GameLight class is derived from the GamePiece class, which means an LED will automatically start filling other adjacent LEDs.  This prevents the player from using resistors to change the flow values for the adjacent LEDs.  This could lead to an automatic bust in some cases.  Noticed that I also need to display the level/stage number on the level complete screen, which would also help me with recording my scores for the rank information.  There are now 50 total levels to play in the game.

  

Did some more playtesting of the game through the XBox, and began recording my scores, which will be used for the ranks.  I want the S Rank to be difficult to obtain, but I’ve got to ensure that it is possible to get the values that I define for the S Ranks.

Level Select Screen Glitch

Noticed an issue on the Level Select screen where the cursor keeps going back to index 0  from index 1 when the down button is pressed.  Not sure what is causing this, but I will check to see if the pause value is getting set properly in the setActiveScreen method.  Pressing up seems to fix it so that down properly moves the cursor down the screen.  Looked at the code, and I realized that it happens when the user holds up and then presses the confirm button on the Level Select screen (to select a level) before releasing up.  The boolean that tracks if up is pressed was not getting set to false, because the Level Select screen never saw the up direction being released.  Setting that boolean to false in the setActiveScreen method of the Level Select screen fixed the problem.


Equipment Menu

screen066

In the player class, I added instance variables to hold the equipped helmet, chest piece, gloves, and boots.  These start out as null, but I added logic to automatically equip one of those items if the equipment slot for it is null when an item for that slot is collected.  I also decided to go ahead and make separate lists for each item type, which will make looping those those lists much easier for the menu.  The collection code was updated to handle these items in the same way that weapons are collected, which adds each piece of armor to the appropriate list.  A method to calculate the total defense was also added, which is the sum of the defense values for each armor equipped.

I recreated almost all of the equipment menu, so that it now handles armor.  Now, the player must select the weapon or armor to replace it.  When selecting a piece of equipment, it will display a selectable list with all of the items that can replace it.

The Weapon and Armor classes were updated to accept a new parameter in the constructor, which is the number of socket slots for each item.  The player will not be able to equip more sockets than this value.  Unfortunately, since the socket for each item is implemented as List, I can only add the socket to the end of the list.  This means that it works in a stack fashion.  I believe I can insert an item into a list at a specific index, but I can’t insert null into the list.  Null signifies that a socket location is empty.  Alternatively, I could implement the Socket list as an array, but that will limit the maximum number of socketable abilities.  Pressing the action (X) button will bring up the list of socket abilities that can be equipped for the currently selected item.  For now, any socket can be equipped into any item.  I already have constants defined for the body location of each socket ability, so I will just need to modify the code to only display the sockets for the selected body location.  All acquired socket abilities are currently stored in one list, but I may want to make separate lists of sockets for each body location to make generating the menus simpler.

I have updated the ResistorKit menu to accept a texture image as part of a menu item.  Unfortunately, I didn’t have any way to access the texture array from the method where the equipment menu is created.

screen067

The player’s current attack and defense values are displayed below the character model.  When equipping an item, if the new value is greater than the current value, then the text is displayed in blue.  If the new value is lower, then the text is red.  If the value is the same, then the text is white.  Currently, all collected items for the selected slot are displayed, so the player’s equipped item for that slot is also displayed in the list.  Removing the currently equipped item would be a slight improvement for later, but will probably be a headache to keep the menu indexes straight since it is currently parallel with the list of acquired items for that body slot.  Alternatively, I could just remove the equipped item from the acquired list whenever it is equipped, which is probably the simplest solution.

screen068

ENGINEA

ENGINEA is an engineering economy software tool that I developed in Visual Basic 6.  The features include cash flow diagramming, benefit cost ratio analysis, deprecation analysis, and an interest calculator.  An article detailing the features of the software was published in the Computers in Education Journal.   I developed this software for a Special Topics course while working on my master’s degree at the University of Tennessee.

 

Download ENGINEA

Software is provided AS-IS with no warranty.