Live data from Hacker News

Many games are held together by duct tape

polygon.com

91–100 of 155 posts

Re: Many games are held together by duct tape

#91
post #26

When you are making a game, priority number one is always that you are indeed making a game, and not how. (substitute "game" for anything you want to do) I love elegant code, but in the end it's never _more_ important than the game itself.

Sure this goes if you're a one man team. But the more people share hacky code it quickly can turn into a nightmare to work with.

Re: Many games are held together by duct tape

#92

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't code defensively, often a simple mis-input breaks the game. A common pattern in many speed runs is finding some glitch through a door, and then the game logic kicks in and says "you are past this door, so you must have got the key…

Thanks to Breath of the Wild, I've recently enjoyed watching a few speedruns and it's amazing to see the number of glitches in BoTW. Check this out https://www.youtube.com/watch?v=JEtHpCfi_DE I also don't understand how anyone can accept speedrunning through glitches as a world record, but I guess if everyone does the same run with similar or the same glitches then it's fair? Seems like it just becomes a race to know…

For some extra context here, the "100%/any%" thing comes from Metroid, which would give you a percentage score at the end of the game. So "any%" came to mean "literally anything goes, get to the end of the game." This culture has carried over to games that don't explicitly tell you how much of the game you've completed.

Re: Many games are held together by duct tape

#93

Wow a 3440 line switch statement for processing game state! https://github.com/TerryCavanagh/VVVVVV/blob/master/desktop_...

The giant switch statement doesn't bother me that much. It's essentially just a big table at that point.

What would drive me nuts are the lack of symbols for each case. At least there's a comment for many of them.

Re: Many games are held together by duct tape

#94
post #67

Ex-Game dev here: shipped many titles on console (AAA and some zzz titles). 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 'not so best practices' (in order to ship faster...) they will find someone to do it and you could be out of a job.…

What does BUDs stand for?

https://en.wikipedia.org/wiki/United_States_Navy_SEAL_select...

Basic Underwater Demolition/SEAL (BUD/S) Training

Re: Many games are held together by duct tape

#95
post #71

Earlier quoted context omitted.

During the Hotline: Miami run this year the runner mentioned that on certain GPUs the game would crash unavoidably after 25 minutes due to a memory leak, and that if you wanted to increase the FPS you could plug in more mice. None of that precluded it from being a great game, though. https://youtu.be/aPnobTZfnfU

> and that if you wanted to increase the FPS you could plug in more mice I am having trouble imagining what sort of event handling bs this might be taking advantage of... I am too vanilla a coder at this point in my life.

I'm not a game dev, but rough guess: the framerate is artificially limited to some 'sane' range by the equivalent of a short sleep() which is cancelled by an input event. More devices, more events, more chance to prompt the next frame early?

Re: Many games are held together by duct tape

#96

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]. [1] https://www.theguardian.com/technology/2017/nov/29/macos-hig... [2] https://www.cnet.com/news/dropbox-confirms-security-glitch-n... [3] https://www.fastcompany.com/28121/they-write-right-stuff

I think you may not realize how many bugs NASA programmers are making. For instance, see the fairly simple mistake made on Deep Impact spacecraft: https://en.wikipedia.org/wiki/Deep_Impact_(spacecraft)#Conta... There are no doubt more, that don't cause the loss of an entire spacecraft.

Every time I see "Deep Impact" in the context of NASA I end up thinking of the Climate Orbiter; where, due to an issue with unit conversion between metric and SI they turned it into the most expensive lawn dart to ever leave the solar system.

Re: Many games are held together by duct tape

#98

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…

The field is called computer "science" and maybe that creates expectations. But from experience I know that almost all engineering professions put on their pants one leg at a time. There is certainly a large difference between theoretical and applied physicists and computer science lacks this discrimination, but engineering is often about cutting corners where nobody takes a closer look. If a colleague of mine calcul…

As someone that's gotten their degrees in Electrical & Computer Engineering I can whole-heartedly agree that this extends to even most engineering degrees; it's why we have EIT & PE grades, and the PE needs to sign off on anything that the company could get sued over.

The PE is essentially the safety valve that has both the education (usually also needs a minimum of a Masters Degree) and the experience (at least 5 years in industry) to say "this design isn't hot garbage." And even with that safety valve in place we get unmitigated disasters like the Tacoma Narrows Bridge or the Challenger explosion - which coincidentally are case studies in almost every engineering ethics class and at least one of our design classes at the undergraduate level. And that's just covering the big disasters, there's hundreds of thousands of projects out there that are also held together with duct-tape and bailing twine that passed a PE's stamp of approval.

Working for the DoD I saw all sorts of hacks from the engineering department to get custom hardware working to replace 60 year old CoTs products that have been out of production for 30 years but are necessary for things like missile and torpedo guidance.

Re: Many games are held together by duct tape

#99
post #53

Earlier quoted context omitted.

Well, I worked for quite some time in a code base that was basically one big ball of missed abstractions. Maybe I was traumatized a bit by that. I also have seen wrong abstractions, but not because there should not be an abstraction. If people had actually written abstractions that removed duplication instead of the ones that they half-understood from the design pattern book, they would have had come up with better o…

You have not worked on bad enough code base. Duplication is a problem as the different implementations inevitably drift and get repeated bugs, but simple reduplication results in the rather known problem of RavioliCode( ) of thousands low cohesion functions. Which ends up unreadable thus bug prone and slow to develop. Use of the right patterns or rather paradigms reduces amount of code in general, thus reducing dupli…

'You have not worked on bad enough code base.'

You know, it is a bit pretentious to read a few sentences that someone wrote and then conclude a lot about what they know or do not know.

And I actually do know what ravioli code is. I think ravioli code is mostly a good thing. Also the people on the c2.com page are not uniformly negative about it. Not all code should be ravioli code but in a project with complex requirements there should be quite a bit of ravioli code. It is true that ravioli code is not easy to understand if you are a newcomer to a project but really if the context is 'a project with complex requirements' why would anyone think that it is easy to get into, no matter how it is written?

Another thing is that ravioli code absolutely needs automated tests.

'This style maximizes maintainability by old hands at the expense of comprehensibility by newcomers.' Maintainability is exactly what I want maximized. It sounds a bit bad if there are no developers that are there for a long time. But in that case you are cooked anyway, I would say.

Re: Many games are held together by duct tape

#100
post #32

Earlier quoted context omitted.

Could you take pride in rewriting the code? Maybe as an open source adventure with others? Going through the shame of showing it off is more valuable on its own merits than leaving it as is, regardless of the code quality or social outcomes.

I believe that as code "writers", we tend to have a bias that code should well-written. And I don't think it is that important. If you are working in a global company with a distributed workforce, well-written code is mandatory because it is a way to communicate and to maintain the code in the long term. Even more so if this is a critical code that could kill. But if you started as a lone developer for a game hobby p…

If I could upvote this x100, I would.
Post reply on HN