Development Update - Feb 2020

Dear TCG ONE Players,

I wanted to share some progress regarding the internals of the project if you are curious.

Contrib repo upgrade

I refactored the way contrib repository is compiled, it is now a direct source root in the development pipeline, thus have far higher priority than before. I also moved some important classes such as Collection and CardType which lets developers to add and test new expansions without any intervention at all.

Between Turns refactoring

I introduced a new BEGIN_TURN step to the engine so that the effects that should happen “during between turns” will actually happen so. The refactoring fixed a whole class of interaction bugs that were otherwise not possible to fix before (such as Shrine of Punishment vs Diantha turn count issue).

Example; before the refactoring burned condition was kicking in before between turns and asleep was kicking in after betwen turns, it was just all over the place; there was no notion of a seperate step:

● Haunter used Hypnosis
● Quilava is now asleep
● Burned coin flip result: TAILS
● Haunter got 20 damage
● Between turns. TC: 11
● Asleep coin flip result: HEADS
● Quilava is no longer asleep
● Player B drew 1 card

This is the new version, much cleaner and precise;

● Haunter used Hypnosis
● Quilava is now asleep
● Between turns
● Burned coin flip result: TAILS
● Haunter got 20 damage
● Asleep coin flip result: HEADS
● Quilava is no longer asleep
● Turn 11
● Player B drew 1 card

Redis Upgrade

We’re now using a redis server in the backend for storing lobby messages, caching some match entries for matchmaking processing, storing win bonus timeout rules, etc, which helped to replace some heavy querying work during matchmaking process. This allows faster startup times and less congestion on the server side. Coolest thing might be the lobby messages now persist across server restarts so no more empty lobby chat! I am planning to move more stuff there (such as scoreboards themselves) later on.

Card Select UX Improvement

The card select window has gone through a massive UX improvement, in order to have minimum number of unnecessary clicks possible. It now dynamicly shows how many cards you need to select and the button text are made very clear on what is going on.

<insert here a gif showing the new UX in action>

Bug Fixes & Rolling Update

I am currently focusing on fixing bug reports and cleaning up some technical debt in the upcoming weeks, as they are slightly getting out of control and could be the source of player dissatisfaction over the years.

Most of the time, the problem about bug fixes is that, the server needs to be restarted after a fix has been initiated. However, as we have a kind of a monolithic game server, a restart also needs to kill all existing games as well so that I have been refraining from not doing enough restarts to release bug fixes. This is also becoming another source of frustration and greatly delays the enjoyment of a bug-free game.

What I am planning is that to seperate the lobby server and game server such that a restart would not need to touch the lobby server thus we’d be able to something called “rolling update”, during which the regular game operations will not be affected even by one second, allowing bug fixes to be rolled out in a continuous fashion, without interrupting the current games and removing the delay between a bug-fix and its rollout.

This will not be easy though. It requires enormous backend code refactorings as this wasn’t really thought of while developing the project over the years, so you need to bear with me here.

I think this is all for now, check out Development channel on Discord for more day-to-day updates regarding the development process and ask me any questions you have.

Best

1 Like