7 ms·
Leaked Wipeout source code leads to near-total rewrite and remaster
- efields 3y ago> The 5000 lines of if else that handles the menu state is a striking witness to this insanity. > He takes the code from 40,699 lines to 7,731 and notably loved an excuse to work in C. “I had an absolute blast cleaning up this mess!” I't just marvelous to learn what kind of crap coding makes it to production. It's a huge boost to my self-esteem.
- rgoulter 3y agoThe risk of 'bad' code is that it might be hard to make the change you want. I would believe that spaghetti code is more likely to have bugs than 'well designed' code. When code is fresh in your mind, there's more tolerance for how disorganised the code can be and still be easy to change. If your shipping method is "one shot".. time spent cleaning it has a chance to provide value; but time spent adding features is very likely adds value. -- Probably if the code is very clean, then at least some time would have been better spent adding features.
- taeric 3y agoYou aren't wrong, but a lot of the risk of "good code" nowadays is that there is more of it. An added risk is a lot of "good code" is leaning heavily on practices that are not good for performance. I don't want to push for lax testing standards. And I generally prefer modern build practices for programming. It is hard to take a lot of criticism of gaming code seriously, though, as games were shipped at what feels like a higher success throughput than most business software.
- Pannoniae 3y ago"Bad" code also has way less abstractions. It's ridiculously easy to change something (unless it's really spaghetti/everything is intertwined) "Good" and modern code often has many abstractions. In some cases, that gives ultimate flexibility, but in some cases, if you are fighting the abstraction or the framework, it will make it almost impossible to change.
- ldjkfkdsjnv 3y agoI was going to post this, abstractions almost never work out well as the code base changes
- gopher_space 3y agoThe IRS isn’t going to get involved if your physics don’t match reality. Defining and creating your own data means you get to skip most of the headaches in business software development.
- taeric 3y agoNot a small point, but I think it is more than IRS concerns that have caused web bloat. Gmail taking seconds to respond to keyboard is definitely not explained away with business logic being hard. Is it?
- fidotron 3y agoIn games it happens quite a bit. The great debate is always "will I want to change this tiny thing here without impacting everything else?" vs DRY. Studio cultures differ, but I would say at least half resort to hard coding things like positions of every item manually given the excuse they might want to shift something by a bit later (in a hurry, crunching etc.) without side effects. Thankfully the emergence of more standard tooling and engines has pushed this to being more of an art resource concern, but it does lead to things like being told that taking a game that assumes a 16:9 1080P display and making it more flexible will take multiple years of person time. Personally I cannot stand this tendency, but do get why they do it.
- hinkley 3y agoYou can get pretty close to the end of a project before you really understand what it was you were trying to do. Especially if management is allowed to keep moving things on you. I think this is substantially the instinct that leads to Waterfall. I just want to know what I'm supposed to be building for a while before you 'ruin' it.
- tomcam 3y ago> You can get pretty close to the end of a project before you really understand what it was you were trying to do. Truer words were never spoken.
- holoduke 3y agoAlways impressed how some people possess the skill to plough through these kind of codebases. I wouldnt even know where to start. Yet alone find the time to execute these kind of projects. Although maybe I should remember my life before kids. Coding till 4 pm every day. Huge respect for this guy.
- nlunbeck 3y agoI know, right? I've spent the last 15 or so minutes just marveling at how nicely cleaned up it all is, I can only imagine how overwhelming it must've been to see the mess it was. Really shows what some extra time/budget could do for major studios releasing remasters.
- wredue 3y agoLook at it as a whole bunch of little problems instead of one big problem.
- ars 3y agoIt goes like this: You read a function and understand what it does. You scream at the original programmer (who was probably yourself) for being an utter idiot and doing it badly. Then you rewrite it better. Then you go to the next function, and realize it doesn't even need the previous function at all, so you get mad at yourself and delete all that wonderful code you just wrote. Then you try a new way: instead of inside out (start at the internal functions) you start at the top - you find where the code handles some particular task, and you drill down deep into it, throwing away useless code left and right and rewrite the thing better. (Your advantage being you know exactly what it needs to do, unlike your previous self who did not know that since he was still developing it.) You also use a tool that finds dead code - in particular functions that are never called by anything.
- bityard 3y agoBreaking big problems down into small ones is part of the process, yes, but only once you are well-versed in the problem space. The guy who rewrote this: 1. Is proficient in C. 2. Understands Playstation architecture and development better than the original programmers of the game. (Although Psygnosis had far less time and hindsight on their side.) 3. Is apparently quite familiar with 3D game programming and techniques in general, and how/when to use them. 4. Already had experience reverse-engineering parts of the game previously. 5. Had the free time to undertake a project of this scale. So it's not something any random dev can just snap their fingers and decide to do. It's a case study on the intersection of experience, preparation, and luck.
- TehShrike 3y agoReaders may prefer the original post by the programmer behind the rewrite: https://phoboslab.org/log/2023/08/rewriting-wipeout https://phoboslab.org/log/2023/08/rewriting-wipeout
- _a_a_a_ 3y agoI'm sorry, 6,000 FPS? How is that possible?
- deleted 3y ago[deleted]
- mmastrac 3y agoThe code was probably hyper-optimized for decade+ old hardware.
- db48x 3y agoNo, it wasn’t hyper–optimized, it just doesn’t draw many triangles or use many light sources. There is simply a lot less for the renderer to do than in a modern game.
- squeaky-clean 3y agoIt means it's calculating 6000 frames per second, but all of them don't need to make it to the screen. On a 60hz screen, every 100th frame calculated would actually be displayed. (If we assume a perfect 6000fps, the video shows fluctuations between 4000fps-7000fps. If you just mean how can it be so high in general? Old, well optimized, games run really well on faster modern hardware. I remember getting over 1,000 fps in Guild Wars 1 on a GTX 1060 when looking at an area with no monsters/NPCs. edit( this paragraph doesn't apply here) ~~The PS1 also doesn't have floating point math, mostly everything is done in fixed point with integer math which is obscenely fast compared to floating point (it could also simulate an FPU if the precision is absolutely necessary but that's not suitable for realtime)~~ Just read further down the article that they converted it to float. I guess the game is just super optimized. I would have thought fixed point savings factored in here.
- mbStavola 3y agoWipeout was great, but I always preferred playing Extreme-G on the N64. I know the source for the third game in the series was leaked, but I'm still waiting for the original!
- esaym 3y agoWhat is the backstory for this leak? Where was it found, etc.
- deleted 3y ago[deleted]
- 93po 3y agohttps://twitter.com/forestillusion/status/1508048268176990209 https://twitter.com/forestillusion/status/150804826817699020...
- ChrisArchitect 3y agoPrevious discussion from a few weeks ago: https://news.ycombinator.com/item?id=37082304 https://news.ycombinator.com/item?id=37082304
- bityard 3y agoThis is the third time it has made the front page in as many weeks. :)
- suby 3y agoThe refactored source code is really clean and readable. https://github.com/phoboslab/wipeout-rewrite https://github.com/phoboslab/wipeout-rewrite
- pengaru 3y agoThe numbers are somewhat artificially exaggerated since it sounds like the source leak contains what are effectively multiple platform-specific copies of the same game. That's a pretty common pattern when you're porting to a substantially different system, from a bespoke base like a small launch title, that was never intended to run on anything else. Especially in an era before everyone used vcs tools like git with cheap branches. We used to work on diverging whole copy forks constantly. Going through this mess and cleaning it all up must have felt incredibly satisfying because of all the low-hanging fruit. It's like a long overdue spring cleaning.
- blueboo 3y agoIs the gameplay of Wipeout actually any good? Always admired the aesthetics, and I love F-Zero GX, but… The bonking against sides, the short view distance induced by excessively-curved tracks makes it feel like the NES game RC Pro-Am, but instead of an tightly-cropped overhead view of the track, you see the next fifty feet of track ahead (at 1,000 scifimeters/sec). The game felt brute-forceable through its brittle, unforgiving driving but it was so frustrating I never gelled with it. Was I missing anything?
- Jare 3y agoIt's very good for its time, but also very harsh. It was polished to perfection in Wipeout 2/XL.
- standardly 3y agoA next-gen wipeout in VR would be incredible. And vomit inducing.
- jonhohle 3y agoNexter-gen than the wipEout Omega Collection on PSVR? While enjoying wipeOut, I could only handle a few races and went back to playing on a screen.
- Sohcahtoa82 3y agoYou might enjoy Redout: https://store.steampowered.com/app/517710/Redout_Enhanced_Edition/ https://store.steampowered.com/app/517710/Redout_Enhanced_Ed... Note that it's VR supported not VR required. You can play this without VR just fine.
- psychphysic 3y agoExcellent..more of this please. Super Mario 64 has also had stupendous rewrites from decompiled code I believe. https://youtu.be/t_rzYnXEQlE https://youtu.be/t_rzYnXEQlE His videos on the Sine function in sm64 is a fun watch as the limitations make nearly all optimizations justifiable.
- mjevans 3y ago"Either let it be, or shut this thing down and get a real remaster going." Solidly agree, copyright / IP shouldn't be about holding the public hostage. It should be about maximizing the mutual benefit for both the creator and, very importantly, the public. Culture deserves love and respect and must be 'accessible' (able to buy); or it should be set free (public domain).
- doublerabbit 3y agoAlso the game you see within Cyberdelia where Dade beats Kate
- enos_feedler 3y agomess with the best die like the rest
- justinlloyd 3y ago"The original menu “system” was… I don't even know. I never took a close look. It's 5000 lines of spaghetti for the main menu plus another 4000 or so for the in game menu, credits (without the actual text) and win/lose screens." "The 5000 lines of if else that handles the menu state is a striking witness to this insanity." I can say, quite confidently, that was probably some junior developer who built the shell. It is always some junior developer that builds the shell. And it was a designer/director that didn't know what they wanted until just prior to putting the gold master in an envelope to send to the pressing house. Also the shell is completely throw away code that will never, ever be used again in any other game. "Each time by a different set of developers that somehow had to make sense of this mess. The code still contains many of the remains of what came before. There was never any time to clean it up." Exec Producer at publisher: "Hi, here's $25,000, can you port Wipeout from this platform to that platform? We'll give you another $10,000 if can do it by this date, and another $25,000 three years later if the port sells so many bajillion copies. Desperate Studio Producer: "Absolutely can do that, let me find two cheap programmers to take care of that. Hey guys can you spend the next two months crunching like crazy with unpaid overtime to help me keep my boss happy and get that promotion? There will be a significant reward (a two pizza pizza party) if you can hit this release date." The two developers then spend an inordinate amount of time trying to get the damn project to build and find some obscure missing header files, layers on more hacks and ships in the 11th hour. And the rest is history. And nobody ever looks at the code ever again. Until the next poor programmer has to port it to a new platform.
- brokenmachine 3y agoIt's nice, but surprising, that Sony allows this.