This week I was able to implement a solid framework for logging and automated testing.
When I was initially creating the automated logging framework, I immediately started finding bugs and balance issues. They ranged from minor visual errors, to game crashing bugs. So in some sense, implementing the testing framework itself was the first integration test Super Rock Paper Scissors went through.
Once all bugs got fixed, I put it to test by making simple AI play the game. Even with simple AI, the logs revelead the first plausible game balance change.
First Game Balance Change Discovered by Logging and AI
AI that focuses on upgrading Defense and/or using Defense-buff cards tend to lose more often than attack-centric AI.
Defense buffs never give you a winning edge over your opponent. Defense is only useful when you lose the round and you want to minimize your opponent’s earnings. Defense buffs are either too expensive or defense is a redundant attribute.
Solution To give defense attribue a purpose, I decided to make defense have an impact on picking the round winner.
When both players pick the same weapon, their weapon’s Attack and Defense attributes are summed up. Whichever player has the greatest sum win the round. Coins are calculated as
winner's sum - loser's sum + 1
Since defense is also cheaper to upgrade, this means it’s crucial to have high defense in Weapon X vs Weapon X rounds to both win the round and earn large amount of coins that you would not be able to win in any other X vs Y round.
So now defense has a role in deciding the round winner, as well as acting as a trump card to win a lot of coins in one round.
I am amazed that even in the early stages of creating AI and Logging tools to balance the game, the tools are already helping me find out glaring issues with the game design.
First Bug Discovered By Simple AI
When a card is used, its effect is active only for the next round.
When greedy attacker uses a card, its effect sometimes lasts for multiple rounds
Fixed the code where the child card class was wrongly calling its parent’s disable function.
Logger writes to 2 files:
A text file keeping track of events and actions vs time
A CSV file keeping track of reports generated at the end of a game consisting of over 50+ datapoints of information.
Example Text Log
Example CSV Data Log (1 Game, Transposed 90 Degrees)
|Datapoint Number||Datapoint Name||Value|
Example log files with 300 games of data
Unity Based Research
This week’s work required me do research on couple of the topics listed below:
The hour long hunt to find a 1-liner bug
The code below somehow does not load the menu scene and does not throw a warning or error
When the menu scene does not load, the game gets stuck in an infinite game loop.
Turns out the scene was not loading because I forgot to unsubsribe one of the subscriptions. The floating subscription started a chain of events which eventually stopped the scene from changing.
Github repo for Super Rock Paper Scissors: Click Here
Webbuild: Click Here
Current Project Code Structure Of Super Rock Paper Scissors
Weekly Time Spent on Project SeeSaw