After concentrating on optimizing my puzzle algorithm for a while, I (finally) decided to take a break from it and instead returned to something else I have done only occasionally: game development. To start with something easy that I already know a little and can get productive with rather quickly, I chose the Phaser framework.

As I grew up playing games in the 80's and 90's, I spent a whole lot of time with Ultima V. I wanted to try out something rather quick and simple, so I decided to replicate the player movement logic — as I remembered it — in that game. In short, that means just moving the player sprite in steps around the screen when the cursor keys are pressed. And that'd be all for my first proof-of-concept implementation.

I believed this would definitely not be the last Phaser project I'll be doing, so I actually started by creating a simple base template for this and my future projects. I chose TypeScript over JavaScript like I would do for any project where those two were my main options. In addition to the language choice and including Phaser in the project, the only additional dependency I included was Vite for doing my builds, and especially a hot-swap build in watch mode.

Creating the template with a very simple example game scene took a couple of hours. I already had to check Phaser documentation for this, so I guess it was high time to get back to it.

With my new template, finishing the first version of my player movement spike was quicker than creating the template itself. I used some placeholder graphics for the player but that was enough for a start.

Continuing past the first step

I'm lucky in the sense that my employer supports our employees' learning by letting us facilitate small study groups around self-chosen subjects twice a year and dedicate some working time to learning things together. While I was creating my template project I also started a small study group around Phaser and got a couple of colleagues to join me. They all worked on their own projects but I discussed mine with them regularly.

In the time we were given for this, I was able to finish my character movement exercise to a point I'm happy with. I even quickly drew my own graphics for it, and although they are very rough, they remind me nicely of those Ultima-playing days of my youth.

Screenshot of my very rough character movement exercise

I also spent some time polishing the simple movement algorithm by buffering some keypresses to make the movement smoother when the user taps the arrow keys really fast. All in all, I was really happy with the result.

Most importantly, this again reminded me how immensely happy I am when I'm working on personal game(-related) projects. That's something that I have to think about carefully as I make my future plans.