TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Many games are held together by duct tape

120 pointsby misotaurover 5 years ago

29 comments

rlayton2over 5 years ago
Watching speed runners play through games is a great way to visualise not only this aspect (that games are flimsy at best), but to visualise the same practice in any software - if you don&#x27;t code defensively, often a simple mis-input breaks the game.<p>A common pattern in many speed runs is finding some glitch through a door, and then the game logic kicks in and says &quot;you are past this door, so you must have got the key&quot;.<p>If you are curious, watch the five or so minutes of this speedrun: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;0Ct8n1CClUM?t=3072" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;0Ct8n1CClUM?t=3072</a> First, the player jumps through a game world, getting to a race he shouldn&#x27;t be able to get to yet. Second, he glitches into the &quot;solid&quot; wall, which is just a thin wall around the racetrack.
评论 #22055579 未加载
评论 #22053908 未加载
评论 #22053658 未加载
kelvin0over 5 years ago
Ex-Game dev here: shipped many titles on console (AAA and some zzz titles).<p>When comes time to shipping a game, the crunches, pressure and overall stress is through the roof. Most everything goes at that point: duct tape, hot glue, bobby pins and toad spit. And if you disagree with management over these &#x27;not so best practices&#x27; (in order to ship faster...) they will find someone to do it and you could be out of a job.<p>That being said I would not trade my time in that industry for anything else. It&#x27;s basically the BUDs of programming (of course I&#x27;m biased)<p>Good times!
评论 #22057145 未加载
评论 #22056379 未加载
评论 #22056578 未加载
评论 #22055901 未加载
评论 #22057004 未加载
评论 #22056511 未加载
hopfogover 5 years ago
I run a small MMORPG and I&#x27;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.<p>What holds me back are 1. I&#x27;m ashamed to reveal the monstrosity 2. I&#x27;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.<p>It&#x27;s a shame because I think the game would be really cool as an open source project.
评论 #22053595 未加载
评论 #22055245 未加载
评论 #22053400 未加载
评论 #22055495 未加载
评论 #22053625 未加载
评论 #22054245 未加载
评论 #22055541 未加载
评论 #22053765 未加载
评论 #22055631 未加载
评论 #22055526 未加载
angarg12over 5 years ago
Anyone working in the industry knows that the fact that software works at all is flabbergasting.
CoolGuySteveover 5 years ago
As a counterpoint, the Quake -&gt; Quake 2 -&gt; Quake 3 original open source releases are remarkably clean. Quake 2 in particular is very minimalist and the game was developed in something like 10 months.<p>Granted, it&#x27;s not really fair to compare anyone to the id software team of the time. But the requirements of the Quake series, basically a BSP renderer that is easy to modify and extend, probably forces it to be extensible and clean.
评论 #22056554 未加载
评论 #22058998 未加载
评论 #22056493 未加载
whytakaover 5 years ago
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 assessment and there must be a true meeting of minds to decide that a rewrite is worth it.
评论 #22053385 未加载
评论 #22053279 未加载
评论 #22053289 未加载
评论 #22053643 未加载
phnover 5 years ago
I think code quality is important, and big studios make a buck on having clean and workable code they keep improving over time.<p>That being said, and especially on indie games like VVVVVV, hammering in a cool little detail gives the final product much more value than having clean code.<p>That&#x27;s why big engines with mature coding patterns sometimes are not the way to go to make a cool little thing. Making novel mechanics (e.g. time reversal in Braid, or the super tight controls of Super Meat Boy) with an existing engine, while possible, would probably be a PITA.<p>The &quot;hackability&quot; of the engine you use can allow you to be more creative, even if a bit messy to maintain.<p>Back in the days of flash, I&#x27;d probably use a simple display list engine (flixel comes to mind) to do the heavy lifting, and hack away with those basic building blocks.<p>Nowadays, I was surprised by the relative hackability you get with godot[0], while still being able to tap into what you can call a mature engine. If you like to make small games, you owe it to yourself to check it out.<p>[0]: <a href="https:&#x2F;&#x2F;godotengine.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;godotengine.org&#x2F;</a>
Cthulhu_over 5 years ago
Writing hacky code can be liberating though. I really enjoyed hacking together things in the pico-8 last year. Globals? Fine. Neat function names? Nah. Variable names? &#x27;a&#x27; will do.
seanalltogetherover 5 years ago
Wow a 3440 line switch statement for processing game state!<p><a href="https:&#x2F;&#x2F;github.com&#x2F;TerryCavanagh&#x2F;VVVVVV&#x2F;blob&#x2F;master&#x2F;desktop_version&#x2F;src&#x2F;Game.cpp#L605" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TerryCavanagh&#x2F;VVVVVV&#x2F;blob&#x2F;master&#x2F;desktop_...</a>
评论 #22056842 未加载
评论 #22055962 未加载
评论 #22056186 未加载
评论 #22056107 未加载
_defover 5 years ago
When you are making a game, priority number one is always that you are indeed making a game, and not how.<p>(substitute &quot;game&quot; for anything you want to do)<p>I love elegant code, but in the end it&#x27;s never _more_ important than the game itself.
评论 #22055949 未加载
crypticaover 5 years ago
This is very true. I created an open source framework to help developers build scalable real-time systems and I tried to focus on multiplayer games at one point; I thought it would be a good idea to ride the wave of web-based multiplayer .io games by targeting those developers but I ended up realizing that they&#x27;re better off just using raw WebSockets. My framework could only help in terms of producing the initial prototype.<p>The profit margins on ad-sponsored web-based multiplayer games are paper thin. They don&#x27;t care about code structure or cleanliness at all. If someone can make fugly code that performs 10% better, that can make the difference between a profit or a loss or it can mean doubling profits&#x2F;earnings from the game.<p>This is very different from most software businesses where even a solution that performs 10x worse is still acceptable if it makes for cleaner code that is easier to maintain and can handle changing requirements better.<p>Micro-optimizations and clean code are mutually exclusive IMO. Like for example, people may be tempted to send JSON objects with nice descriptive properties like &#x27;direction&#x27;, &#x27;keyCode&#x27;, etc... But in the end it&#x27;s faster to just send a raw string or binary packet without any property names; just pass raw integers directly in a certain order and the receiver decodes the message assuming a certain order. This is extremely inflexible at the protocol level but it performs really well (I.e. you can&#x27;t easily add new properties later or make some of them optional without breaking the current protocol).
benologistover 5 years ago
Games, websites, and everything else - both Apple [1] and Dropbox [2] got passwords wrong in the last decade. I am in awe of the NASA programmers who have virtually no bugs [3].<p>[1] <a href="https:&#x2F;&#x2F;www.theguardian.com&#x2F;technology&#x2F;2017&#x2F;nov&#x2F;29&#x2F;macos-high-sierra-bug-apple-mac-unlock-blank-password-security-flaw" rel="nofollow">https:&#x2F;&#x2F;www.theguardian.com&#x2F;technology&#x2F;2017&#x2F;nov&#x2F;29&#x2F;macos-hig...</a><p>[2] <a href="https:&#x2F;&#x2F;www.cnet.com&#x2F;news&#x2F;dropbox-confirms-security-glitch-no-password-required&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.cnet.com&#x2F;news&#x2F;dropbox-confirms-security-glitch-n...</a><p>[3] <a href="https:&#x2F;&#x2F;www.fastcompany.com&#x2F;28121&#x2F;they-write-right-stuff" rel="nofollow">https:&#x2F;&#x2F;www.fastcompany.com&#x2F;28121&#x2F;they-write-right-stuff</a>
评论 #22055831 未加载
ChikkaChiChiover 5 years ago
I&#x27;m sure there are oodles of creators out there who hold back their source code because they don&#x27;t want to deal with being shamed. We should be using these opportunities to learn and grow together, and not as a soundboard to feel good about how much better we are than someone else.
rgloverover 5 years ago
Someone posted this talk by Johnathan Blow on a story a week or two ago and it seems worth sharing here:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=pW-SOdj4Kkk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=pW-SOdj4Kkk</a>
this_is_not_youover 5 years ago
I&#x27;ve never thought about it but it makes a lot of sense. Just thinking about the few times I had to write some hacky code to get something to work and given the complexity of video games it is kind of expected.
huffmsaover 5 years ago
This I what made the 1990s era games so full of non-critical bugs AKA &quot;glitches&quot;.<p>The ceiling of complexity was raised waaaay over that of the previous generation of tech, but the techniques used by developers didn&#x27;t advance nearly as far.<p>So you have a lot of <i>if this value == this number, load this scene</i> (OoT) or <i>if this value is greater than this limit, cycle it back to the lowest possible value of the range</i> (Civ, Nuclear Ghandi)<p>Now, bugs in big games tend to be critical crashes because the tooling and techniques have standardized and caught up to the complexity ceiling
rafaelvascoover 5 years ago
It&#x27;s interesting to see how duct taping a game inside out can result in absolute success once you ship something valuable. It can be really thrilling and you can get away with it specially if you&#x27;re working alone, which for me is the best work. It&#x27;s another story entirely if you&#x27;re on a team, coding together a product that must be maintained and improved for years. I work on both sides, and I can say that I only have real fun when I&#x27;m coding alone. Though learning to work in team is a great skill as well. I&#x27;m specially careful with code architecture and readability, but sometimes when you&#x27;re on the flow, the zone, the code just flows as well;
tluyben2over 5 years ago
So is almost every other piece of software. I would like to see an analysis of commercial closed source software on how many of then use good practices, have clean code etc. Not the ones that filled in the [] we y use TDD in the CIO monthly questionnaire. Maybe I meet the wrong companies I have to work or integrate with, but in my experience it is not very far from 0% (but it is &gt;0 luckily). I met one company last week who do everything right, but only for projects over 500k where over 10% goes into those practices, otherwise there is simply no money for the overhead...
uncle_jover 5 years ago
The code sample they have there that is &quot;messy&quot; doesn&#x27;t look that bad to me. The reality is that almost all the code that runs lots of important things is a complete spagetti.
kenover 5 years ago
&gt; “Games aren’t just an ordinary piece of software, they are a complex beast that require many different disciplines to successfully ship, and often on timelines that require sacrifices to be made,” said game developer ...<p>Is this any different from any other type of software? What is this &quot;ordinary&quot; software that doesn&#x27;t require different disciplines, or have timelines?
评论 #22078055 未加载
jayd16over 5 years ago
The real differentiation to games from most other software is just how little correctness actually matters. It arguably doesn&#x27;t matter at all as long as it doesn&#x27;t produce feel bad moments lost items or lost progress.
hawskiover 5 years ago
If AIs of today make a heap of code (if you say it&#x27;s data, I say data is code is data) that is really a spaghetti of a code that happens to seemingly achieve a goal, maybe game developers are already a bit like that ;)
cr0shover 5 years ago
VVVVVV&#x27;s code is still better than the source code of Descent - holy hell, was that codebase a mess in areas, and virtually no comments in the complex parts of the 3D engine...
dangover 5 years ago
Related from a few days ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22011358" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22011358</a>
mylonsover 5 years ago
change games to software
braythwaytover 5 years ago
Nit:<p>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.<p>Most programming isn’t science. Most programming isn’t even engineering. Most programming is contracting or DIY tinkering.<p>We use ridiculous metaphors like constructing an airport, when most programmers are tradespeople working on renovations.<p>Have you ever inspected the work of a tract house builder? It’s awful and usually plays fast and loose with building codes.<p>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.
评论 #22053664 未加载
评论 #22053702 未加载
评论 #22053988 未加载
评论 #22053673 未加载
misotaurover 5 years ago
To be fair,everybody in web development knows the same thing is true for the internet.
评论 #22046390 未加载
评论 #22053319 未加载
评论 #22053786 未加载
评论 #22055467 未加载
评论 #22053408 未加载
ipythonover 5 years ago
“Perfect is the enemy of the good” applies to computer programs just as much as anything else.
somesortofsystmover 5 years ago
I recently found myself trying to describe modern software techniques to a layman, who is a carpenter.<p>&quot;Its like this - you&#x27;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 &#x27;raw wood&#x27; 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&#x27;re going to need, to get the walls up and strung together. You don&#x27;t have these tools yet, because you left all the previous ones you&#x27;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&#x27;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&#x27;t put the tools at just the right angle in the glueball ..&quot;<p>Basically, you glue all the new tools together, cover them in wood, and leave them in place so that the thing doesn&#x27;t fall over ...
评论 #22055304 未加载
评论 #22055329 未加载
评论 #22056189 未加载