Developing a game with complex (and undefined) rules?

How would you develop a game that can end with complex rules, but you need to work hard on the rules (add, configure, balance)? I looked at rule-based languages, but I did not find enough useful information about this.

UI etc. will be developed later, first I will need to iteratively develop the rules and formulas and check them between iterations. The game in question will be a tactical dual-player game in which players select “troops” and most of the game selects the correct troop setting. So the rules may be something like

If attacker skill A is greater than defenders skill B and defender does not have extra skill Z then ...

This is obviously a very simple rule, I expect there will be dozens, if not hundreds of rules, with paths (if A then if B ....).

For testing, I would write a test structure that can run rule sets with a lot of iterations and logging, which allows me to see how recent changes have affected the balance. It would also be useful to identify acceptable values ​​and the ability to easily see changes. What tools exist for this?

The choice language is Python or Java (depending on whether I want to target Android or not, maybe I will).

+3
source share
4 answers

larsmans, Prolog . , , . , , tuProlog , , Java. TuProlog Prolog ( Java .NET) , , Prolog , .

-:

tuProlog - Prolog , ( Prolog), ( ) / . tuProlog , , Prolog - , Java, tuProlog Java .NET- (#, F #..), tuProlog.NET. , Java/CLR . .

+2

, , Prolog. , backtracking.

Prolog Java, Jekejeke. .

Python Java yield.

+3

, . , ;)

, , . , , , , , - DSL .

Try writing a grammar that is sufficient to describe your rules, and then see how to connect it to the game. ANTLR can be very useful, especially because it supports both Java and Python.

+1
source

try AIFEAR . there FSM (state machine) was combined with A * pathfinding. instead of finding a path in the terrain, the engine found a chain of targets to implement “intelligent” agent behavior on the fly. perhaps there is something inspiring for you.

0
source

All Articles