Live data from Hacker News

Many games are held together by duct tape

polygon.com

11–20 of 155 posts

Re: Many games are held together by duct tape

#12
I run a small MMORPG and I'm considering open-sourcing the whole thing but the code is a complete mess. The source code of VVVVVV is a work of art in comparison.

What holds me back are 1. I'm ashamed to reveal the monstrosity 2. I'm afraid the code is too messy for anyone to be able to make contributions 3. it will make it much easier for hackers to find exploits.

It's a shame because I think the game would be really cool as an open source project.

Re: Many games are held together by duct tape

#13
post #8
post #6

A friend of mine in gaming though had an insight I found illuminating. The difference with games though is that there’s often an element of “One and Done” in that unlike much of web development, the starting from scratch for the next generation is more of a given. There is less need for long term support as games are expected to meet its twilight much sooner. With web development however, it is a regular risk assessm…

A lot of games are receiving years or even decades of updates now though, such as minecraft, terraria, factorio, stardew valley, ... For better or worse, it's nice to get new features in games you love, but it were also great times when you knew a game was "it", when you finished, it was done, and there were no mandatory updates.

Minecraft was on the cusp of that change, and it's pretty telling how much of a hellscape the code was for years.

Re: Many games are held together by duct tape

#14
post #6

A friend of mine in gaming though had an insight I found illuminating. The difference with games though is that there’s often an element of “One and Done” in that unlike much of web development, the starting from scratch for the next generation is more of a given. There is less need for long term support as games are expected to meet its twilight much sooner. With web development however, it is a regular risk assessm…

The product I’m building since 15 years evolved from a 32 bit desktop app (with dependencies from the early 90s) into a heavier 64 bit desktop app 10 years (hundreds of man years) later, and further into cloud services that weren’t even a term when development started.

When you build something that will have new requirements in ten years, implemented by different developers, then you can motivate spending time on code hygiene.

For a game anything that won’t be in the next game you can duct tape. The parts that will go into hundreds of games over a decade is the “engine” and I suppose in that you’d find the same sort of discipline and hygiene as in any other long term code base.

Re: Many games are held together by duct tape

#15
post #12

I run a small MMORPG and I'm considering open-sourcing the whole thing but the code is a complete mess. The source code of VVVVVV is a work of art in comparison. What holds me back are 1. I'm ashamed to reveal the monstrosity 2. I'm afraid the code is too messy for anyone to be able to make contributions 3. it will make it much easier for hackers to find exploits. It's a shame because I think the game would be really…

Definitely open source it! The world needs more open source games!

Re: Many games are held together by duct tape

#16
post #3

To be fair,everybody in web development knows the same thing is true for the internet.

s/web/software/ s/internet/everything/ I can't tell you how many times I have to reteach myself this lesson. I'm not advocating for writing sloppy/bad code on purpose but I fall into the trap way too often of trying to make my code a work of art or overly-clever. No one cares, don't spend twice the time to try to abstract something within an inch of its life. Write working code and move on. Once you've done something…

Agreed, I think it's important to bear in mind the "time value of code".

Some code may very well be "set and forget" - you write it once and noone ever looks at it ever again. If a project is allocated 100 days, why invest even 1 of those refactoring and polishing code that really doesn't need it?

The difficulty, of course is knowing which code is 'set and forget' and which isn't. I usually avoid refactoring until you hit the same "how does this work again?" wall at least three times.

Re: Many games are held together by duct tape

#18
post #9
post #3

To be fair,everybody in web development knows the same thing is true for the internet.

And yet every time one starts a new project, we tell ourselves "this time I will do it better!" I just started a new big project. Wish me luck. It replaces something held together with duct tape and string concatenation in 5000 line files.

To be fair, you probably do a bit better this time around. Most likely not on most counts, but you probably internalized a few mistakes from last time and improved on those aspects. And come next project, you'll improve on a few more.

You'll do great!

Re: Many games are held together by duct tape

#19
I recently found myself trying to describe modern software techniques to a layman, who is a carpenter.

"Its like this - you're hired to build a house. First, you have to go get someone motivated to harvest the raw materials for you - designs, logic, etc. - which will then be turned into the 'raw wood' that holds up the walls and keeps the roof on. Then, when that person is busy getting the materials cut, you start building the tools you know you're going to need, to get the walls up and strung together. You don't have these tools yet, because you left all the previous ones you've worked with at a previous construction site. The reason for this is that you are going to use the tools to put the walls up, sure - but then you're going to glue all the tools in place to make sure the walls stay up. That glue is the most powerful stuff in the universe, but it will fail catastrophically if you don't put the tools at just the right angle in the glueball .."

Basically, you glue all the new tools together, cover them in wood, and leave them in place so that the thing doesn't fall over ...

Re: Many games are held together by duct tape

#20
Nit:

I wish people wouldn’t mention programming and computer science in the same essay, unless it’s something very technical such as discussing synchronization algorithms.

Most programming isn’t science. Most programming isn’t even engineering. Most programming is contracting or DIY tinkering.

We use ridiculous metaphors like constructing an airport, when most programmers are tradespeople working on renovations.

Have you ever inspected the work of a tract house builder? It’s awful and usually plays fast and loose with building codes.

When an indie teaches themselves to code, we get the same result as a homeowner teaching themselves to renovate. That’s not a bad thing, but nobody swapping ordinary outlets for outlets with USB-C ports is thinking about Maxwell’s equations.

Post reply on HN