Live data from Hacker News

Many games are held together by duct tape

polygon.com

51–60 of 155 posts

Re: Many games are held together by duct tape

#51
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…

I'm curious: Are you running it as full-time, or a side project? How much time does it take for maintenance in a month? Can you share a link?

Re: Many games are held together by duct tape

#52
post #40
post #3

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

Web Development is very different I feel. Web devs iterate on their product a lot more. A game is shipped. There is nothing after its shipped besides minor patches (if we ignore multiplayer online games) Web developers constantly need to fulfill new requirements so having a good level of code quality is important.

You might think so, but it really depends on the culture and philosophy of the company.

"Let's rewrite this old messy app in 'modern' technology" - sure it seems cleaner at first, but when you actually reach parity with the old app, you are likely about as messy.

I tend to think that a lot of the messiness in business apps is more due to the complexity of the business rules than the structure of the application.

Re: Many games are held together by duct tape

#53
post #49
post #41

Earlier quoted context omitted.

If there is any article that I absolutely hate it is 'Duplication is far cheaper than the wrong abstraction'. A somewhat minimal abstraction has very little chance of being wrong. And if it is wrong, is it really that difficult to know? It has a chance of needing some improvement, but what code does not have a chance of needing some improvement? If one goes the full monty and introduces three design patterns every ti…

> It is 100% opposite to what programmers need to hear. Maybe you know very different programmers than I have known, but if I had to compare what has been a bigger source of problems—missed abstractions, or abstractions that make things more difficult for no benefit, it's definitely bad abstractions almost every time.

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 ones. Duplication is in fact the best way to find the correct abstraction. The article makes this sound suspect but it really is not. The whole literature of design patterns is basically unneeded. If one just follows the path of deduplication one will discover all of them one by one and one will have applied the right one in the right place. Maybe there is some value in noticing that one still has to keep thinking and keep an eye on the likely future and not blindly do this but that is no more than a small footnote to the main message which is that you will find all the right abstractions by removing duplication. It is quite right that in TDD the refactor step is often described as the removal of duplication.

Re: Many games are held together by duct tape

#54

Earlier quoted context omitted.

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…

They break it into categories. 100%, Any%, glitched, glitchless, etc. To set a record with glitches doesn’t put you against people that run without them.

Yeah, to give some examples, [1] is a world-record ("WR") Hollow Knight Any% run with "No Major Glitches" ("NMG") completed in 33:07 just a few weeks ago. [2] is an Any% run that takes full advantage of glitches, and is over 10 minutes faster as a result (20:21 from November last year). [3] is an example of doing a complete 112% (i.e. getting everything that counts towards the regular completion percentage plus the DLC), and consequently takes over 3 hours. (That particular run was 3:23:34 from last June.) I mostly understand what's going on in the first -- a few minor bugs get used (like falling faster when the menu is open) and it takes advantage of things like changing the language to Chinese to skip text faster as well as quiting to the main menu to warp back to the last bench, but primarily the run depends on exploiting mechanics that are intentionally part of the regular gameplay but which allow the player to sequence break (like dying deliberately by the charm vendor to spawn your shade so that you can bounce off the shade while fighting it to get into the Resting Grounds quickly) and knowing exactly how to move to get through areas as fast as possible. For [2], I'm honestly not sure what is even going on for a lot of it. I think the speedrunner gets outside the level geometry by exploiting a bug with how loading works?

[1] https://www.youtube.com/watch?v=FFZy2gtwpI4

[2] https://www.youtube.com/watch?v=SAw-_uYhAlU

[3] https://www.youtube.com/watch?v=MCOmg5kpCM8

Re: Many games are held together by duct tape

#55
post #47

Earlier quoted context omitted.

Nit: Actually most programmers I know are vastly intellectually overqualified for their jobs. We are talking like science PhDs. It's not "tradespeople working on renovations" it's more like rocket surgeons making mud huts.

Sounds like they were mislead as to what their career prerequisites were. Or we're just churning out too many Phds

Specifically job requirements are incorrect. Which big companies have figured out and are hiring for cheap in China and India.

Re: Many games are held together by duct tape

#56
post #53
post #49

Earlier quoted context omitted.

> It is 100% opposite to what programmers need to hear. Maybe you know very different programmers than I have known, but if I had to compare what has been a bigger source of problems—missed abstractions, or abstractions that make things more difficult for no benefit, it's definitely bad abstractions almost every time.

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 duplication.

Wrong patterns are hard to actually change especially on change averse projects. The more widely used the wrong design is, the harder it is to change as the hacks on it multiply. Even worse if the wrong patterns (not code) are duplicated.

These require in depth rewrites to which bosses are usually allergic, which are very hard to pull off on bigger teams too. Incredibly hard to coordinate.

-- () https://wiki.c2.com/?RavioliCode - can happen in functional and structural code too.

Re: Many games are held together by duct tape

#58
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 cod…

> 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.

My employer, as well. We have three teams where the main code bases were started ~2001, when the company founded. One of these teams has code that started as Java applets that are now .NET Core. We have another ASP.NET system that they are currently migrating today. The other two teams, building Windows desktop applications, are now invested in web technologies, like browser engines and WebRTC on our A/V side.

I cut my teeth in the embedded industry, and we were supporting at least one product that I recall working on there that had code that had started in the early 90s.

It's incredible to think about. There was a nice thread yesterday that touched on this topic, as well. [0]

[0]: https://news.ycombinator.com/item?id=22042186

Re: Many games are held together by duct tape

#59
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…

Messy code that produces a valuable product is better than beautiful code that does nothing.

Re: Many games are held together by duct tape

#60

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 bu…

For the sake of anyone who uses your software, I hope you're better at writing code than coming up with metaphors.
Post reply on HN