Text RPG rul3z teh big one one one

posted in Computer food
Published March 07, 2006
Advertisement
So far, I've worked about 5/6 hours on the project. The classes I've added today are the following:

  • ActionTest: this abstract class is used to test if a a particular creature successfully act or not. Here, we make use of the strategy pattern: the algorithm to know wether an action is successful or not is defined by the concrete action. I'va added these needed action tests:

    • ActionTestSkill will make a skill roll
    • ActionTestBody will roll an aptitude (body1)
    • ActionTestMind will roll an aptitude (mind1)

  • InventoryObjectEquipable: all the equipable objects of the inventory inherits from this base class. It inherits from InventoryObject and is still an abstract class. By the way, I also defined some other inventory object classes:

    • InventoryObjectMoney which inherit InventoryObject holds a money count.
    • InventoryObjectWeapon: you guessed it
    • InventoryObjectArmor: you guessed it too (you are rather clever [smile])

    I still need to define some other inventory object types, but these are the most important for the combat system.
  • OppositionTest I've done the action test, and I also did the oppossition test management - where two creatures confront eeach other. Again, the class is abstract - the plan is to apply the strategy pattern here. So far, I've done some useful derived classes:

    • OppositionTestSkill: do you want to bargain with an NPC merchant?
    • OppositeTestBody: arm wresting anyone?
    • OppositeTestMind: will you resists to the fear aura of this powerfull living dead?
    • last (currently made) but not least: OppositeTestFight: this one is the base of the fighting system. It does special rolls, modified by the creatures equiped armor and weapons. The combat is mainly resolved using this specilized opposite test.


Speaking of the combat, it may be time to do it now, what do you think?

As for now, the fighting system is pretty evolved. Considering the amount of work I have to do, I wonder if I'm going to be able to get it right the first time.
  1. create the fighting creature list. The player can have allies, and he may fight more than one creature at a time.
  2. sort the creature list (this is an optionnal step, but it can be funny to do some kind of initiative check before the fight)
  3. begin the fight round
    1. for each creature which is not the player
      1. choose action (based on the inventory and on the creature behavior
      2. if action == fight, choose an opponent
      3. resolve action
    2. for the player, we have to ask what he wants to do and process his action too
    3. if any creature is dead, remove it from the fighters lists - if the killer is the player, he wins some experience points
    4. repeat until the player or all its ennemies are dead

As you can see, there are some hard parts to implement: how the AI controlled creatures will choose what they want to do or their opponent, how to do the action resolution (if it is a fight, nothing to say; but what about launching a spell, drinking a healing potion or equiping another weapon?)

When I began to think about this project, I thought about implementing a very simple game system (without skills, without those pesky action and opposition tests, and most notably with a very limited fight system - 1 vs 1). I must admit that it was pretty poor, so I've decided to make a correct oen (not very complex but still: it might offer some great gameplay opportunities). Because of this, I decided to cut the most complex feature; the user undo - it is really complex (saving the whole game state?!?!) and doesn't bring anything to the game.

As you can see, I made some cool progress, but I have to handle one of the the hardest part right now. Of course, there is another one comming: the magic system.

I guess I'll have some good time (and comments are welcome, as allways) [smile]


1: hu hu hu. You want to know the games rules, don't you ? [smile]
Previous Entry Again, a small update
Next Entry I continue...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement