• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

D20 Engine - DESIGN (forget code)

acon360

First Post
Lets forget about building this killer app, and think about designing instead. The problems of building a good all-in-one D20 app have been reiterated time and again. So what...

What I want to do in spite of this is come up with a DESIGN for such an engine/app. I am NOT a pro coder (although I would like to be one day; if you can help, I'd appreciate it). So lets start by coming up with a class hierarchy.

Attached is a jpg of my first, quick & dirty, attempt at drawing up a class diagram for a D20 Engine. It is not complete, and I'm focusing on creating the requisite data objects first. Eventually, I/we can move onto the rules logic and, lastly the GUI (months down the road).

I would really appreciate the feedback of some pros and users so that 1) I can learn, and 2) so that, one day, a good open source engine might actaully become a reality.
 

Attachments

  • Main.jpg
    Main.jpg
    143.3 KB · Views: 176
Last edited:

log in or register to remove this ad


D20 Engine Reply

The diagram is too non-specific and is over-simplified. I have a good working database and interface design for just handling charaters and the table relationships just for that are far more complex. And I am a professional programmer. The real trouble isn't the design. The trouble is the sheer number of obsticles to sharing such a beast with the world. Imagine the time involved, the very certain lack of profitability compenserate with that time and last but not least the legal trouble. I doubt anyone just wants the SRD material. I know I don't. I'd really love to have people testing and making suggestions but that's not practical or legal either. I once had a dream of being the RPGWare guy but I gave that up a long time ago due to a complete lack of feasibility in the real world. So I built myself a tool and just use for my games.
 

KnightSavant,

I know that it is overly simplistic; its not complete in the least. I intended to have this design process take months in itself. This is but a minuscule starting point.

Perhaps you could share your design (if not your code). Maybe even a few suggestions other than the fact that it is too difficult. I would like to learn how a "professional" would tackle the design. Its not only about creating the program, but also about learning.

You know, in the time it took you to type that post, you could have just pointed out something useful, but no....nothing useful at all. Good job buddy. You reply smacks of self-righteousness and indignation, whether you intended it or not. Why do you even bother to post? Do you like to point out flaws without aiding one in fixing them? I've never taken a programming class in my life. Why can't you help a fellow out? Worthlessness, sheer worthlessness.

Dude, I went to your website and read around a bit. Sounds like you live in mom's basement. How in the hell are you going to advertise yourself as a web designer and have a site that looks like that. No, really...
 
Last edited:

I think it's a good start, but in effect there will be more classes than you can show comfortably in such a diagram so your selection so far is fine for a base diagram.
My current design looks something like this:
Classes (Objects in my program) for Character handling:
Creature - subclasses: monster, character, construct
Item - goods, weapon, armor, shield, scroll etc.
Class - perhaps RaceClasses as subclass but in effect you can handle this just in class
Race
Template
Magic - spell, psionics etc.
God
Domain
Feat
Skill
Feature
Effect (lowest level of single interactions with other objects or variables)
Prerequisite

I think that the big problem that most programs have are the "hardcoded" classes in whatever programming language.
My program is fully driven by scripted code (even the gui) so it can be expanded and customized by anyone who has some coding ability (code is just simple xml). In fact my vision and plans are that I create a character manager with it then a party manager just as an expansion. By having all things interoperate you can go on for other things: house generator, city generator, world generator etc.

Greetings
Firzair
 

Firzair,

Thanks for the insight. I do well know the concern about things being hardcoded. My answer to this was that to make the entire environment extensible to (almost) anyone would incur a greater overhead than was really worth it (imo). So I forwent extensibility under the notion that if the final product was open source, then competent coders could extend the environment by instantiating their versions inheriting from old.

I do agree that allowing the end user to extend it himself would be better. However, I argue that under an open source model, the overhead costs more than it is worth.

Also, yes, there will be many more classes than what is in my diagram. I think PCGen has over a thousand different classes. I also did not like the way PCGen has built its classes.

Again, my main goal, as an amateur coder, is to simply figure out how to design such a system. This is why I am soliciting the feedback of other coders. I know that pic I threw up is woefully inadequate. In other words, I am asking for direction from those more experienced than me.

Thanks again,
 

