Archive for April, 2010

Comparable Max Function

Developer's Cave No Comments »

Here’s a helpful method for returning the maximum of two Comparable objects.

Do the Java APIs provide this somewhere?

/**
 * Return the <i>maximum</i> of the two arguments. If the arguments 
 * are <i>equal</i> (as defined by the Comparable contract), the
 * <i>left-hand-side</i> argument is returned.
 */
public static <T extends Comparable> T max(T lhs, T rhs)
{
    return rhs.compareTo(lhs) > 0 ? rhs : lhs;
}

Network Improvement

Potential RPG No Comments »

Although my overarching guideline during this phase of development is to focus on gameplay and features, I decided it was necessary to revamp the network layer of the client-server platform. This was primarily a consolidation and cleanup effort, motivated by nagging session management issues, resulting from overly-complex code.

I have not yet seen the SLOC drop, but I’m expecting it to be significant.

The end result is a cleaner, simpler, more robust network layer. As a happy side effect, the streamlined threading model and byte management should theoretically improve overall efficiency. Alas, having not yet performed any detailed measurements on the previous network code, I will not know how much better the new routines are.

Although technically significant, Playtesters shouldn’t notice a thing (except for not being locked out of the server due to broken session logic). Then again, I could have introduced a whole host of new issues… Have at it!

Update: The SLOC drop is in. Roughly a couple thousand lines of code less, and all the better for it.

“Fortune favors the bold.” -Terence

BetaAlpha Graphical Improvements

Potential RPG 1 Comment »

Development has been steady (furious, actually). The latest updates have focused on graphical improvements. Avatars, creatures, terrain, and scenery elements have all been visually improved. Most of the terrain elements have been replaced with improved tiles. All creatures have been replaced and are now fully animated.

In addition, new capabilities have been added to the world rendering and avatar animation drivers. A new edge masking technique allows terrain tile interfaces to be dynamically rendered. Creatures now support a full death animation sequence.

A few significant bugs have also been fixed, and Playtesters will find it faster to progress (bigger rewards).

By they way, FaceBook fans of Potential Games have already seen a recent screenshot (albeit rather tiny). Also consider following Potential Games on Twitter for quick progress and status updates.