Archive for the tag: programming

100k SLOC

Developer's Cave, Potential RPG No Comments »

This morning, I noticed that my SLOC (Source Lines of Code) chart (in the sidebar of this blog) has breached the 100k mark (100,297sloc to be exact). That count is due to drop with the pending removal of some unused tools, defunct data structures, and legacy logic. Still, I thought it might be interesting to do a quick breakdown of the basic components:

Potential Games RPG SLOC Breakdown

The categories are:

  • core: Networking, storage, and application framework libraries
  • gui: Graphical User Interface implementation libraries
  • client: RPG Client application (67% of which is client-specific GUI code)
  • tools: Development helper applications
  • server: RPG Server application
  • other: Data structures, rules logic, and other game-supporting code

Why is LinkedList.clear() linear?

Developer's Cave 4 Comments »

I was just perusing the Java source code (because I don’t read the morning newspaper), when I discovered that java.util.LinkedList.clear() is implemented to operate in linear time. The documentation does not specify its order of growth, and I intuitively assumed that a linked list clear implementation would be a constant time operation.

Could this be an artifact of early Java development, leaving a legacy of poor performance? The remainder of this article explores the potential to significantly improve application performance when using the LinkedList.clear() operation. Read the rest of this entry »

The Case of the BlockingDeque Misstep

Developer's Cave, Potential RPG No Comments »

First: Unless you’re a Java developer who enjoys weekend threading and locking studies, don’t read this, unless you want your brain to melt. I’m primarily writing this for my own sake (because I am a Java concurrency junkie).

Second: There is nothing wrong with LinkedBlockingDeque. It follows all the proper behavior of a concurrent collections class (of which I’m a big fan). The situation documented here boils down to a classic concurrency scenario I simply didn’t take into account.

The Exploit: The impact to my MMORPG was that a player could force his/her character to translocate over stretches of non-navigable terrain, such as bodies of water. This would constitute a major exploit. To add to the mystery, it only happened on my development platform, not on the alpha testing network (even over the same LAN). Read the rest of this entry »

Keyed Access Pattern

Developer's Cave 2 Comments »

In a previous article, I described a Concealed Controller Pattern, which allows Java classes to be packaged separately, while maintaining access control to certain sensitive methods. In today’s article, I discuss the shortcomings of Java’s package capabilities and present a simple pattern (the Keyed Access Pattern) for overcoming one case.

Read the rest of this entry »

Happy No-Longer-So-New Year

Potential RPG No Comments »

I just stopped coding for a moment and realized we were a month into 2009. I thought I’d better let everyone know that I’m still hard at work developing the brand-new old-school (so-far, so-called) Potential RPG.

At the close of 2008, I evaluated and distilled my game design goals. My recent focus has been to solidify and enhance the core capabilities of my (so-far, so-called) Potential Platform, in support of these desired gameplay features. For example, a new map management capability allows maps to be either persistent (such as mainland continents) or instances (such as caves to clear).

I’m looking forward to (the rest of) 2009 and plan to have something fun to offer soon…

Ripple Effect Subsides, Massive SLOC Drop

Developer's Cave, Potential RPG No Comments »

In software development, less is more. Clean, lean code is easier to debug and maintain. Designing the simplest solution is the trick. Whenever I design a software component, I tend to over-engineer it the first time through. This produces a solid, well-designed, hand-crafted unit of code, which is usually terribly complicated for its intended purpose. It’ll work well, but trying to explain it to someone else would be difficult. Some call that job security, but I’d prefer to find a more elegant design.

Read the rest of this entry »

Ripple Effect

Developer's Cave, Potential RPG No Comments »

It has been some time since my last post, but I have been far from idle. There have been no new (Alpha) releases lately, either. Despite seasonal distractions, all of my efforts have been focused on a renovation of the core content system. The software design is significantly better; but what does that mean to you, the player? Absolutely nothing! The next release should play exactly the same as the last one, albeit with a sleek new content model.

Read the rest of this entry »

Java Logging Abandoned

Developer's Cave, Potential RPG 8 Comments »

This article provides a use case that chronicles my experience with the Java Logging API, as used for my MMORPG platform. Software developers can take this article as a cautionary tale against code reuse zealotry. It is often advantageous to follow your own software design goals rather than force your design around an existing system.

Read the rest of this entry »

Java 6 Update 10: No Longer Just for Developers

Developer's Cave, Potential RPG No Comments »

Sun has released Java 6 Update 10, with the primary goal of improving end-user experience. Java is a wonderful programming language and runtime platform for developing many types of applications. Unfortunately, running a Java application can be a stumbling block for end users, which, in my opinion, has been holding Java back from reaching its full potential. This update promises many welcome improvements to the platform.

Attention Alpha Playtesters: I’ll be testing the new Java version soon, with the goal of officially updating the game’s base Java requirements to this version. Playtesters are encouraged to try the new update and report any issues/improvements.

In the rest of this article, I give my two cents on Sun’s approach to Java thus far, and examine a couple improvements I’ve been eagerly anticipating.

Read the rest of this entry »

MMORPG Security: Secret Chat Exploits

Developer's Cave 6 Comments »

Forgive the somewhat sensationalized title. This article does not describe any actual attacks on MMORPG chat systems (e.g., no World of Warcraft exploits). Nonetheless, there is good reason to believe that undisclosed chat exploits exist. This article explores the potential for exploiting MMORPG chat engines, based on related security vulnerabilities that are known to exist, which occur due to common software development practices. Anyone with experience in this matter is encouraged to comment, as there is a lack of community discussion on this subject.

Read the rest of this entry »