acon360 said:
You know, in the time it took you to type that post, you could have just pointed out something useful, but no....nothing useful at all. Good job buddy. You reply smacks of self-righteousness and indignation, whether you intended it or not. Why do you even bother to post? Do you like to point out flaws without aiding one in fixing them? I've never taken a programming class in my life. Why can't you help a fellow out? Worthlessness, sheer worthlessness.

Dude, I went to your website and read around a bit. Sounds like you live in mom's basement. How in the hell are you going to advertise yourself as a web designer and have a site that looks like that. No, really...

Insulting people like this is not permitted on ENworld. Disagree politely by all means, request positive contributions politely and report comments that you think are bad to the moderators and we will do the rest.

Please don't do it again, we would hate to see an interesting thread closed or someone temp-banned, but those things can and do happen if we see any persistent rudeness.


Regards
 

On topic, I'm not sure that I understand the class diagram which you've provided. Are your arrows showing inheritance or association?

If I were to design an object model for a d20 engine, I'd first start with my analysis of what I wanted (I'm not sure whether we are talking about a character/monster generator like e-tools or a more complete generator and campaign management thing like DMGenie at the moment - I presume that that discussion was held in another thread?)

So for the purposes of this post I'll make the assumption that we want something that will handle character and creature generation and combat management. I'd normally put a lot more analysis into this, but we're just doing back of an envelope stuff at the moment.

Then I might start thinking about a class hierarchy. What are my base classes going to be, and then what specialised variations do I want to create. Are there any good candidates for being an abstract class (i.e. one that isn't instantiated, but is used to carry common inheritable behaviours or properties).

As an example, I might have creature as one of my base classes. All creatures have abilities, saves, a collection of feats, a collection of skills, a collection of special abilities yada yada yada. I probably wouldn't bother making subclasses such as PC, monster, npc... that would be handled at a higher level by an object such as 'encounter group', which is a collection of creatures (in use, one encounter group would be called 'PCs', another encounter group would be called 'Room 12' or whatever). There might also be a class called 'character class levels', reference classes which enable me to add 1 or more class levels to any creature, and which supports extensibility for new classes.

Do some of these comments help, or move in the direction you are hoping to go in?
 

acon360 said:
Firzair,

Thanks for the insight. I do well know the concern about things being hardcoded. My answer to this was that to make the entire environment extensible to (almost) anyone would incur a greater overhead than was really worth it (imo). So I forwent extensibility under the notion that if the final product was open source, then competent coders could extend the environment by instantiating their versions inheriting from old.

I do agree that allowing the end user to extend it himself would be better. However, I argue that under an open source model, the overhead costs more than it is worth.

Also, yes, there will be many more classes than what is in my diagram. I think PCGen has over a thousand different classes. I also did not like the way PCGen has built its classes.

Again, my main goal, as an amateur coder, is to simply figure out how to design such a system. This is why I am soliciting the feedback of other coders. I know that pic I threw up is woefully inadequate. In other words, I am asking for direction from those more experienced than me.

Thanks again,
Well one possible framework for this is already available as freeware from my site. I've just released the version 0.9.5, you can find it in downloads.

Perhaps you find it useful.

Greetings
Firzair
 

Hi acon360,

currently I am working on a D20-Engine myself, which could be ready to release in a couple of months as I hope. So, I am actually involved into this topic ;)

First of all, USE NAMESPACES (or packages, if you are using Java)!!! This ensures a certain amount of modularity, which is always positive, if you for example want to exchange the Graphics Engine one day or the database or whatever.

Your design for the 'Data'class with its hierarchy is pretty good, but I might give you a hint: Do not ONLY harcode this! Use it also as a database model (you could have tables called "Feats", "Spells", "Classes" and so on. Then write an access class for this database and make sure, that there is a Factory Class like "DataManager" etc., that performs the conversion of database data to game data, which means, "DatabaseManager" could have methods like "getArmor(String name)" etc. Following this path, you won't need to change any line of code for issues of changed data, like a new class, an obsolete item, etc.

As a last hint, I would not try to program everything at once. Start with the character generation process for example. Try to develop a program, which can create you characters of all races, classes you want (start with basic abilities and racial modifiers, then expand to saving throws, skills, feats, ...). When you finished this task, the next step could be inventory management, multiclass rules, etc. (At least this is the way, how I began ;) )

I hope this helps you a bit out.

Greetings
 

Into the Woods

Remove ads

Top