• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Architectural Advice

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

Example(s):
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
 
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic