Thursday, November 30, 2023

Learning to Develop Games in BoardGameArena

Getting Started

The first thing to do is create a studio account - though there's a decent bit on that page to read through if you're unsure if you want to actually create an account. After creating the account you should go through some initial steps to make sure everything is set up well and some suggestions if you use an Integrated Development Environment (for instance, VS Code). Finally, there are some tutorials for how to start developing some basic games.

Tutorial

I played a bunch of hearts while growing up so that seemed a no-brainer to start with. The walkthrough initially does a nice job of slowly adding things and showing how to build things up. As it goes further along it takes bigger steps, so you have to remember to slow down and make sure you understand what's being done if you need to - which all seems appropriate. Remember that finishing the tutorial is less about getting the game to completion than it is about making sure you understand the concepts and how to develop things for future games.

What the Hearts tutorial taught me

Some opinions I've started forming

Many parts of the flow of the code are connected by string references. For instance, the name of the game state values. This is less useful for the action and transition names used in defining states as those are used in JavaScript and PHP.

I prefer doing test-driven development and while there are some notes on testing I found it awkward to test things in the main class as there are a lot of helper methods that would require the behavior to be mocked out. I'm currently leaning towards extracting logic to separate classes that can be tested separately. My biggest concern with this is finding the right seams.

Random other things

I found a code-sharing page that I appreciated being able to poke around other projects.