Personal Log »

Re-learning Go

As I mentioned in you learn by doing it wrong, I was thinking that perhaps it would be a good idea to work on a CRPG targeting a modern platform, because it would be easier to fail faster than with my current approach with the Amstrad CPC.

I had started all the infrastructure to start writing code in C using SDL2, with the latest version compiled from source, and I was almost convinced that I wanted to use C. I even had researched some libraries that I would need to work comfortably. Being a modern platform, there’s no point on suffering the same struggles of making software for an 8-bit.

But then I remembered that, no so long ago, I was looking for a language that was higher level than C, compiled to native code, and ideally supported cross-compilation –at least let me build Windows binaries on Linux–.

I started looking at Haskell –because it would be also useful in the context of my day job, where I write functional code in Scala using ideas borrowed from Haskell–, but I got bored pretty quickly by the book I was reading. Then there’s that Rust language that the new kids are always talking about, but I have the feeling that it would be unlikely that I could use it professionally.

Then I remembered that I wrote a good amount of Go before moving to Scala –professionally–. Back then I thought Go was alright, with a few things I didn’t like, but it was mostly down to some tooling or the way the Go community handled releases that I found it wasn’t my cup of tea. At the end I was writing C at home, with a lot of Python for my tools, so I kind of left Go behind.

I’m sure I learned about Ebiten at some point. “A dead simple 2D game library for Go”, and after looking at it I thought it was neat. But I wasn’t doing Go any more, so I didn’t dig too much.

The language has changed since then, and it looks like some of the things I didn’t like are better now. So I have decided to revisit Go, and give Ebiten a go –the Go jokes never end–.

I have a plan and I’ve been streaming on my twitch what I have been doing so far. With the new shiny toys for vim –for example: LSP–, the experience is quite nice and I have enjoyed it so far –mostly, the interface bingo is still tricky if you don’t know the packages–. We will see how far I will get, because I didn’t do anything after refreshing my Javascript.

I’ve been asked if the code will be open source, to follow along as I stream my sessions. That has been a bit distracting, to be honest, because doing things in the open as open source requires some effort. I’m not sure how to do it, if making the engine open and then make a game with it –very ambitious–, or just keep things simple and make a game –which may be a feat on itself!–.

As I say: distracting. In reality I don’t think I will write anything too exciting.

Meanwhile, my progress on Hyperdrive is steady. The engine is solid, I have one stage –complete with final boss!–, and I’m working on graphics and enemy designs for the second stage. I will stream more sessions working on it, but only when the graphics are ready.

Would you like to discuss the post? You can send me an email!