All posts Looking back, dated two days after the hand-in. The grade is added as a note at the end. Project · TouchdownTactics · interactive demo below

TouchdownTactics: seven people, one game in Smalltalk, and I had the cards

In the Software Architecture course a team of seven built a real-time strategy game in Squeak/Smalltalk. My part: hand, cards and elixir.

About 7,900 lines added, about 9,500 removed. That’s my balance in TouchdownTactics, and it says more about the last two months than any feature list.

The setting was the Software Architecture course at HPI. The task: build a game in Squeak/Smalltalk as a team and apply design patterns, Smalltalk idioms and a clean modular structure along the way. There were seven of us. Smalltalk was new to me, and Squeak is image-based on top of that, so you program inside a running system and version it with Git through Squot.

Our game is a tower rush in the style of Clash Royale. You hold a hand of cards. Each card is a hero or a spell and costs elixir. Elixir refills over time. When you play a card, the unit walks across the field, finds its path and attacks. There’s also a bot opponent with four difficulty levels, a wave mode, a tutorial and local multiplayer. In the end the team repo had 426 commits and about 80 classes.

My part was what you hold in your hand. The hand shows four cards plus a preview of the next one. Behind it sits the deck as a queue: play a card, the preview moves up, the played card goes to the back. Then the selection and play logic, the connection to the spawner that puts the unit on the field, and mirroring everything for two players. And the elixir bar: it refills on every game tick, a card can only be played if there’s enough, and it draws itself. The demo on this page is a small rebuilt version with its own graphics instead of our sprites. The left and right panels are exactly that part.

10 Touchdown Tactics 2:44
Pitch (needs JavaScript).

A unit crossing the opponent’s line scores a touchdown; first to 3 wins. Your turn: tap a card, then the pitch.

Demo with sample data
Interactive demo A small rebuild with neutral graphics instead of the game sprites. Watch a round, then play against the bot.

Why so much deleted? Because I rewrote the subsystem several times. First a version that runs, then a second, then a third, and at the end everything merged and cleaned up. Only once the hand actually worked together with the spawner and the elixir did I know what the interfaces had to look like. And I had to agree on those with six other people working on the bot, the waves and the screens at the same time.

The team’s code ended up using Abstract Factory, Strategy, Template Method, Null Object and Flyweight. Sounds like a textbook. It was the actual point of the course, though: don’t memorise patterns, use them where seven people would otherwise build past each other.

What I’m taking away: make it run, then make it clean, and don’t skip the cleaning. A subsystem belongs to someone, and that someone talks to the others a lot. And you can learn a new language and paradigm in one semester if you have to build something real in it.

Tools and skills: Squeak/Smalltalk with Morphic for the UI, SUnit for tests, Git through Squot, design patterns in real team code, refactoring and linting in my own subsystem.

Note added later: the module grade is a 1.0. And the team stayed together for the next course.