Archive for Handmade Hero

HandmadeCon 2015

Posted in Handmade Hero, My Life with tags , , , , , , on December 9, 2015 by Matthew VanDevander
CVtmXd0W4AA5xZJ

From left to right, Me (Matthew VanDevander), Abner Coimbre, Casey Muratori (holding the Owl of Shame), Andrew Chronister, Dustin Specht

So, I’ve just got back from one of the craziest trips that I’ve ever taken in my life. I headed out to Seattle last weekend for HandmadeCon, a convention which is centered around a low level game engine programming tutorial series which Casey Muratori broadcasts weeknights live on the Internet.

I’m not sure that I necessarily want to cover every single thing that I did while I was in town in excruciating detail, especially since there’s literally no way that I can put into words how awesome of an experience this has been for me. But I guess I’m writing something so I may as well talk about some of my thoughts about the experience.

Heading Out

I’ve never been on a plane before, so of course that was a little bit nerve-racking. It turned out to not be as big of a hassle as I thought it would probably be (what with the TSA being totally banana-cakes and all). I had some friends telling me before I left that they would never fly anywhere because they were scared of being on the plane, but much as I suspected for me: that turned out to not be a problem at all. I actually enjoy flying–insomuch as you can when you have a four-and-a-half hour flight packed in like sardines next to somebody that doesn’t want to talk to you.

Arriving in Seattle was just a surreal experience for me. I’ve never been so far away from home and everything that I know. I started to feel little bit alone, but luckily I met up with some people that I knew from the Handmade Hero chat at the airport.

About Seattle

The city is cold and rainy. Apart from Friday–the day I arrived, it rained pretty much the whole time. The city seems to have a lovely culture, feeling much more like a smaller city while still having lots of things to do. I had some of the most amazing food of my life while I was there, and overall I had a really good time, apart from the weather.

Because sometimes I think about getting outside of my bubble of Tennessee and maybe moving somewhere else, I naturally evaluated whether or not I could live in the city. My overall assessment is that I like it much better than, say Manhattan, but I’m still not sure I could live there if the weather is like that all the time. There’s also a little bit of just my general uncomfortable feeling about being in cities because of growing up living in rural areas. I always get a sense when I’m in the city that I can’t relax because something terrible could happen at any moment.

Meeting Online Friends

We ended up throwing a few meet-ups together for some of the conference attendees that wanted to socialize: the first of which was the night before the conference at a Szechuan place called Seven Stars Pepper. (Those Dan Dan noodles were amazing.) I had booked the reservation for 10 people initially, but I quickly had to double that. Thankfully somebody else reserved a table too, because we ended up having about 38 people show up in total (including Casey). So that meet-up was awesome, as were all of the social gatherings that we put together around the conference.

The Con

Since I was heading out there for HandmadeCon, it only makes sense for me to quit stalling and go ahead and talk about what I thought about the conference itself.

Overall, the conference was amazing. It was packed from beginning to end with amazing speakers who are totally at the top of their game in terms of what they do. Because Casey decided to go with a more informal “Fireside Chat” style discussion with each speaker, I feel like the conference was easier to pay attention to and felt more relaxed than the typical PowerPoint-centric type conference.

The best way for me to talk about what I think about the conference is to break it down by each speaker and give a few thoughts about each of them.

Tommy Refenes

In my assessment, even though he is often known as “and Team Meat” in favor of Edmund McMillen, Tommy Refenes contributed immensely to the design of Super Meat Boy. The controls and the physics of a platformer are a significant portion of the game design. To that point, the part of the discussion with Tommy about how early the controls, jump height, and movement speed were set in stone was interesting. My experience designing Duet showed me that the level design of an entire game naturally follows from those early low-level decisions, so it was cool to hear some familiar stories.

Don’t get me wrong. I don’t want to discredit Edmund as a designer, because he obviously brought his own massive contribution to the game, both from a level design standpoint, and from a character and art standpoint. (The odd one out in this was Danny Baranowsky, who received no mention during the discussion for his amazing contribution to the soundtrack. It seems that the working relationship between Team Meat and Danny has soured somehow, as the latest ports of the game do not feature his music. I am not certain of the details though, so it may be possible that there are no hard feelings. )

The discussion with Tommy was overall an enlightening and interesting dive into Super Meat Boy. It was often technical in a way which I don’t think I had seen before, naturally because we were at a conference for programmers. (Not to say that there weren’t non-programmers that attended.) A lot of times when you see an interview with a programmer, everything gets talked about on a very high level. You rarely hear concrete technical details about how something works. So it was pretty great to hear about how the art pipeline has evolved over the years and some of how it was implemented.

Mike Acton

So Mike Acton is mostly known inside the Handmade Hero community for a talk that he gave at CppCon 2014 called “Data-Oriented Design and C++”, in which he made the argument that programming should be seen as problem solving using a computer, and that finding effective ways of solving problems requires focusing on the nature of the problem. Since most computer problems are primarily about manipulation of data from one form into another, as a programmer, your job is to focus on whatever the most effective way of doing that transformation is. The common Object-Oriented approach often misses the point, and focuses instead on world modeling using objects, which only makes the problem harder than it really is. Mike Acton’s approach, as outlined in that talk, is very much in line with the kind of programming that Casey does on the Handmade Hero series. Casey often calls his particular approach “Compression-Oriented Programming”, but I feel like any programming methodology with “Oriented” in the title is destined to become abused at some point. So my personal preferred description would be “Pragmatic Programming”, because I feel that puts the focus on the mindset: solving problems using a computer.

