Waves² Alpha 4 Preview and Card Game AI

The “Unstable” branch is no more! Long Live the “Preview” branch!

Since Unstable was originally created for testing the Shipping build of the game (which is now the standard version everybody uses) it has been removed and replaced with a new branch called “Preview” which is going to be used to test upcoming major updates.

Anybody can use the Preview branch and there is no password required. Just be aware that things are far more likely to not work correctly/be balanced/be fun in this version.

To kick everything off the Preview branch has been updated with the first Alpha 4 Preview build.

After many weeks of work the Card Game AI system and Modular game modes tech is in place. From the point of view of the players you won’t see any obvious differences. What you do as a player hasn’t changed AT ALL. The main difference is in how content is authored and how enemies are spawned which I will go over below.

Modular Game Modes

In theory this should be completely invisible but there may be some new bugs so keep an eye out and report anything you see misbehaving on the forums.

This tech allows me to create Game Modes from a selection of Modules (Mods for short) that encapsulate small nuggets of game mechanics; for example the Multiplier Triggers that spawn every time you Level Up is a Game Mod, as is the number of lives you get or if there is a timer.

This was required to achieve the procedurally generated missions in the GRID rework which is coming in Alpha 4. Right now all of the Arcade game modes have been converted over to this system and should all be working exactly the same as before.

Enemy Spawning & Card Game AI

Enemy spawning used to work by having a series of “Behaviors” in a list that defined certain spawning patterns. Every Spawning Tick the system would go through the list in order and execute the first behavior that was allowed to run (various things like player level, player performance, game time and when the behavior was last run went into that decision). This resulted in relatively predictable patterns of behavior that could be relied upon. It was also a PITA to edit and almost impossible to procedurally generate.

If you follow me on Twitter or have been reading the Alpha 4 thread you will have heard me talking about “Card Game AI”. This is the secret to all of the new procedurally generateed content in alpha 4 – in fact I’d argue that where procedurally generated blindly follows an algorthm this system is responsive to what the player is doing and makes decisions so it’s more “Inteligent” generation.

The short version is that there is an AI controlling what enemies spawn and how they spawn and this AI is effectively playing a card game. Every game mode gets 2 Decks; Enemies and Tactics, which have been created by a Designer or later on another AI playing another different Card Game.

During a game the AI will draw cards from each deck, create a hand and play cards from that hand using Mana which is generated by the players performance – play well and the AI gets more Mana to spend, play poorly and it gets less. The AI scores all of it’s cards based on cost, card synergies (certain enemies go better with certain tactics) and personal preference (which can be affected by things like how often a certain enemy type kills you). It then plays those cards and the system executes the Spawning logic they represent using the Enemies they define.

This took ALOT of tweaking to get working right. Making the actual AI to play a card game was relatively easy compared to designing a card game that would exhibit the kind of behaviours I wanted. Since this was all going to be re-used to generate GRID missions and I plan to make use of it in future porjects as well it was worth the investment.

The result is that spawning patterns are less predictable in terms of frequency (due to the random nature of card game draw) but more responsive to player performance (due to the Mana mechanics being used). If you are doing really well the AI will use harder enemies and more dangerous tactics far more frequently than if you are doing badly.

The added benefit is that there is more variety in the spawning than before with some enemies spawning in ways they never used to and the modular nature of deck lists makes it far quicker for me to add enemies and spawn patterns to the game later.

Testing

The focus for testing this Preview build is on difficulty. As the spawning has changed pretty dramatically I need feedback on how it has affected difficulty. I suspect it’s gotten a bit harder at the start of a game and isn’t scaling up high enough in the late game but that hypothesis still needs more testing and data which is where you come in.

Don’t just play the Preview branch but alternate between the release and preview branches if you can. Try and make comparisons and report your findings on the forums. As I said earlier NOTHING else has changed in the game except for theese two things and one of those should be completely invisible except for genuine bugs.

I look forwards to seeing your feedback.

Rob

Leave a Reply

Your email address will not be published. Required fields are marked *