I recently got tasked to document some databases for a project I’m working on. I happen to enjoy writing documentation, so I thought it would be no big deal. How wrong I was. There’s so many tables, and all of them are filled with columns that lack comments. It’s my job to find out what all of them do, and document them. My initial thought was to create a markdown document and capture all of the data in some tables. As I started to do that, I was really pleased with the result. Beautifully rendered tables that accurately describe what column does what, how it’s formatted, and why we need it.
Unfortunately, my extremely manual documentation process doesn’t scale. When I realized that several tables all share the same column name, I started to wonder “what happens if I make a typo and then copy and paste it everywhere throughout my documentation?”. I started to think of ways to centralize the content, while still being able to keep my content in markdown. The solution I came up with was Mustache and Grunt.
Every so often, I pick an indie game I’ve been playing recently and tell everyone a little bit about it. Today is going to be Cosmochoria by @mantrakid
Cosmochoria is a space exploration game with a whimsical art style and lets you explore the galaxy, capture planets, and kill baddies.
As my previous posts have discussed, I’m currently building an isometric city simulator. As I post screenshots to Twitter and tell my friends about it, they inevitably want to see it in action. I have web hosting here at Evil Mouse Studios, but if I want to put my project online here, it requires uploading all the files manually and it’s kind of a pain.
Enter Github Pages. Github offers a service called Github Pages that hosts a running version of your project for you. All you have to do is branch off of your project, call it “gh-pages”, and then you can see your site online.
I use Grunt to automate my build process, and it works great. It takes all the files I need to run my game and copies them (after processing) to my dist folder (where the game is run from). For my game to work successfully, the entire “dist” folder needs to be hosted somewhere. This normally wouldn’t be a problem, but “dist” isn’t stored under version control. It’s the built version of my game, and having it on Github would just be a waste. So how do I deploy my “dist” folder to Github Pages?
I’m working on an isometric city simulation with procedurally generated terrain, and as I started to generate terrain, I ran into a bit of an issue. I’m using the isometric tiles from Kenney (which are amazing), but I was struggling to think of a way to handle edges. Take this island for example:
You can see that on the left side, there’s some sloping that lets the sand tiles blend into the water tiles. That’s great, but I wanted a programatic way to handle those kinds of transitions. I thought of 9-slice scaling and thought that might be a solution. If you’re unfamiliar with 9-slice scaling, this tutorial might explain how it works. The basic idea is that you can take a rectangle, and divide its parts into 9 (4 corners, 4 edges, 1 middle), and through scaling those 9 parts, you can maintain the look no matter how big (or small) it is.