Hacker News new | ask | show | jobs
by insraq 1946 days ago
I've written some learnings after shipped my first game: https://ruoyusun.com/2018/06/15/guide-for-non-game-dev.html

As a professional software dev, I've noticed that while both game dev and software dev are "writing code", they are done in a very different way.

As a software dev, the value proposition is more or less clear before you start writing code. As a game dev, you can only start to see your value proposition after you have finished your code - that's why game code, especially as an indie without clear distinction between prototype and production phase, tend to become spaghetti really quick - and that's fine. If you spend too much time to make the code look nice, then you are not spending enough time to make the game actually fun.

Software usually has some logic behind it - it has to make "sense". A game doesn't necessarily have to make sense - it needs to "feel right" and "fun". That means your nicely designed abstractions actually won't be reusable - copy & paste is much more pragmatic. You can start to look to refactor after your game is actually successful (or fun at least) but even then you will realize that most of the code is not reusable.

A big part of your game code is actually "content", instead of "systems" - meaning they are closer to a "script" than a well architectured software code. So you write more if-else and less inheritance and encapsulation (unless you are writing your own engine, then in that case, your engine code is actually close to software projects).

And if you hate writing UI for software, you'll hate writing UI for games even more.

2 comments

As a professional software dev who has approached gamedev a few times, I finally realized it was a theater stage and not a simulation. Every time I tried to start a game I wanted to make a simulation. I dove into graphics more, I realized it was all puppets and cutouts on a string, not some grand design.
That’s a good way of putting it.

The best graphics abstractions allow artists to pretend they’re working with just another pencil or brush. To them, it should be as non technical as possible. Without tools a perfectly functional physics system is useless since it’s only simulation. There’s no content.

You’ve effectively created a new world for the artist to operate in, but have given them nothing to use. “You need a stage to act? Well there’s a tree over there...”

They’re really good at technique and learning things, but they tend to build the work around those techniques and limitations. The tools you give them focuses their energy in the places you want. The absolute best graphics programmers get this too, and it can all end up a creative and cohesive show if done properly. There are many games that intentionally limit the art in some way to create a theme. A way to get a bunch of artists in the same creative space.

The actors work together with the crew and backstage in the best shows. And that’s a game. A tight dance between the artists and technicians. Personally that’s where my love for it comes. Putting on a good show is hella fun. And artists respect tech. They may not get it, but they always respect it. Unlike business.

When you’re alone you have to do the same dance.

I’ve written UIs for various platforms/targets including “UI frameworks” for a games engine and wow you’re not wrong. Made me beg to build web UIs again.