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
- How database tables are created.
- How to store values to keep track of game state.
- How to use an image to represent a deck of cards and why you want it to be a single image.
- How the state machine drives the lifecycle of the game.
- How to create options that can be selected at the start of the game.
- How to implement a player's turn.
- How to implement actions that all players take at the same time.
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.
No comments:
Post a Comment