• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Cracking down on that AI

  • Marrend
  • 01/20/2020 11:42 PM
  • 1873 views
Finally got around to cracking down on programming the AI. I'm not 100% sure what exactly will happen if the AI plays a card that requires discarding, or a card that prompts to "play again". I also don't quite know how to switch the context of the Action button from "Select/use this card in the human player's hand" to "Cease display of the AI card, and continue with the game".

For what it is worth, I have seemed to manage to have the AI's card displayed on-screen for a half-minute before play continues. Saying that, I don't feel particularly confident about this game. I feel testers could help me weed out some bugs. Though, I know I've had a bad tendency in the past to act on my own before people can even respond to such requests.

Be that as it may, I'll be uploading a demo sometime in the next few days. I'll try recruiting said testers on the Discord channel, but, failing that, I may refer to this thread and quite possibly still fail.

Posts

Pages: 1
Marrend
Guardian of the Description Thread
21781
It took some doing. However, it does seem like the AI player's turn is now flowing as it should, and is correctly applying card effects they way I intended.

There may still be bugs in here, but, my main concern was how Prism and Elven Scout would play out for the AI. It's a good thing I was concerned about it too, as I found that the functionality of the "discard" effect on the AI's end wasn't returning a card to discard!

So. Download's been updated. There's now a method in-game to set the starting values of the tower and the resource generators for custom-tuned games. The initial resources/tower will determine the game's victory conditions (stored in game-variables), which you can check/verify before playing.

I put in a conditional branch if players input "0" for to assure a bare minimum. These values are 5 for tower and 1 for generators. It is absolutely possible to have a starting tower of less than 5, but, I would personally suggest 10 as the minimum.


It now occurs to me that I never updated the packed-in help file. It still states that a Tower Victories would be at least 100. This is no longer the case. I'll change it on this end, but, I'm not terribly inclined to make an update unless something more major comes up.
Marrend
Guardian of the Description Thread
21781
I've been digging around a bit on how to make the game pause until player input when the AI is taking it's turn. With some success! If the AI is only playing one card, it's works beautifully. If the AI is playing multiple cards, the game fails to respond to the intended button input to continue the game. For what it's worth, the quitting/scooping/conceding functionality seems to work. Also, allowing the player discard when it's the AI turn was possible. I think I squashed that bug, but, I don't think I've actually tried it again since the attempt to fix it.

I'll try looking into all this later. For now, I'm just plain tired. ;_;
Marrend
Guardian of the Description Thread
21781
Aaaaaaaand, the demo is up! The packed-in help file is the same stuff that you'd find here. It would be interesting to see if that information is sufficient for people unfamiliar with the game to play it assuming they read it in the first place.

For what it's worth, I think I noticed the AI resources going negative (which it really, really shouldn't), and the window that show what cards have been played on the AI's turn when it plays multiple cards doesn't stay around very long. Aside from that, I... think it works? That's why I want some more eyes on this!
Pages: 1