This week’s podcast should have been edited for your protection, but wasn’t. Therefore I will have to request that you never listen to it. In the event that you do choose to violate this request, you will hear about the top 10 hats for men, bad beers, awkward guilt and gratitude, as well as esoteric work details.
Bet you didn’t think we would be back again! Well, we are, and unfortunately there’s nothing you can do about it. Today we run a little bit (a lot) longer than we really intended to, but we talk about some of dem dere vidya gaems. Namely, we cover David’s exploits in finally trying Civilization V, The Long Dark, and talk (somewhat spoilerly) about SOMA.
So yes, SPOILER WARNING for SOMA, but we will also warn on the podcast when we are about to begin discussion of the game.
Obviously the change of the Patreon from being a “per work” thing to being a monthly thing would be a big change in the relationship between me and the backers so I felt like I would need to think about it a lot. I thought it may also be a good idea as part of this process to share some of my thoughts and reasonings.
It’s always uncomfortable for me to talk about money when it comes to my work. It’s never been a thing that I have done for the money, I just love doing it. So it’s a weird transition to try to start thinking about the work as also something that maybe I could (or god forbid, should?) get money for. However, I have definitely gotten a lot of support and positive feedback on stuff lately from friends and people that I admire. Also people tell me that artist-types (and maybe I am one of those) tend to greatly undervalue their work. I am still super wary of falling into being an entitled douchebag who expects people to pay him, but maybe it is worth something.
When I started the Patreon, I didn’t know how much support I would get. Since I tend to produce things somewhat sporadically, I felt it would only be fair to ask people to pay if I actually put something out. However, I’ve only charged the backers for one thing since I started the account about seven months ago, and many of the backers I have never charged at all.
This could really be a sign of two things. That I haven’t put out any good work over the past seven months at all and therefore the backers shouldn’t have been charged. Or that what I put out I must’ve undervalued greatly.
So, what have I even done in the past seven months?
Well, one obvious thing which I have put out is a monthly mystery box, exclusive to backers. There could be an argument that these are not worth anything, since I never originally had any intent on charging for them. But on the other hand, although I was thinking the mystery boxes would just be me sharing some of my unfinished/unreleased projects, I greatly underestimated how quickly a monthly thing churns through all of your things. (Especially considering I lost about ten years of my stuff due to a hard drive failure, so I only have fairly recent stuff) This means that it’s actually mostly been me making new stuff to put in them, which kind of turns it into a different thing than my original conception. That in and of itself has had me considering putting an end to the mystery boxes, so perhaps a monthly Patreon payment is a way to help me feel more like I have a good reason to keep putting those out. (Plus people like them)
Additionally, I worked for a while on an unnamed project with the lovely Martin Cohen (of Disposable and Hale fame), which although I loved and was super promising both from a gameplay and aesthetic perspective, I have put aside until I feel I am up to carrying the weight of my own ambitions there. I have not yet reached a point where I can have the productivity level needed to complete a large project like that.
So, instead I have returned to a small project which I began a couple years ago. Initially called Dive Dive, it will probably be renamed Ushanka Jones, and it is a roguelike game with heavy design inspiration from Zelda 1. I have been slowly redoing the artwork for that before I move on with adding more gameplay complexity, but I have a lot of fun ideas there.
Time is continually an issue. I have a reasonably long commute (around 45 minutes) to my day job and back. Also, I have been working 6 day weeks for 5 weeks now. So my free time for personal work is actually quite limited and consequently progress on things has been a bit slow.
Even still, I’ve started a new season of the dunceCast, a podcast featuring myself and my brother, doing what we do best, which is basically just goofing off and being morons. Maybe that’s worthless, but I prefer to consider it “priceless.” 😛
Anyway, this has perhaps become a digression, but it answers the question of “what I’ve been up to lately” pretty well. It does perhaps fail to answer the question of if all that stuff should be worth cash monies from all my lovely backers. Unfortunately I guess I can’t answer that one, but I did put a poll out and around half of the current backers feel as though they would not be being ripped off if I switched the Patreon over to monthly.
I suppose that’s really the core of my concerns. I don’t want to rip people off or leave people feeling like I tried to trick them by changing the terms of the Patreon out from underneath them. That’s why I’m making such a concerted effort to draw attention to that I’m even thinking about changing it.
So let’s go into another reason why it would be good to switch over, which is what I like to call the “Strategic Reason.”
As I have said earlier, I have never gotten paid for my work on games or essays before so it’s terribly unfamiliar to me to see it as having anything beyond intrinsic value. Still, for some time now I have seen going full-time indie again as a long term goal. Achieving that really means that I have to start taking some steps in that direction. I’m not a very hasty person, but there needs to be some forward momentum and risk taking in some capacity to make any progress at all. I don’t want to always feel like I am spending the vast majority of my time not doing what I should be doing with my life.
I see the Patreon as a possible path towards financial independence from my day job. Even a relatively small income from backers would be enough for me to be able to spend less time at the day job and more time on games and essay work. And if I somehow miraculously could reach $1000 a month or something, I wouldn’t need the day job at all. (I only make like $15,000/year now)
So, there’s the “Strategic Reason”, and maybe it’s a good reason or maybe I’m just entitled. After all, it’s just one possible path, and (for better or worse) it happens to be one that is within my comfort zone. It doesn’t require me to set aside my timidity and take a big risk by jumping out of my job without a real safety net or plan.
On an additional note, I also have backed a few people on Patreon over those months, so having set up the account has actually been a net financial loss. That’s my choice to back other people, so it’s not really the responsibility of my backers to foot the bill for that. But it’s worth mentioning since I’ve been thinking about that as well.
Anyway, this post has all been a bit rambly but I wanted to share some of my thoughts and reasons for considering making this change. I hope you will understand, and be sure to answer the survey if you haven’t already.
Woah BRO! The prodigal dunces return for an impromptu podcast! Topics “discussed” include not having any clue what we’re doing, a review of a secret and terrible foodstuff, and getting older. KIDS DEESE DAYS!
Somehow or another, I seem to have forgotten to post on the blog about this lecture I gave a short while ago. It is about how to go about designing puzzle games, with a focus on honesty and expression.
This video more or less coincides with my starting of a Patreon campaign to support the major articles or videos (and small games) that I do. It has been reasonably successful, although if you like the work that I do, then extra contributions will always be appreciated. 🙂
I suppose while I’m at it, I should also mention that I did some live puzzle-designing on twitch which you can find below:
And also, I never even mentioned my video essay series, Why Games Matter. Which you may find the latest episode of below:
Have to stop abandoning this blog completely. But hey, I do a lot of tweetering, so you should probably follow me there.
A short while ago I made a game called Opposition. It was a short puzzle game designed in an afternoon. I was pretty happy with the design for how much time I had spent on it, but some of the puzzles towards the end of the game felt a bit too fiddly to me. So I have “remixed” the game so to speak, redesigning most of the puzzles to make them simpler. Perhaps you’ll enjoy it more, perhaps you’ll enjoy it less. 🙂
Just thought it’d be good to post a bit on the status of Duet. After a couple years(!!!) of hiatus, I have started to feel like working on Duet again. I’m still pretty burnt out, because I made the mistake of pushing myself too hard on this project, working 14 hour days even when I didn’t feel like working at all. But, in spite of that, I believe that I have found a good way forward.
So, there’s this cool little tool called PuzzleScript made by Stephen Lavelle. ( Of English Country Tune, and Stephen’s Sausage Roll fame) Maybe you’ve heard of it, or maybe you have not, but either way it’s an extremely easy to use tool for creating certain types of puzzle games. I’ve played a few games made with it, but I finally decided to try making something with it myself and the result is this game:
I really had a blast designing it, and I hope you enjoy playing it. Let me know what you think of it, and be sure to try out PuzzleScript for yourself if you’re so inclined. 🙂
Sometimes when I’m talking to people about games, I describe myself as someone who likes puzzle games. What I tend to fail to communicate without much further effort is that I dislike almost every puzzle game that I have played. I straight-up loath some of them. If I’m talking to someone who says that they don’t like puzzle games, I almost always have the same misgivings about them that they do. There are very few puzzle games that I think are very good, and most puzzles in general are terrible and uninteresting. So what I really mean when I say I like puzzle games, is that I like a very specific kind of puzzle game with a very specific kind of puzzle.
There are two major categories of design from which puzzles can arise. The first category, which tends to be the most common category, is that of the puzzle as obstacle. This type of puzzle is intended to halt the player’s progress until they can solve the puzzle, at which point they will be rewarded with more of the story or perhaps a tasty nugget. The typical adventure game puzzle is of this type. Solutions to these puzzles can often feel arbitrary, even ludicrously so. (As in the cat-hair mustache puzzle) Almost the entire difficulty of the puzzle is due to how illogical they appear from the player’s perspective. The player approaches from the point of needing to unlock a door, but the designer approaches from the other end, coming up with an elaborate obstacle to prevent the player from getting into the castle gardens. Working backwards from there, the designer layers on complexity:
“Okay, the player needs to get a key to unlock the door, but just finding a key is boring, so what if instead the player finds a mold of a key? And of course, all good keys are made of gold, so the player needs to get some gold! But where will the player find the gold? Well, the player still has the golden Magician’s Chastity Belt from the joke at the end of Act 3, so we’ll just have them melt that down! Aha!”
(And so on…)
I do not like this type of puzzle in general.
The second category is the puzzle as illustration of the natural consequences of a system. In this approach, the designer defines the rules of a system and explores the space created by and surrounding those rules. Puzzles are created in order to express the interesting discoveries found by the designer. These types of puzzles are almost guaranteed to be better than puzzles designed using the first method, because a deep system gives you back more than you put into it, whereas a puzzle that comes from the head is only as clever as its designer.
This is a complete shift in approach. Here the puzzle is not an obstacle to the player’s progress, but is the fulcrum of their entire experience. In the previous method, the designer works against the game, hoping to disguise the truth of a series of locked doors and keys. But when a puzzle comes out of the subtleties of a system, it already contains something deeply valuable embedded within it, and the goal of the designer is to work with the game to express that value as well as possible.
These are my favorite type of puzzle, and there is a broad spectrum even within this approach, with better and worse puzzles. But the best puzzles are those that express something fundamentally true. Something that resonates with you. The unmistakable joy of discovering fundamental truth is what separates the great puzzles from the average ones. Without that Richness, a puzzle is just a puzzle. It fails to be memorable and fades into the background radiation of mediocrity.
Witnessing Talos
I would not have played The Talos Principle if it wasn’t for Jonathan Blow streaming the game on Twitch. Even when I first watched him playing it, it still seemed uninteresting, but as happens sometimes when you hear a lot of people talking about a game: you start to feel left out of the conversation. There are also similarities between The Talos Principle and Jonathan Blow’s upcoming game The Witness, and since that is the game that I am presently most excited for, I took some time to sit down and play Talos.
I was pleasantly surprised at first. The early puzzles, although straightforward and not particularly difficult, had some cute aspects to them that hinted at a deeper thought process and approach towards design than is evident in most puzzle games. But as I continued on through the game, I started to find the game lacking. I hesitate to use the word boring because I think that is a personal value judgment which fails to contribute to the discussion, but the game did begin to feel flat and repetitive.
Perhaps it’s just a matter of “that’s now how I would design it.” However, since several other people have had similar misgivings with the game, it leads me to believe that I am not entirely up my own ass.
As my father would say, “You either like it or you don’t”, and in that sense I do like The Talos Principle, but there is a certain disappointment that looms over my experience of the game. The Talos Principle is an average puzzle game with a few great puzzles. That is more than enough for most people, but I felt as though the game fell just short of greatness.
One of the biggest design failings of the game is that the puzzles tend to approach difficulty by becoming more elaborate while still remaining relatively straightforward to solve. These “harder” puzzles are simply collections of concepts borrowed from earlier in the game, and they rarely give rise to any unique insight that was not found in their predecessors.
One puzzle in particular is exemplary of this issue.
But First, a Trip Down Memory Lane…
After I had designed a portion of the puzzles in Duet, I started to feel a bit insecure about the games difficulty. Part of what I enjoyed so much about Braid was that the puzzles could be quite hard at times, but here I was with a puzzle-solving game in which almost all the puzzles were easy to solve. Some were so trivial that it was hard to call them puzzles really. I had explored the consequences of the mechanics and assembled some interesting puzzles that I felt good about, but I wondered if people would find the game unsatisfying simply because it wasn’t that difficult.
So I sat down and built a few puzzles which layered concepts from earlier puzzles to form more elaborate sequences. These puzzles certainly took more time to complete, but I found them unsatisfying. Sure, they had a few interesting structural aspects to them, but they felt like a slog and were the worst puzzles in the game. Although I continued to struggle with the feeling that the game was missing something (and that maybe it was that level of difficulty), I ultimately cut the puzzles, feeling that they just didn’t live up to the standard I wanted.
I never really knew what to call those puzzles. They had a certain feeling to them, but I could never put my finger on a word. “Tinker Toy-box,” I thought. But it just didn’t really communicate much.
The Labyrinth
Then I played the puzzle in The Talos Principle called “The Labyrinth” and I knew what the word should be.
A Labyrinth is a puzzle with nothing new to say. It is, like its namesake, a long and arduous road with no branches. As a player, you simply must proceed from the beginning to the end. It is a puzzle whose difficulty lies entirely in execution. It is a thoughtless puzzle. Is it even a puzzle?
Unfortunately, this puzzle is not an outlier but is indicative of a core design problem. The game wears out and obscures the beauty of its concepts through repetition. Although the design of the game follows the design method of a great puzzle game, it is as though the designers didn’t see the truth revealed through the puzzles to be something to admire in and of itself, but rather as a building block for some sort of higher level “puzzle gameplay.” How many times did I have to remember that I could pull a fan off its gears and use it to depress a button? Four times? Five times? I can’t remember. It was brilliant the first time. It stumped me for at least half an hour. But the second time it felt like a cheap prank, and the third time it felt like a betrayal.
I don’t think there was a single puzzle concept in The Talos Principle that didn’t get reused at least once.
A Smart Puzzle
Jon Blow has stated that a good puzzle “knows what it’s about.” Without asking him to elaborate on what he meant by that statement, I can only offer my rough interpretation: I believe that a puzzle meeting this standard must exhibit deliberate intent on the part of the designer to avoid extraneous elements and clearly highlight what makes the puzzle interesting and unique. A puzzle that knows what it is about feels elegant and to-the-point, where one that doesn’t feels overwrought and confusing even after you solve it.
If you are a designer, it’s impossible to overstate the importance of understanding why your puzzles are worthwhile. On the receiving end, the player will be able to tell if you had a clear idea of what the puzzles in your game were about or not. The player is putting trust in you as the designer of the game, and expects that trust to be repaid. They want an interesting and beautiful experience, and since they are already sitting down to play the game, they believe that it is likely that you are going to give that to them. So your job as a designer is not to let them change their mind. This is similar to the suspension-of-disbelief concept in films. Engagement from players must be earned, and not just up front but continually across the entirety of the game.
So what is The Talos Principle about after all? I think the common approach to game understanding would say that the game is about robots attempting to prove their humanity and an omniscient God AI in the sky. I think it’s safe to say that the puzzles have equal presence in the game as the story and thematic elements, so what I’m really talking about is, “what are the mechanics about?” This is a strange way to think about mechanics in games, but I think it applies particularly to this type of puzzle game. I will cover the story in a bit, but since two rarely overlap—A design failing in my personal opinion—it is probably fine to treat the puzzles as their own independent entity. After all, as Thomas Grip said in a conversation on Twitter, “A horror game where an evil man forces you to solve sliding puzzles all day is still a game about solving sliding puzzles.”
There are a lot of mechanics in The Talos Principle, and to cover them all in-depth would probably be the subject of a thesis. I think it will suffice for my present purposes to highlight just one set of mechanics: the laser redirection puzzles.
Laser redirection puzzles are nothing particularly new, and maybe even their implementation in Talos is not out of the ordinary, but I found it to have some very interesting things to say.
I have been thinking about occlusion in my day-to-day life a lot after having played The Talos Principle, and in large part due to the laser redirection puzzles. The puzzles require the player to have line of sight in order to connect the redirection prisms from one point to another, and since the lasers cannot pass through solid objects, the prism must be placed at a position with a clear view of all its connections. This set of mechanics cause you to think about the environment in a different way, to pay attention to how things go from being hidden to being revealed as you move around. So in some sense the puzzles say fundamental things about what it means to observe from a fixed point of perspective inside a three-dimensional world.
Part of building a great puzzle means that you take that understanding, that core revelation, and you design the puzzle as an artful presentation of it. You architect the experience of discovery, and you can be sure that what is discovered is interesting because you had the same experience of discovery yourself. The puzzle is just an artifice which points in the direction of the truth. It beckons the player to pursue and reveal it. I would say that Talos does not do as good of a job at this as it could. There are a few puzzles that really hit on something deep, but the aimless feel of the rest of the game makes the poignancy feel like it was just luck on the part of the designers.
It is very important to maintain the clarity of your puzzles as the game goes through an art treatment, because art can have subtle impacts on how the puzzle is perceived by the player. One way in which Talos’s laser redirection puzzles fail at this is in maintaining a rigid correlation between what is visible and where a laser can be directed. Since the puzzle rooms can often be maze-like, there are some windows in the walls to allow players to find their bearings. But because lasers could be redirected through those windows, in order to construct proper challenges it is required to have some sort of window through which the player can see but lasers cannot be redirected.
This perhaps could have been accomplished with some sort of force-field, or even a glass that absorbs lasers. (Which would have allowed for glass which lets one color laser pass and not another, opening up more puzzle possibilities) Instead, the designers of The Talos Principle chose to have these walls be iron bar fences, which somehow do not allow lasers to be passed through the spaces in the bars. According to the mechanics of the game, a laser should be able to be directed towards any spot which is visible, but there is a direct clash between the art and the mechanisms of the game. The art says there is open space between the bars of the fence, but the mechanics say that the fence is completely solid and lasers cannot pass through it at all. In a sense, the art is lying to the player. It is confounding why such a poor decision was made in the art treatment.
It is not my ambition to shit all over the game or it’s designers, so I’d like to highlight one other aspect of the laser puzzles that I found insightful. There are puzzles in Talos where you sort of bootstrap something into working that otherwise would not have worked at all, by providing a laser that is only temporarily required. The power is applied and then it can be safely removed. It’s another fundamental concept, and I’m not sure what to call it, but it’s similar to jump starting a car, or the way in which static friction takes more force to overcome than kinetic friction. It takes more force to get an object moving than to it does to keep it there. Whatever it is called, it is another beautiful and sublime puzzle concept. It resonates because it illustrates something that is fundamentally true, not just within the confines of the game world, but also in the real world.
A lot of what I’ve said here could be interpreted as a suggestion that there is a recipe to greatness in puzzle game design, but I don’t believe that’s true. Although systemic behavior is a necessary ingredient, sometimes decisions must be made on just gut instinct. This dichotomy between logic and intuition can be difficult to reconcile.
In Talos, the laser redirection puzzles were extended by allowing for a second laser type of a different color. This means that a decision had to be made as to what the rules of interaction between the two lasers would be. There is no real right answer here. Although the decision was made that the lasers would not be allowed to overlap, they could have just as easily passed through each other. There are other gameplay possibilities which could have been possible under these rules that are not possible under the chosen rule-set. For instance, there easily could have been more colors of laser. Perhaps multiple colors could be shined through the same redirection prism, producing a composite color laser. However, the decision was made by the designers that there would only be two colors, and that they would not be able to cross each other, and out of this decision comes a certain set of gameplay.
We can look at all the decisions that must made as part of the design process as branches on a great tree of possibilities. At the far ends of all the branches are a certain number of leaves, which are the life of the puzzles. If we were to start at the base of the tree and trace our way up, we must make decisions along the way about which branch we choose to follow. Some branches may seem large at first, but perhaps they are broken off at some point and there are not many leaves on them to be found. Perhaps an unassuming branch is just full of leaves that we wouldn’t have expected to find. It is the nature of puzzle game design that you can never truly know all of the possibilities that you have missed out on based on a decision you made earlier in the design process. There is art to all good game design, but there is also an element of luck that should not be discounted.
On To the Story
Similar to the design of the puzzles themselves, I think there are two basic approaches to narrative design in puzzle games. The first type of design is to come up with a story independently and attempt to marry it with the mechanics of the game. This can be successful perhaps in rare cases, but I tend to think that the only real benefit that this type of design can guarantee is that, if your story is good, it can be a welcome break and rest for your mind between the hard work of puzzle-solving.
The second type of narrative arises from and is therefore integrated with the mechanics of the game. I would call this Illustrative Narrative. Comparable to illustrations in a book, this method sees narrative not as an alternative to puzzle solving, but as a layer of interpretation on top of it. It is story used as a different avenue of expression to enhance the players overall understanding. It stands outside of but lacks meaning without the text, which in this case is the gameplay.
A great example of this type of storytelling is found in The Swapper. The mechanics of the game involve the player using a device to make clones of themselves. This creates a ton of interesting gameplay, which would be totally fine without any sort of narrative framework. However the game creates effective storytelling by also exploring the moral and psychological consequences of such a device.
This type of story makes the game better because it offers a different perspective on the mechanics of the game. It encourages the player to step outside the abstract mode of puzzle solving and think about the puzzles in a more literal way.
The Talos Principle uses the first method, and is left with a story that, although enjoyable, fails to connect to the puzzles in any meaningful way. The mechanics are mostly talking about movement through and partitioning of space, while the story is about consciousness and what it means to be human. The gulf between the mechanics and the narrative is a huge missed opportunity, but I don’t have any great suggestions for alternative stories. The mechanics of a game of any complexity will always be the primary focus of the player’s attention, and good game storytelling involves embracing this rather than fighting against it. Although the game does well by providing multiple levels of engagement with the story, it is sometimes preferable to forgo story if the alternative is to create something incoherent when taken as a whole work.
References:
Designing to Reveal The Nature of the Universe—An IndieCade talk by Jonathan Blow and Marc Ten Bosch:
A Talos Principle Review:
For some interesting musings on alternative approaches to game storytelling:
Please note that this guide is intended as a supplement to the main video series for users who would rather use Sublime Text than Emacs, and does not cover all aspects of setting up your development environment. Namely the Visual Studio setup, which is the same regardless of what editor you are using. However, I have attempted to be as thorough as possible. If there are any errors or glaring omissions in this guide, please contact me on twitter @mvandevander and I will resolve them as soon as possible. Once again, although Sublime Text is cross-platform, this guide is not. I would appreciate any tips that would help the guide to be more cross-platform as well. 🙂
Setting Up the Command Line
Download Handmade Hero and put the source code inside a directory somewhere that you will remember. I put mine in “C:\Users\Matthew\Documents\Programming”, but anywhere is fine.
Create a batch file named startup.bat and place it in the Windows “Startup” folder, which can be found in the start menu or at “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup”
Inside the startup.bat file, you will want to put the following, replacing the directory on the right-hand side with the directory which contains the “build” and “handmade” folders:
subst w: C:\Users\Matthew\Documents\Programming
Now after this batch file is run, W:\ will point directly to that directory. Double click the file to run it. Since we put the batch file inside the Startup folder, it will run every time windows is booted and we won’t have to worry about setting it again.
Note for Windows 8 users: Once again Microsoft has seen fit to make things harder and more complex for users who want to get things done. On Windows 8, when you “run as administrator”, it is considered a different user than your base account. Therefore subst will take effect under the “user” that you ran it from. If it is run from cmd as admin, you have it there but it doesn’t show up in explorer normally, and if you just run it without the admin privileges, it won’t show up if you run cmd as administrator. So be sure that you are not running cmd from a shortcut set to launch it as administrator. We will never need a command prompt with admin privileges. Also be aware that there appear to be issues if you actually do subst the same directory under both and admin and a normal user account.
Create a new shortcut on your desktop (Right Click->New->Shortcut) and paste the following into the location box:
Right click on the new shortcut and hit Properties to edit it. On the Shortcut tab, under “Start In”, Put W:\. Feel free to go to the Colors tab and change the text and background colors to whatever you like. Here are some nice values:
Screen text: 200, 180, 100
Screen background: 20, 20, 20
Pop-up text: 20, 20, 20
Pop-up background: 200, 180, 100
While we’re at it, let’s go to the Font tab and change that awful default font to something nice. I chose Lucida Console at size 14.
Adding Sublime Text to the Mix
Download Sublime Text 3 and extract it into a directory you will remember. I put mine in C:\sublimetext
Inside W:\handmade\misc, add a new batch file called “edit.bat” which we will use to launch Sublime Text.
Put the following code inside edit.bat, changing the directory to the one you put Sublime Text in:
@echo off
start C:\sublimetext\sublime_text %1
Now if we click our desktop shortcut, we can open Sublime Text by typing “edit” and hitting return. We can even open up files by appending them to the edit command like so:
edit handmade\code\win32_handmade.cpp
If Microsoft Visual Studio is installed, we should also be able to build our game from that command line, by typing “build” and hitting return. Magnifico!
Integrating Our Build System with Sublime Text
But what would be really awesome is if we could get our builds working from inside Sublime Text with just a keypress!
Open Sublime Text. Go to Tools->Build System->New Build System
The contents of the file should look like this.
{
"shell_cmd": "build",
"file_regex": "^ *([A-z]:.*)[(]([0-9]+)[)]"
}
Save the build system file as “handmade.sublime-build”, and make sure it saves into the User subdirectory of Sublime Text. (It should by default)
Now if we open win32_handmade.cpp inside Sublime Text and select our new “handmade” build type from Tools->Build System, we can build the project by pressing F7 or Ctrl+B. We can even jump between any build errors by using F4 and Shift+F4. Neat!
So far, this is all going pretty great. But we can make it a little better by installing a couple of packages. In order to make installing packages easy, we will want to first install a plugin called Package Control. We can do that by going to this website and following the instructions there.
After you have installed Package Control, go to Preferences->Package Control, and on the pop-up click Install Package. You will want to get SublimeLinter, SublimeLinter-annotations, and Highlight Build Errors.
Exit and reload Sublime.
Now all of our TODOs will be marked, and we will get line highlights for every build error.
Additional Tweaks
If you would like to change the settings for the highlighting, there are lots of options that you can access simply by right clicking in any code window and going under the SublimeLinter submenu.
I would suggest changing the Gutter Theme to None to remove the dots in the sidebar, and changing the Mark Style to Fill. Keep in mind though, that if you want to use the other linting features of SublimeLinter, most of those require those Gutter marks.
You can also edit the JSON file directly by either clicking Open User Settings from that menu, or you can go to Preferences->Package Settings->SublimeLinter->Settings – User. I am not sure why (probably a bug), but for some reason the settings file will be blank unless you have made changes to it from the right-click menu. To get the file to fill out, you have to save it and reload it.
I would suggest tweaking the file by adding “NOTE” to the list of warnings, so that NOTE is highlighted in our code. So that section will read like this:
"warnings": [
"TODO",
"NOTE",
"README"
]
We’re all set and ready to rock now! Happy heroing!