Mike Acton works at Insomniac. Being a AAA developer, he’s in sort of a different sphere then Casey or myself in terms of being at a big company with a lot of programmers and multiple projects. However, that’s really why it was important to have him at the conference. He stands as exemplary proof that Casey’s straightforward method of programming does actually scale up to very large and complex projects.

The discussion with Mike was perhaps less specifically technical to a certain game than Tommy’s, although that could be because Mike mostly works on more generalized technology, but there is still a hell of a lot of knowledge that he shared. As with the rest of the conference I definitely plan on re-watching it to try to absorb as much of that as I can. Also Mike was hilarious.

Pat Wyatt

So, I’m just going to go ahead and get this out of the way: I didn’t know who Pat Wyatt was before the conference. But wow–he has an unbelievable amount of expertise with network programming, which is a topic that gets brought up all the time in the Q&A on Handmade Hero. Unfortunately, Casey does not have a ton of experience in that arena, and the nature of Handmade Hero is to be single- player. So, Casey has been unable to really give people a good idea of how the system like that should be architected.

It was super cool to hear from Pat about how he managed the complexity of network infrastructure supporting Guild Wars, and did so in such an effective way that the game launched without the seemingly industry standard server issues.

Hearing the nitty-gritty details about how some of the content management systems for Guild Wars worked was really cool. It functions in a similar way to what Casey is doing for Handmade Hero, where if the game is unable to successfully load an asset during runtime, It just keeps going with an empty asset instead of crashing.

Again, this will be a great talk to go back through and refresh because there was just so much information there. Also Pat offered to come on the Handmade Hero stream to talk more about network code, which will be awesome if it comes to fruition.

Jonathan Blow

So, if you have known me for a while, then at some point I will probably have talked to you about Braid or The Witness. Braid has been my favorite game for a while and is probably the only reason that I’m still working on games now instead of pursuing some other career option. It literally changed my life.

Naturally, it was an amazing opportunity for me to both hear from Jon at the conference, as well as to briefly introduce myself and talk to him before he grabbed some lunch. ( Hopefully I wasn’t too awkward. )

I feel like the discussion between Casey and Jon was almost a breather from all of the technical details of the earlier conference. As much as Casey tried to push Jon to talk about very concrete things, Jon still talked about stuff from mostly a high-level. Jon does love metaphors, even if perhaps sometimes that means that the point that he’s making can get a little bit lost on some people with less experience doing the type of game design that he does.

That may seem like a criticism of the talk, or of Jon in general, but it’s really only a response to what I heard from some of the other conference attendees. I highly enjoyed the discussion between Casey and Jon, and my personal nitpick criticism would be that there was a few times where Casey failed to ask for elaboration on certain things that were highly understood between the two of them but completely unintelligible to me (and presumably the rest of the audience). At the start of the discussion, Casey brought up this possibility, saying that he would try very hard to pretend to forget everything that he knows about Jon and his games. I think he did probably as good a job as could be done, but there was still a little bit of that conversational short-cutting that you do among friends and people that you know very well. I’m not really sure i would be capable of anything better with my close friends if I were asked to talk for an audience.

Overall it was great, as always, just to hear Jon talk about whatever comes to mind. In particular I liked that the talk ran over a little bit into the break for Jon to go on a rant. His point about the apparent lack of results despite the increased prevalence of university game design and programming courses is apt and quite damning.

I definitely geeked out about getting to see Jon in person, since he’s been such an important influence of mine. I’m super excited to play The Witness when it “probably” comes out on time next year.

Ron Gilbert

What can you say, Ron is the definition of a game industry legend. He created the point-and-click adventure game genre (which has recently seen a little bit of resurgence, after a long period of being possibly deservedly dead). Not only that, but in creating The Secret of Monkey Island, he perhaps created the best game the genre has ever seen. Of course, games are a collaborative art, and there was a team involved in making that game besides Ron, but by creating a strong technical foundation for the game–in a similar way to Tommy–he contributed an undeniable amount to the game design and what made the game feel great to play.

It was totally awesome to hear a perspective from someone who had been in the industry since before I was even born. To learn about the challenges and perks of dealing with a completely different set of technologies and tools for producing games. The live reloading of assets on the Commodore 64 was a particularly awesome tidbit to hear about, but also amusing was the fact that they manually encoded all of the walk box information by hand for way longer than was probably reasonable.

It was also cool to hear about Ron’s current project, Thimbleweed Park: how as much as it’s a nostalgia project for fans of Ron Gilbert’s early work, it’s also a way for Ron himself and the rest the team to recapture their own past. It was a reminder that, at the end of the day, the reason that we all program games is simply because we enjoy it. There really doesn’t always have to be a better reason. It’s easy for me to get wrapped up in the feeling that I always need to be pushing game design forward and I shouldn’t be living in the past or whatever, but I think sometimes it’s okay to feel comfortable with doing something that’s purely for self-indulgent reasons.

Conclusion

I haven’t been to any other conferences but I’ve certainly heard from people that have that this was one of the best if not the best that they’ve ever been to. I don’t doubt it. I thought it was amazing and there was not a single speaker that I would not have gladly listened to for another hour at least. The discussions were extremely enlightening and enthralling to watch. I had a great time and I definitely plan on going next year. I look forward to the next speaker lineup, as well as getting to see all of the great friends that I met once again.

P.S. Campfire BBQ was the greatest barbecue I’ve ever had in my life. No scratch that: it was the greatest meal I’ve ever had in my life. If you’re in Seattle, do yourself a goddamn service and go get some of that barbecue now.
Advertisements

Using Sublime Text 3 For Handmade Hero

Posted in Handmade Hero with tags , , , on November 25, 2014 by Matthew VanDevander

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:

C:\Windows\System32\cmd.exe /k w:\handmade\misc\shell.bat

Name it “cmd” or whatever you like.

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!