Fat Old Yeti

Fat Old Yeti

Being a blog of thoughts and tutorials from a hobby game developer.

07 Feb 2022

Roguelike Tutorial 15

Roguelike in Go - Part 15 (Update Libraries)

All of the source code for this tutorial can be found here.

Since it’s been a while, it would be wise to update the libraries we are using. Doing this occasionally (and quite a bit more often than I have here) will keep you from running into major issues with library clashes in the future in case of API changes in any updates. Also, our version of Go that we have been using is a bit dated.

Open go.mod and change the go version from 1.15 to 1.17. In addition, change ebiten to v2.2.4, which is the latest version of ebiten. Our ECS and FOV libraries have not changed.

Run the command go mod tidy which will clean up all the indirect dependencies. Your go.mod should look like this:

module github.com/RAshkettle/rrogue

go 1.17

require (
	github.com/bytearena/ecs v1.0.0
	github.com/hajimehoshi/ebiten/v2 v2.2.4
	github.com/norendren/go-fov v1.0.1

require (
	github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be // indirect
	github.com/jezek/xgb v0.0.0-20210312150743-0e0f116e1240 // indirect
	golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
	golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
	golang.org/x/mobile v0.0.0-20210902104108-5d9a33257ab5 // indirect
	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
	golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 // indirect

I made one additional change which is completely optional. I decided to try out the GoLand IDE and see if it suits my needs better (I do most of my code in VIM and occasionally go to VSCode normally). Since Goland creates a folder of its own settings called .idea, I added that to my .gitignore. You may also notice I’ve had the .vimspector.json file. If you aren’t using VIM, you can feel safe to delete that one.

If you have any questions on this tutorial, feel free to hit me up at fatoldyeti@gmail.com or @idiotcoder on the gophers slack. In addition, I’m on the Ebiten Discord as Idiotcoder. Also, there is my discord linked above.