Probably Dance

I can program and like games

How to make successful student games

I’m almost done with DigiPen. Time to write down some learned lessons. I was only at DigiPen for two years, so others could probably write this better, but until they do there is this post. In both years I was in the most successful game team of the Master’s program, which is my claim to being qualified to write this post. So here are a couple rules, starting with

1. Gameplay first

This is the first point on Blizzard’s mission statement, and they mean “prioritize gameplay.” Do that. But for student games I consider it even more important to interpret that as “work on gameplay first.” The biggest mistake I have seen on student games is wasting time on features that don’t improve gameplay in the end. You do not have time for a student game.

Now how do you finish gameplay first?  Obviously you need tech to do your gameplay. If you want to make a physics-based puzzle platformer, someone has to implement your physics. But I would consider it a mistake to work on the physics until you know that it will result in good gameplay. Which is a problem.

Read the rest of this entry »

Job hunting in the Games Industry

I’m finishing my Master’s degree and applying to companies to work for. I had few pieces of data to know how difficult the job hunt would be: 1. Most of last year’s Master’s students didn’t get the job they wanted. 2. I know a lot of artists that graduated from DigiPen that ended up being unemployed, or who do game testing.

So I played it safe and applied to every company that I could see myself working at. Which wasn’t an incredibly long list, but it turned out that it was more than I should have applied to. Because every single company that I started talking to turned from “I could see myself working there” to “I would love to work there.”

And it surprised me that that happened so repeatedly. Maybe it shouldn’t have, because this is after all the industry that I wanted to work in. But it seems like a lot of people these days have figured out how to run a good studio and there is an impressive amount of likable personalities. And now my biggest problem is that I have to turn down companies that I would like to work at, because I have to make a decision…

But yeah, I just wanted to post something short expressing my delight at learning that this is not just a pretty cool industry in my imagination, but actually.

Old Wisdom

I recently came across this article about 10 papers every programmer should read. Now I don’t necessarily agree with all of that list, but here is the important part: I am about to finish a Master’s degree in computer science, and I have never heard of any of those papers before.

That is a list of papers which are sometimes more than 40 years old. Some of these gave us the assumptions that are normal for us to make about programming these days. I learned programming in the past ten years, and I had to rediscover some of this knowledge myself. I have made mistakes in programming that should never have been made, because people had solved those problems years ago. And I still see people make those same mistakes that I’m now smugly smarter about.

So what is there to do about it?

Read the rest of this entry »

GDC bragging

Since I’m handing out business cards at GDC this year, people should at least be able to see my current project on this site. So here is a simple video of my teammate running through a level.

Our game is very much inspired by Mirror’s Edge. We are receiving positive feedback from playtesting, and I think we’ll be able to finish a good game by the end of the semester.

We are still learning a lot from player feedback and we will not be using this level. We are working on new content, and are just interrupted by everyone going to GDC. Our tools allow us to make new content rather quickly, and I am really proud of them. So here is a video of them:

Expensive Cheap Code

I was going to write a blog post about how to avoid a specific problem, until I realized that I should probably outline the problem first. I call this expensive cheap code, and I realize that the name is not a good name. It comes from buying the cheap version of something expensive.

When you buy something expensive, you do not want to get the cheap version. Because the cheap version will work, it just won’t work well. For example if you buy a big screen TV, but go for the cheap version, you may end up with a bad image quality that nags you every time that the colors are wrong. Or the image is stretched and you can’t unstretch without ruining all other channels. The right thing to do would be to get a new TV and get rid of the old one, but you don’t want to do that because even though it was the cheap model, it was still pretty expensive. And after all it only has small problems.

This is even more frustrating if you buy tools at the hardware shop. Since you probably don’t use your tools all that often, you will be frustrated for years with something that works, but doesn’t work well. And you don’t want to throw it away, because it works after all, and you don’t use it all that often.

Read the rest of this entry »

Code ownership

I’ve had some frustrations with code ownership recently. I did not have problems where someone broke something in code that they were not responsible for. I’ve found that people tend to be pretty careful about modifying code that they don’t often work with. Instead my problems have always been that someone doesn’t want other people to touch their code. And then you can’t fix even simple things because you have never looked at their code before and then if a small problem is holding you back, you have to wait at least a day for it to get fixed by whoever “owns” that code.

The simple way to solve that would be to say “everyone can modify any code” and I do like that idea a lot. But let’s see what other people say about code ownership. I’m going to use this post to collect my thoughts on code ownership.

Read the rest of this entry »

Towards less side-effects

C++ has very little protections against side effects in programming. You’ve got const and that’s about it. And const doesn’t survive through pointers so there’s nothing to stop you from modifying other objects as you please. I like things that stop you from making mistakes. So I thought about how to introduce more things that would make it more difficult to have side-effects in your programming.

I’ve found that you can reduce the side effects in your code by being careful about which pieces of code get dt, and by making all globals const, so that you have to manually pass non-const refs around and make them conscious decisions.

Read the rest of this entry »

A simple jump

Here at DigiPen people make a lot of platformers. And I see them getting the basic jump wrong over and over again.

It turns out that you can write a whole lot about the implementation of jumps in games (ideal jump height and speed, amount of air control, double jumps etc.) but in this post I’ll just explain how to start a jump, because this is where I see people repeating the same mistake: If you have stepped just one pixel too far over the edge of the platform before pressing space, you will fall to your death.

Fixing that is fairly simple.

Read the rest of this entry »

Loving std::unique_ptr

I am falling in love with std::unique_ptr.

It’s part of the new C++11 standard and is pretty much a smarter way of doing auto_ptr. The main difference is that you can not assign or copy it. Meaning it really is just a handle for a pointer that deletes it’s content when it gets destroyed.

Which doesn’t sound like much, but it will stop you from making so many mistakes. The benefit of it is that now you have a clear concept of who owns the content of the pointer.

Any time where you used to do

class Foo
{
    Base * member;
public:
    Foo() : member(new Derived()) {}
    ~Foo() { delete member; }
};

should just be replaced with

class Foo
{
    std::unique_ptr<Base> member;
public:
    Foo() : member(new Derived()) {}
};

Read the rest of this entry »

SSE2 in Visual Studio

So for some reason I thought I should be using SIMD in my student projects because it’s something that I should learn about, and I might as well do that when I’m not bothering other people with it.

It turns out that Visual Studio will hate you for it. It will hate you for using objects that have a specific alignment in memory.

The reason I’m writing this post is because I just had to write my most ingenious (not) workaround yet for getting a SSE2 class to work with Visual Studio:

class Vector4
{
    union {
        __m128 xyzw;
        struct { float x, y, z, w; };
    };
    /* ... */
#ifdef DEBUG
// for some reason visual studio sometimes copies a Vector4 to a non-aligned position
// in debug mode. which is illegal and crashes the game. it never uses that Vector4
// though, so just changing the copy constructor to not use SIMD is enough
inline Vector4(const Vector4 & other) : x(other.x), y(other.y), z(other.z), w(other.w) {}
#else
inline Vector4(const Vector4 & other) : xyzw(other.xyzw) {}
#endif

Read the rest of this entry »