• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Architectural Advice  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NOTICE: This post is for entertainment, relaxation purposes only. It's a post about how to design a new feature to a MUD.

This isn't a bug, nor am I asking for urgent help, just thought I'd ask some more experienced Java developers if this makes sense. I'll try to make this as logical as possible from a code architecture point of view, and try to avoid making conceptual assumptions that you might not be aware of.

I'm developing a MUD with a group of friends (we're using CoffeeMud). In this MUD are a wide variety of abilities - which all extend the StdAbility class which in turn implements the Ability interface.

public interface Ability...
public class StdAbility implements Ability...
public class Paladin_Defend extends StdAbility...

Now we want to add an additional property to each of these abilities so that they can fall within a "realm". Another example, all abilities that deal with stealth and stealing with go into the Subversion Realm. Magic spells go into either the Defensive Magic or the Offensive Magic realm. A realm is a general classification system for each ability.

Each realm will have multiple tiers - groups of abilities that get more powerful as the player progresses. Simply a more granular sub-classification system inside each realm.

Each ability will, therefore, be assigned to a skill Realm and a Tier within that Realm. It was suggested to simply add two properties to each ability class.

However, I thought of a more abstract solution. I created a new interface..

Then create a standard Realm class...

Then I could create all of my skill Realms...

Now that I have defined all of my Realms, and Tiers within the Realms, I could modify the abilities to have a realm() method that would return an instance of the Realm in which they exist...

For those of you who had the patience to read this far, just give me your thoughts on if this - to you - seems like a rational solution or am I taking it too far.

- Lars van der Aalst
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!