in reply to Re: Convenient Constructors - a Moo question
in thread Convenient Constructors - a Moo question

Thank you for your reply. I understand that when it comes to style, it's mostly about opinions. But this is exactly what I expect, especially, when they are backed by some reasoning. Using new() is indeed clear and obvious, but this clarity in calling the method is somewhat balanced by the obscurity of BUILDARGS - someone reading the code would have to be familiar with this built-in method, while the additional constructors are self explanatory when you look at their implementation. Of course, one might say that the BUILDARGS method could be explained by one simple line of commentary at the point of its implementation, while the fact, that Attack->heavy is a constructor, will be obscure every time it's called. Still, your opinion puts the odds in favor of the second approach.

And I don't care about more typing - when I said that the first method is shorter, I was trying to say that it looks clearer when it's read (due to the brevity of 'Attack->heavy'). It could be twice as long to type, if it meant that it would read like plain English. It was an unfortunate choice of words on my side, sorry.

As to your question, no, I'm not making an FF clone. The game design is already done, and it works moderately well on pen&paper. It's a dungeon crawler, without any RPG elements - there is no character development at all, and no background story about your character.

It's a series of monster encounters with turn based combat. You choose an attack, the enemy chooses a defense, there are some Games::Dice rolls, and the successful hits are applied. Then you switch sides and choose a defense, predicting the enemy's attack pattern. You have a few attack choices, and a few defense choices, and there is some rock-paper-scissors feel to the mechanics. Dodging works better against heavy attacks (with a chance to stun), parrying may result in a counter attack (but it's poor against heavy attacks).

There are no more than three Attack / Defense options available to you at a given time (there is more variety for the enemies), and only two d10 rolls are made each turn. If I can make it look nice and simple, I'll post it under CUfP, and maybe someone will add some flavour to it.

Some examples of the genre:

I would love to see a Perl implementation of the second one. If I did not have those attack/defense mechanics stuck in my head, this is where I would start - with a Tower Hack clone. Such simple design, so much fun.

- Luke

  • Comment on Re^2: Convenient Constructors - a Moo question