February 2020 Summary

This month I continued to work on SDL Shooter, which is a space shooter written in SDL and C.  This game started as a presentation demo for the December 2019 Knoxville Game Design meeting.  The project source code is available on my GitHub account.  I’m hoping to release it on more platforms when it gets to a point where I feel that it is complete.  Right now I’m just having fun adding new types of enemies.

 

  • Foxtrot – Moves a few units either vertically or horizontally, pauses, and then moves in a new direction.
  • Golf – Snake type enemy that has a random number of tail links.  Each link of the tail must be damaged before the head can be damaged.  Moves in a sine wave at variable rates.
  • Hotel – Stationary enemy that constantly fires projectiles in a radial fashion.
  • India – Large enemy that explodes into four smaller enemies when damaged.  When the four smaller enemies are damaged they explode into eight even smaller enemies.  I need to make the explosion angles random, instead of the standard 90/180/270 and 45/90,135, etc angles.
  • Juliett – Hopper enemy that jumps in a parabola one to three units horizontally.  One issue is two of these enemies can jump to the same spot and overlap.  This could be solved by adding a target location variable for each enemy, and determine if another enemy has claimed that spot before jumping there.  I would also like to have the enemy attack the player’s ship in some way.  Either charge the player’s ship when it is aligned vertically, or shoot webs at the player’s ship to slow it down like in Zekkou no Tomodachi.
  • Kilo – A random number is displayed on top, and the player must shoot the correct binary sequence to defeat this enemy.  Added the current “attack value” below the target value, which makes completing the binary sequence a little easier.  The enemy has between 3 and 5 bits, so the maximum value for a 3 bit enemy is 7 and the maximum for a 5 bit enemy is 31.
  • Lima – A bat type enemy that starts sleeping, and then awakes and chases the player when the ship is near.  The enemy is only vulnerable when it is not sleeping.  The amount of time that it takes for the enemy to wake up is random.  The second level enemy moves faster and takes more damage to defeat.
  • Mike – Color orb enemy.  Three small orbs revolve around the center, which are either red, green, or blue.  The player must shoot the correct revolving orb to match the center.  If the center is yellow, cyan, or magenta, then it takes the correct two orb combination to defeat the enemy (such as cyan = green and blue).  Shooting an incorrect orb will make the orbs revolve faster for a short period of time and the enemy will shoot at the player’s ship.

I checked my Microsoft developer dashboard today to see if the XBox One Creators Program was still running.  I noticed that Kitty’s Adventure has now passed 50,000 acquisitions between XBox One and Windows Store.  It is by far the most popular game that I’ve released to this day.

Also this month, we had a great turnout for the online Knoxville Game Design Meeting.  This month’s topic was Java Game Development.

I spent some time updating my two college work pages for Georgia Tech and the University of Tennessee.  Links to those two pages are now displayed on the main menu on my site under Education.  I also found more of my old websites, which I uploaded and linked on my wiki page under Historical Pages.  I uploaded the source code for some projects that were missing, such as the Predator database projects.

Falling Blocks

Play online

A falling blocks game that I wrote to demonstrate usage of HTML5 and Canvas to make an interactive game that runs in a web browser.  Use the keyboard left and right keys to move pieces, press the up key to rotate a piece, and press the down key to drop a piece.  Dropping pieces and completing lines increases your score.  After completing every 10 lines the speed of the game increases which makes the game more difficult as the player progresses.

Web browser must support HTML5 and Canvas

 

 

 

 

 

Released

Face Lift

Updating Graphics

Made two arrow sprites for the level select screen to replace the “V” and “^” character strings that I had before.  A new arrow delay value was added to the LevelSelectScreen class, which allows me to move the arrows up and down slightly to draw attention to the arrows.  At first the arrows were moving too quickly, because I moved them one pixel for each update.  Therefore, I set the max counter value to 60, and then moved the arrow by the counter value / 10 (one pixel for each ten updates).  Created another image for the highlighted row, to get rid of the default tile sprite that I had.

Created a static method to draw shadowed text.  I did a quick search on the web to see if there was an API call or parameter that could be used to draw shadowed or outlined text, but all the solutions that I found were custom written ones.  Therefore, I just created a static method to draw the raised text, which takes the text string, color, position, and font as parameters.  I didn’t have a good place to put this, so I added it to the main game game class for now.   All of the fonts on the level select screen, game win screen, and game level screen were updated to use the new raised font method that I wrote.  Plus, it makes everything stand out much better.

 

The headers on the level select screen need to be tweaked slightly, so that the header text centers over the rank values.  I will need to see if there is a method to get the width of the text for a specified font.

The layout of the game win screen was also reworked to better place the values.  One issue I noticed was that the “NEW BEST” text was next to the category (piece, lum, time) value.  This may lead players to believe that it is a new best value instead of a new best rank.  The values are not recorded in the game, and only the player ranks are stored.  Therefore, the “NEW BEST” text was moved lower next to the rank value.  The game win screen still felt plain, so I added a variable and added logic to make the “NEW BEST” text blink from white to light green, which gives it a more arcade type feel.

Created a static method in the LevelDefintion class to return the color of a rank, which takes the rank integer value as a parameter.  This simplified some of the draw code, and I removed redundant code which calculated the color value in other places.

This definitely feels like I’m rolling downhill now.  Before, I could spend a week or two making logical fixes to the game, with little to show for it.  Now that I’m working on the graphics, I have a lot more to show in a relatively short period of time.

Pause Screen Needed

One functional change I will need to make is add a pause screen, because currently pressing back during the game will take the player back to the main menu.  I really need to disable that, and add a pause screen with just two options: resume and return to main menu.  I can probably use much of the same code from the “clear records” display, maybe even write that simple dialogue screen that I was thinking about a few days ago.

Star Rank

One problem I noticed in the game was that there is no distinction for a player if they acquired all three S ranks in one play of a level or from multiple plays of the level.  I went back and added a star marker on the game win and level select screens, showing if the player got S ranks in all three categories at once in one play of a stage.  That way the player has a way of showing that they got all three S values at once, instead of having to play through the stage multiple times to get the S rank in each category.  I just had to add another array in the player records class, which is parallel to the level complete array.  As far as saving and loading goes, I just replaced the “Y” value in the save file with an “S” if the player achieved the star rank (all three S ranks at once).

Take level 1-9 in the screenshots below for example.  The player currently has ranks S,S,B for the level.  The player completes the stage getting an S-rank in time, but a B-rank in luminosity.  The player now has S-ranks in all three categories.  However, Since the player got the time S-rank on a separate play of the stage (without getting all three S-ranks at once), the player did not get a star for that level.