Archive for April, 2014


Breakable Toys: Reflecting on the Rats Nest

Rats Nest

It's been a while since I've talked about any of my progress on my rogue-like eugor. Things were coming along pretty well though I've gotten to a point where a bunch of naive decisions are finally starting to bite me.

Thankfully there were a few areas that I picked up on were going to be terrible. I abandoned the idea of using graphs for my map rendering since it added unnecessary complexity for something that didn't need anything like this. I took some ideas from roguebasin and rolled with them. In essence, I have a serialization format that I use for storing basic details.

In general, things are working alright though I am changing a lot of data. I was trying to roll with using interfaces since I have various kinds of structures like Creatures and Characters, though the abstraction somewhat fell apart.

This became apparent one morning while I was trying to make it possible for my character to attack a creature. When I was working with values it was easy, I'd call a function that modified the value and re-assigned it. This approach is pretty gross though, I'm doing all this copying around and it becomes really hard to work with once you start passing these objects around via methods. I've decided that I just need to do more reading on pointers in go and take a look at my game from a distance and start asking myself questions about it.

What sucks right now? Does this abstraction need to exist? Can these objects be represented more generally? Can I justify why this code exists?

It's going to suck to take the stuff I've worked on and throw it out, but it's becoming harder and harder to get an idea of what I'm actually doing. It's time to reflect on what I've built, what I learned while building it and how to make it simpler.


Breakable Toys

eugor
I've been having a hard time keeping focus recently when it came to my side projects. My Android project has somewhat lost steam. After building some of it out I had simply lost interest. Perhaps in a few weeks I'll be interested in it again, but I want to keep learning instead of waiting for that motivation to come back.

After my attempt at a typing based rogue-like I decided that it's time to come back and try building one again. My focus this time is to not try anything crazy and to make a game that's playable. There are so many components to a rogue-like that I never got to experiment with or never really got to understood while working on the game I built during the Toronto Global Game Jam.

I've chosen to use the Go programming language to implement this game. My main reason is that during hack days a few months ago I was implementing a theme synchronization tool but never got a full opportunity to learn the language to it's fullest. As a result I was extremely jaded and frustrated with the language. Now that I'm in a less stressful situation now so I have time to experiment and try things. I can build something, see how it works and throw it out if I want.

I've been following the 15 steps to building a rogue-like and am around step 4 or so. Either I'm completely off, or the first steps were super straightforward given the terminal UI library I chose.

So far the map is a pretty interesting part. I've gone with a few restrictions, such as a room is only allowed to have 4 doors; one for each direction. I also took a somewhat naive approach in that my maps are represented as Trees. The nice thing about using a Tree to represent my map is I can just traverse all my nodes and render those as well. The problem though is most dungeons aren't tree-like, or at least interesting ones aren't. So moving over to a graph should be interesting, I'll just need to figure out a way to pull this off that will prevent me from getting stuck in loops. I know git is implemented as a directed acyclic graph, so maybe I can steal some ideas from there.

Next up is to actually move my character into the map and prevent them from walking over walls and all that fancy stuff.