Gun Model

screen063

Created a gun model in Blender.  The gun was created using three cubes, which have three different textures.  I deleted half of the cube vertices to make a plane, and I moved the remaining vertices to trace around the gun image that I added as the background image.  Additional vertices were added to the plane by selecting two vertices and pressing “W”.  That will subdivide the line, adding a new vertex.  After I had the outline, I extruded the points out in the y direction to give the model depth.  Since this will be used for a small image, I wasn’t concerned with making the depth very detailed.  It just needed to be simple enough to make the gun not appear to be flat like a piece of paper.  For now, the textures are just using different diffuse coloring, which are dark green, light green, and white for the trigger.  I would like to make it so that I can programmtically change these colors to make different weapons, without generating new weapon sprites.  Just like with the player and socket sprites, I added an armature.  In this case, the armature looks like a “T”.  I turned on automatic keyframing (red record button), set the frames to 20, and rotated the model 90 degrees for each 5 frames.  Then I exported the animation to image files, cropped and shrunk those images with Gimp and exported those into new PNG images.  Finally, I added the images as content objects in the Blasting Bits project.  I updated the code to display a CollectibleWeapon to use these image textures instead of the default image.  As with the socket images, I had to set the maximum number of frames to 20, since the default is 30 frames.

screen064

When I tried running the game, the gun sprites would display and rotate, but it seemed to rotate extremely quickly.  Therefore, I updated the Collectible class with two new instance variables which add a frame delay and maximum frame delay.  The frame delay is private, and gets decremented on each update.  When the frame delay reaches zero, then the animation frame is incremented and the frame delay is set to the maximum frame delay.  The maximum frame delay variable is protected, since subclasses will need to set the delay value for its collectible type.  For the CollectibleWeapon, I set the maximum frame dealy to 2, so that there are two frames of delay before the next image is displayed.  This makes the gun rotate much more slowly and looks better.

screen065

Graphical and Music Assets

screen069

I took a break from engine programming, and I started working on some of the graphical and audio aspects of the game.  I would like to have a small playable demo in the near future.  For now I am just using royalty free assets, but I would like to go back later and make my own custom art and music.  The font I used is called Ethnocentric, which was downloaded from 1001freefonts.com.  Be careful to read the license agreement for any font downloaded form this site, because not all give you permission to use the font for sale in commercial works.  However, most fonts allow inclusion in commercial works as long as the font is not modified or sold as a part of a font compilation.  The title background texture was acquired from CGTextures.com, which allow use of their textures as long as those are not sold as a part of a texture compilation and it is not used in an open source project.  For the background music, I used two songs from Kevin MacLeod’s incompetech site.  Again, I would like to make my own music in the future, but for now I will use those pieces which only require attribution in the credits screen.

Again, writing good code to play music can be more difficult than it looks.  When going from the game to a menu, I would like the music to change.  However, I don’t want to game music to start all over again when going back to the game.  I could just have the game music play through the menu at a lower volume.  One idea I had was to create a Song variable in the ResistorKit screen class, since usually one only song is associated with each Screen type.  I would just need to have methods to modify it, so that the music could be changed for each game screen.  Additionally, it would be nice to have a way for the music to fade from one song to another when changing areas in the game world.

I reworked some of the screen handling code to add the new credits screen.  One problem is that the “QUIT” state did not have a corresponding screen, so I made a dummy quit screen so that the game states are aligned with the game screens.  I can probably also use the quit screen to display information as the game is closing, such as “thank you for playing” or information on how to buy if the game is running in trial mode.

On the title screen, I went ahead and implemented a scrolling background.  This seems to be a running theme in my games.  I set the scroll rate to 8 pixels per frame, so it scrolls really quickly.  I may need to slow it down if it makes people dizzy.

On the game screen, I went ahead and updated the bounding box display code so that when the instance variable that controls its display is set to true, then the bounding boxes for all game objects (player, enemies, collectibles, projectiles) are displayed.  I also updated the graphic for the player’s projectile, using a supernova effect that I created with Gimp but I’m still not happy with it.

Gomen-nasai

Play online

Three new selectable pieces added to the Gomen-nasai game:  Nut, Jack, and Button.

Move all of your pawn pieces from the Start circle to the Home circle by navigating through the squares on the game board.  Move by drawing cards from the deck, which instruct the player on how many spaces to move.  A Gomen-nasai card lets one of your pawns in the Start circle knock an opponent back to their Start circle and take its position.  Some cards have special properties such as 2 for draw again, 4 for moving backwards, and 7 for splitting the move between two pawns.  The player who gets all of their pawns to the Home circle wins.  Use slides around the board to slide additional squares and knock any pawns on the slide back to their Start circle.

 

 

 

 

Released