Verse - Approach to rules through Parsing Expression Grammar
General Discussion of the Intricacies
Moderator: CCGHQ Admins
Re: Approaching rules through NLP and grammars
by telengard » 11 Oct 2010, 00:10
Venom for my game (an ability in Dreamblade) is different than MtG, probably should have mentioned that. Just counters and a check for destruction at the end of every phase. Completely different. My point was just that it was a mechanic added after the initial release of the game, and I had to change the engine to support it but I did it in a mostly generic way that I could probably leverage for similar type abilities.silly freak wrote:Venom's ability has three big parts: It triggers on being blocked, creates a delayed triggered ability, and destroys a creature. At least the first and the last are so general that a good rules engine should support them.telengard wrote:You need hooks or a way to inject new rules (and effects etc) behavior somehow. I implemented the Venom abilities in such a way that it just dealt it out and all state about Venom was kept in a generic container that the engine provides. It also added a check for destruction at the appropriate time (via subscription). I could probably extend upon this to allow new rules behavior, but haven't had a need to for my game. Over time, all of my abilities have gone from very specific to very generic allowing for many permutations without having to change any c++ code.
~telengard
Having all three, you probably still need some code to tie it together, but not in the engine. Delayed triggered abilities are something to be implemented in the engine, not the actual Venom ability.
And that is what I was talking about: If you didn't have delayed triggered abilities, you can't implement Venom, but that's not a shortcoming of the engine's architecture but of is completeness. If you have a complete rules engine implementation, you should be able to implement any mechanic. With code, still, but without the need to recompile the core.
Would something like a Planeswalker have been possible pre-Planeswalker with the core rules up to that point?
I'm not sure exactly what a Planeswalker does.
I would think that adding a new mechanic could potentially create new rules, unless it is just a remash of existing rules. The more generic/flexible your engine, the better chance you have of accommodating new rules/mechanics without recompiling. Something like Incantus that is in python makes for a much more flexible framework for this sort of thing since it is dynamic (at the expense of performance).
~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
viewtopic.php?f=51&t=1215
-
telengard - DEVELOPER
- Posts: 379
- Joined: 23 May 2009, 23:04
- Has thanked: 2 times
- Been thanked: 27 times
Re: Approaching rules through NLP and grammars
by silly freak » 11 Oct 2010, 07:24
Here we have the same conclusion. I don't think planeswalker would be possible without changes to the engine, and a hack would hurt the engine in total. Creating planeswalkers in the engine is healthy, creating individual planeswalkers there is not.telengard wrote:Would something like a Planeswalker have been possible pre-Planeswalker with the core rules up to that point?
I'm not sure exactly what a Planeswalker does.
Same here; however, my personal opinion on dynamic languages is that you can easily maneuver you into a maintenance hell. Dynamic languages are no excuse for bad software design; it should support the good sort.telengard wrote:I would think that adding a new mechanic could potentially create new rules, unless it is just a remash of existing rules. The more generic/flexible your engine, the better chance you have of accommodating new rules/mechanics without recompiling. Something like Incantus that is in python makes for a much more flexible framework for this sort of thing since it is dynamic (at the expense of performance).
~telengard
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Approaching rules through NLP and grammars
by MageKing17 » 14 Oct 2010, 20:42
Don't I know it.silly freak wrote:my personal opinion on dynamic languages is that you can easily maneuver you into a maintenance hell.
This can never be emphasized enough.silly freak wrote:Dynamic languages are no excuse for bad software design; it should support the good sort.
-
MageKing17 - Programmer
- Posts: 473
- Joined: 12 Jun 2008, 20:40
- Has thanked: 5 times
- Been thanked: 9 times
Re: Approaching rules through NLP and grammars
by Incantus » 15 Oct 2010, 02:50
Hey, what are you saying...MageKing17 wrote:Don't I know it.silly freak wrote:my personal opinion on dynamic languages is that you can easily maneuver you into a maintenance hell.
Anyway, what you guys are describing is exactly what I tried to do with Incantus. Basically support the core rules in the most general way so that it is possible to implement current cards and also modify the rules implementation in the future when WotC comes up with new modifications. Working in python has definitely made this a lot easier.
Re: Approaching rules through NLP and grammars
by MageKing17 » 15 Oct 2010, 04:00
Especially with regard to custom cards, which is pretty awesome if I do say so myself.Incantus wrote:Hey, what are you saying...MageKing17 wrote:Don't I know it.silly freak wrote:my personal opinion on dynamic languages is that you can easily maneuver you into a maintenance hell.
Anyway, what you guys are describing is exactly what I tried to do with Incantus. Basically support the core rules in the most general way so that it is possible to implement current cards and also modify the rules implementation in the future when WotC comes up with new modifications. Working in python has definitely made this a lot easier.
Maybe I should make some free time for myself despite my schoolwork and just go on a coding spree in Incantus; try to add all the keywords, perhaps.
-
MageKing17 - Programmer
- Posts: 473
- Joined: 12 Jun 2008, 20:40
- Has thanked: 5 times
- Been thanked: 9 times
Re: Verse - Approach to rules through Parsing Expression Gra
by proud » 19 May 2013, 02:00
Alright, as I posted in the other forum page, cards have been put into JSON data, except no rules parsing exists yet.
Sets and rarity have been split, per request.
Sets and rarity have been split, per request.
aka ancestral, mproud
MTG.Design
MTG.Design
21 posts
• Page 2 of 2 • 1, 2
Return to Magic Rules Engine Programming
Who is online
Users browsing this forum: No registered users and 3 guests