My framework is geared towards complex board/card games (although I have implemented 2 abstract type games too).
The output of my framework is literally a list of all the options the player can take. The input is then the choice out of those options. The engine generates all legal moves based on the current game state and user choice. That’s the super duper simple way it works. It does support network play, replay files, and all kinds of other stuff, but at its core that’s all it is. It generates what is legal, and the human player chooses an action. The AI does the same, but those choices can go through different algorithms, like minmax w/ ab pruning, monte carlo, etc. This is all internal to the framework.
The only interactions outside of the program is getting human player input, and sending game state for updating any UI present.
When I add a UI on top, there’s a very small interface for sending the actions and game state (for viewing the board, etc) and getting the user’s input. In some games the UI I have allows for interacting with the board w/ a mouse, etc. For example, if a human player moves a piece on the board, I can check that move against the list of actions available and choose it. In some cases, that isn’t possible so the list of actions is also presented (actually it is always presented, but can be bypassed by interacting with the board in these cases).
My age of steam implementation has a very spartan UI. Just shows the actions taken, current actions for the human player and a few key pieces of game state for the player. To view track, goods table, etc function keys bring up those.
My dreamblade implementation (think Magic the Gathering meets chess) has a much more elaborate UI in addition to a text based on. This is the text based interface:
console Dreamblade
This one is written in wxWidgets, and where if you drag a piece it will select the appropriate action. The actions aren’t shown in this picture, but they would be right under the “game has ended” text. The above part is the information statements that are also present in the Age of Steam pic above.
wxWidgets Dreamblade
This particular interface is quite clean and has worked for the many games I have implemented.
So, for my needs, I’d like to see a way to communicate with another program (or somehow link it in) from VASSAL to get the game state and actions and then to send back an action chosen. A way to utilize the game state within VASSAL to update the board, and other parts of the game would be needed as well.
Does this make sense? I’ve never had to explain how my stuff works.