Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puppet definition #1

Open
donbonifacio opened this issue Mar 30, 2015 · 7 comments
Open

Puppet definition #1

donbonifacio opened this issue Mar 30, 2015 · 7 comments
Labels

Comments

@donbonifacio
Copy link

The puppet is the base controllable element on the game and can be controlled by the player or the AI. A puppet has several slots and can be assembled in diverse ways. Enemies and bosses can also be built as puppets.

I believe that we should have a way to define puppets via data and transform the data to an element of the game.

Defining puppets

(puppet/create {:attributes [[:attack 10]
                              [:attack 10]
                              [:defense 10]
                              [:range 4]
                              [:speed 2]]
                 :attack-handlers [[:direct-attack]
                                   [:bomb]
                                   [:mind-control]]
                 :defense-handlers [[:strikeback]
                                    [:paralyse]
                                    [:poison]]})

Some issues:

  • Should we allow repetition? Like 2 slots of [:attack 10] ou just [:attack 20]

We can have a create function that translates this raw representation to a hash with concrete information and functions. We can have a "puppet slot factory" that given those arrays will return something runable.

We can also have valid? and to-string functions.

Available slot types

From my experience with obb, we need to consider right now the possible actions. For example:

  • Player selects puppet and selects empty space -> run move handlers
  • Player selects puppet and selects enemy -> run attack handlers
  • Player selects puppet and selects frienldy puppet -> run defense handlers

We can also have aura slots, that are effects that are always on (like +10 attack to all members, etc).

This is pretty simple and we can build almost anything. But we can't for example build a summoner. It had to be a move handler but if the puppet summons then how does it move? Can you think of an easy way to do this? I'd like to avoid choices per action type, because that makes the UI harder.

This is versatile and doesn't prevent the player from assembling a puppet that as heal and damage as attack-handlers. It also doesn't prevent friendly fire.

@jqmtor
Copy link

jqmtor commented Apr 3, 2015

I like most of your suggestions but I have some questions:

  • I didn't quite understand what you are trying to say with the sentence "We can have a "puppet slot factory" that given those arrays will return something runable.". Also, can you give a concrete example of the result of create function?
  • I see that you make extensive use of arrays to represent bits of data like the different attributes. Is there a reason why you do this? I don't have a perfect alternative in this case but wouldn't it better to use a one-key map ({:attack 10}). Maybe I am too focused on this but I tend to dislike vector indexing to get semantically different information.
  • Regarding the handler, the example you provided presents multiple attack and defense handlers, but if you really want to avoid decision making to simplify the UI, wouldn't it be necessary that there is only one handler of each type?
  • The only way I see we can implement something like summoning while avoiding decision making is to restrict the puppet. For example, to summon things the puppet cannot move, or moves only before ou after the attack. This way we know for sure what to do. I think the second option is better and if we get it right we can make it strategically interesting, since the players will have to play around the restriction.
  • As a general comment, I like the flexibility and composability of the model, by allowing the player of making puppets with all kinds of powers. On the other hand, I think this flexibility can also be difficult to manage. If the player is allowed to compose the puppets in every way possible, I think it will be easier to find perfect formulas. For example, in Dungeons & Dragons, where the combat is very strategic, one of the things that I think works great, is that you cannot have all kinds of strengths. Mages have little health and cannot wear heavy armor. If an enemy engages them, you will be in trouble. Strikers that are some sort of damage dealer, have a lot of movement but they are required to make very good use of it, since they also have not a lot of health (they are designed to adopt hit-and-run strategies). In sum, a well-balanced party is almost mandatory, since not having some role means you will fall short in an important aspect of combat.
    This simplicity might be exactly what we want, or maybe adding complexity to building characters will simplify the AI, making the strengths and weaknesses of the player more evident. Mind that I am not defending any point of view. I am just leaving some thoughts for the sake of discussion.
  • I think the previous comment will also be easier to discuss when we define concepts like health and cost of the elements that compose the puppets.

@donbonifacio donbonifacio added this to the Macro definition milestone Apr 4, 2015
@donbonifacio
Copy link
Author

It's very clojure idiomatic to use vectors. The language has great support for these types and we get used to it. No need to use indexes. It was also hard to me to view vectors this way. :)

This is still very raw on my head, I think we need something more concrete.

  • We want a DSL/data language to define puppets
  • A puppet will have several parts (this can just be a parts container)
  • After loading the parts, we return a puppet with defined health, damage, defense, special attacks and powers (this can be attributes)

Something like

(puppet/create "donbonifacio's minion" [[:base-puppet]
                          [:attack-hammer]
                          [:light-armor]
                          [:catapult-attack]
                          [:poison]])

Given this, we would iterate on the parts, and reduce them to a map. Something like:

  • Create an empty map that defines the puppet
  • Ask to the part-factory for a handler for the parts (one for :base-puppet, other for :attack-hammer, and so on)
  • For each handler, call setup with the puppet's map. They'll initi if needed. For example, :base-puppet part might add health, and :attack-hammer might add damage. :poison might add an after-attack handler that injects poison on the target

After create we might have something like:

{:name "donbonifacio's minion"
 :max-health 20
 :curr-health 20
 :damage 40
 :after-attack [func1, func2]
 :after-hit [fun1, func2]}

Later on, the engine will consume all this info to make things happen.

What do you think?

@donbonifacio
Copy link
Author

I didn't consider the validations/restrictions, but I also think we need that. Better something discrete, but we'll have to add cost or something. We can consider that for a given arena the total squad's budget is X. Then if each part as a cost it will be for the plyer to decide how to manage the cost.

@jqmtor
Copy link

jqmtor commented Apr 6, 2015

OK, I just need to clarify some things. Now I see that I didn't get some things quite right.
In retrospective, I think we should've splitted this discussion in two. Before defining the puppet, I think we should've clarified some concepts.

  • What is the set of attributes for a puppet? At this point we have attack, max-health, curr-health, attack (or damage), defense, name and some hooks (after-attack, after-hit, ...)
  • What defines a part? In my current understanding, a part will add up to any of the puppet's attributes and/or add any effects to the existing hooks. Is this right? So, using your example, let's say that the hammer-attack adds +10 attack and the catapult-attack adds +20 attack. Is this what you are thinking about?
  • Do you have an idea on how attack vs defense should work?

I liked your suggestion and if I got things right, I think we're near a solution.

@donbonifacio
Copy link
Author

That's it. There are parts like the catapult that may add to the attack (or not), but add special powers. Catapult means that you can hit an opponent if another element is in front of him. It's a special hability.

Another attributes for the puppet might be speed, range,...

No, I have no idea atm about attack/defense.

Maybe we should define a set of runes, and start from there.

@jqmtor
Copy link

jqmtor commented Apr 7, 2015

I am now writing the rune definition RFC and something occurred to me... Will puppets with no runes have a set of minimal stats? Or the player must associate at least one rune in order to be able to use the puppet? My first feeling tells me that it would be good if the player could not use unequipped puppets, forcing him to balance the power between the puppets, and also to making the big tradeoff of having less units on the arena. Also, will puppets have a maximum limit of runes associated with them? I think the limit would be a good thing but maybe we will only be able to figure it out after defining the runes.

@donbonifacio
Copy link
Author

Yes, I think that we can add limits at anytime. The system should be extensible and easy to include limits. We should consider that. I think that those things will be better ajdjusted when we get to play-test the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants