Enemy and Jumping Updates

http://youtu.be/xm8JFK2N9LE

Jumping now uses acceleration and looks less linear.  Enemies now move across room boundaries.

Library Update

When developing a library, one important thing to remember is to make your classes that should be accessible in the API public.  By default, classes are created with no scoping.  You will not be able to access any classes in your library, until those are declared public.  Tonight, I added some of the methods I used for drawing raised text in Resistor to the ResistorKit library as static methods in a Graphics class.

Jumping

After reading about how others have implemented jumping, I decided to scrap my current linear method which is based on subtracting a constant value for a set number of updates.  That resulted in a constant jump speed and fall, which looks very angular when moving at a constant speed.  To fix this, two float acceleration variables have been added for jump and fall acceleration.  I could have probably used just one acceleration variable, but I thought breaking it out into two makes the code more readable.  When the player jumps, this acceleration value gets set to a constant which is the jump power.  This acceleration value gets subtracted from the player’s Y position on each update, which increases the jump height on each update.  Also on each update, the acceleration value is decreased by a constant value.  Therefore, the player’s jump acceleration decreases until it reaches zero.  At that point, the player’s falling variable gets set to true and a similar process occurs with the falling acceleration.  The only difference is that the falling acceleration continually increases so it relies on collision with a block to stop the fall.  I also added a terminal velocity value, which the acceleration can’t exceed.  Right now that won’t make much of a difference in my game since it doesn’t scroll vertically, but if there was a long fall then not having a terminal velocity would make the player impossible to control while falling.

Enemy Updates

I updated the Enemies collection so that a map can now correctly handle multiple enemies.  I also added a method in the Map class to move an enemy from one map collection to another.  This is used for moving a enemy from the current map to the adjacent map whenever an enemy moves past the room boundary.  Now enemies aren’t restricted to moving in only one map room.  Similar to the player, I had to add checks to ensure that an enemy doesn’t collide with blocks in the first column or last column of blocks in the right and left map rooms.

One interesting problem is that an enemy would get stuck in a block in an adjacent room whenever it was in the angry state from being shot with the wrong gun.  The problem was that the check for changing the room came before the check to change X velocity (direction) on a collision.  Moving the room boundary checking below the block collision call fixed the problem.

Encryption Project

 

This is a Java applet that I developed while at Georgia Tech for my Computer Security course.  The software encrypts text messages using various types of ciphers.  The user can select the encryption algorithm from the drop down list at the top and enter a text message in the box below.  When an encryption algorithm is selected, the options for that algorithm are displayed.  The bottom box displays the message after encryption, and the user can select to display the message in ASCII, hexadecimal, decimal, or binary.  On the right side, information related to the encryption process is displayed.

Visit the Encryption Project page to run the applet and display related documentation.  Credit goes to Chris Ingram for much of the project documentation.

 

The Java Runtime Environment must be installed and enabled in web browser to run the applet.

 

 

 

 

Eins

Play online

Match cards by either color or number. Some cards have special properites such as skipping the next player, forcing the next player to draw two cards, and  reversing direction of play.  Two to eight total players.  The number of players, game speed, card colors, and starting number of cards can be changed on the options screen.

 

Released