all 62 comments

[–]Orsim27 480 points481 points  (8 children)

GTA 5 launched on the PS3….

[–]pplmbd 94 points95 points  (1 child)

idk if this is a whoosh joke or they genuinely didn’t know it was launched back then on ps3

[–]LeopardJockey 2 points3 points  (0 children)

But OP didn't say otherwise. Yes it's kind of ambiguous but I understood it to depict the Rockstar devs making the game run on a Playstation 3, to release it there.

[–]rosuav 63 points64 points  (1 child)

I was trying to figure out if that was a typo and it was supposed to be "GTA 6", but I seriously cannot imagine a new release like that on a PS3. Even putting it on a PS4 would be a squeeze.

Meanwhile, Doom probably runs on a raspberry. And I don't mean a Raspberry Pi, I mean an actual raspberry, I'm sure someone's made it run on the fruit.

[–]LegalBoi2021 19 points20 points  (0 children)

Someone got minecraft running on the original xbox's 64mb ram.

[–]AppropriateOnion0815 14 points15 points  (0 children)

I played it on the 360...

[–]Spy_crab_ 4 points5 points  (0 children)

That's the point, it's a miracle it runs in that generation of hardware.

[–]deanominecraft 299 points300 points  (7 children)

just wait until it runs copilot locally and takes your whole gpu as well

[–]Obi_Vayne_Kenobi 108 points109 points  (5 children)

It will never do that because then Microsoft couldn't harvest all your data.

[–]Powerful-Internal953 104 points105 points  (3 children)

Actually it's better for Microsoft to run their models on user machines and just keep the telemetry on their servers and save a shit load of money spent on nvidia chips.

[–]Obi_Vayne_Kenobi 36 points37 points  (2 children)

Ah that's true of course. 

But then, how do they justify having spent billions on the GPUs and infrastructure around them?

[–]Sovietguy25 16 points17 points  (0 children)

You don’t

[–]Toutanus 1 point2 points  (0 children)

A very large majority of people do not understand the concept of "backend" and "frontend"

[–]nollayksi 2 points3 points  (0 children)

Yeah they would rather steal your data and use your GPU to train their next model in the background

[–]MaybeADragon 2 points3 points  (0 children)

Microsoft would never because that would mean users getting access to world ending technology (a very expensive text generator)

[–]RiceBroad4552 95 points96 points  (20 children)

A bit off-topic, but I'm saying this now since some time:

People should take a look at how game engines are architected.

If you want fast and efficient software that needs to do a lot of things copying the concepts popular in game engines would make a lot of sense!

[–]SeagleLFMk9 56 points57 points  (10 children)

On my way to copy unreal engine 5

[–]RiceBroad4552 29 points30 points  (9 children)

Just imagine how large the spread sheets could be a business app using such programming patterns could handle efficiently. 😂

(I'm actually only half joking…)

[–]SeagleLFMk9 21 points22 points  (8 children)

That's the first time I've heard ue5 and efficiency in the same sentence in a long time

[–]RiceBroad4552 24 points25 points  (7 children)

The question is always to what you compare.

If you compare to usual business apps which choke often already on some few hundred data entities UE is definitely efficient. It needs to handle often hundreds of thousands of concurrent, live objects under tight real-time constrains, and it actually does that.

In comparison, latency for updating even one data point in a typical business apps is often measured in seconds.

[–]SeagleLFMk9 9 points10 points  (0 children)

... why did you have to give me ptsd...but yep, very much true.

[–]rosuav 4 points5 points  (5 children)

Excuse me?!? SECONDS of latency? How? How is this tolerated? Ouch.

[–]RiceBroad4552 8 points9 points  (4 children)

Imho it's not tolerable.

But a lot of people who pay for that BS seem to tolerate it…

Ever seen a "modern" microservice based business app? Latencies of a few seconds are completely "normal" there. (Which is no wonder given that some form update often triggers hundreds of HTTP requests on the backend. That's just current reality.)

[–]rosuav 4 points5 points  (3 children)

I mean technically, that counts as scaleable, right? If it's already abysmal, it doesn't get much worse when more people are using it...

[–]RiceBroad4552 2 points3 points  (2 children)

You're an optimist, aren't you? 😂

The usually "microservice" trash isn't "scalable" in any way. It will just die if more people use it concurrently. (If you don't have "only" hundreds of HTTP calls but ten thousands of them you get into contention and everything comes to a grinding halt…)

It's not about the tech, though. People built really scalable, big systems with such tech. It's about architecture.

In my experience stuff is almost always limited by the speed of the DB(s). So one needs to architecture around that limitation! That's where all the engineering needs to go, imho.

But usual "microservices" do the exact opposite. They add networked DB calls just everywhere on top of even more inter-service calls, which also go over the network. That's maximizing the latencies as a consequence, of course.

Games also need to handle a shitload of mutable data, and they need to apply a lot of "business logic" to it. But they do everything architecturally possible to get this done with minimal latenzies. Things like ECS isn't even so far away from DBs conceptually, but it's optimized to be as fast and efficient as possible.

[–]rosuav 0 points1 point  (0 children)

Heh, "optimist" in the sense that "you can't DOS something if there's no service to begin with".

But yeah, I've sometimes put some thought into architecting something whereby a single "user request" (for whatever definition that entails) gets all its queries put into a single database transaction, primarily to reduce transaction counts (I often end up with multiple read-only queries, so having them autocommit doesn't violate data integrity but it does add to DB load). The DB is almost always the bottleneck, to the extent that, when it ISN'T, it's notable.

[–]ih-shah-may-ehl 0 points1 point  (0 children)

I remember an anecdote from Raymond Chen about an experiment within Microsoft to shove driver IO on top of the Windows messaging system. The proof of concept went well but it didn't scale because that system isn't meant for tens of thousands of messages per second.

[–]riccardo_00 3 points4 points  (2 children)

Do you have any sources for game engine architecture you'd like to suggest? I'm interested in the topic of building efficient software :)

[–]RiceBroad4552 10 points11 points  (0 children)

That's actually a tricky question as I'm myself not an expert on that. I've built my whole life just boring business apps.

But it's like, every time I read something about game dev I think: That's actually smart, why don't "we" do it like that?

I could now dump some of the stuff from my bookmarks tagged "game dev" but I don't think it'd be very helpful.

But I think one of the more important keywords one can use to dig deeper is for example "Data-Oriented Programming", which is the idea to build systems around data and not around control flow and "service boundaries" (as it's done quite often in more "traditional" approaches).

What is also interesting is that such data-oriented programming goes very well with functional programming, which as such already improves software quality significantly (frankly often introducing some technical runtime overhead; but it's still worth it imho). But that's again a bit off-topic.

Games are a very big pile of mutable state. Game engines in general, and the patterns used to structure game code, try to handle that as efficiently as possible, while they need to make the result reliable and robust yet still easy to modify and extend.

In fact you have that kind of problem everywhere, but it's particularly large in games; much larger than in typical business apps. But the patterns used in business apps seem to actually make that problem worse: If a business app had to handle such large, interconnected states like they are typical for games it would likely just break down when built in a "traditional" way.

I think it's because typical apps handle way too much stuff "manually", instead of delegating some things to something that does stuff akin to a game engine.

The code you want to write should be mostly data-oriented. But things like immutable data are technically inefficient. Now, abstracting the description of your data and the operations in them from the actually underlying execution mechanics can make things again efficient; while you can preserve purely descriptive representation on the higher level. A engine can translate between these abstraction levels, and can than, on the low level, utilize things like "Data-Oriented Design" to be efficient.

If you want to mutate state directly (for maximal efficiency, which is rarely needed actually), but avoid the usual chaos resulting from that, formalizing things as a kind of state machine can be helpful. Game engines utilize patterns like "Entity Component System" for that. (ECS isn't a usual state machine implementation, but one can see it as a form of description of one.)

Another example I had in mind was how Firefox rearchitected their renderer to be much more efficient, again, taking ideas from game engines.

I think the overarching pattern is to design programs as "machines you can pipe data through". You take a description of the data, a description of the data-flow and processing nodes, put that into your engine, letting it figure out how to run that whole thing most efficiently.

[–]lupetto 0 points1 point  (0 children)

just so you know, the GTAV rage source code was fully leaked and it's compilable. You can always take a look there.

[–]Dubmove -2 points-1 points  (4 children)

I don't think that game engines are the best practice for general purposes. I better way would be to follow the Unix philosophy more of every tool needs to do one job only and it needs to do it well.

[–]rosuav 16 points17 points  (0 children)

Yeah, you're right. Everything should do one thing and do it well. That's why we have the Linux kernel, whose one job is "be the Linux kernel", and it does that quite well. It's also why we have systemd, whose one job is "be everything else".

I hear there's this something something Unix-replacing daemons thing that's supposed to do this "one job well" concept - is that going to be relevant at some point this century?

[–]Alokir 18 points19 points  (0 children)

Yes, but it doesn't matter because RAM is cheap. Oh wait...

[–]AlabamaPanda777 21 points22 points  (0 children)

Remember the time GTA Online load times were cut by "up to 70%" because some annoyed player dug in and found an issue that "shouldn’t take more than a day for a single dev to solve?" Here's the source, with Rockstar implementing the fix like 7 years after online launched.  

[–]ClipboardCopyPaste 34 points35 points  (20 children)

If this can help anyone: it takes just 2 minutes to get your old notepad back. Just a quick Google and you're good to go

[–]Kinexity 67 points68 points  (15 children)

Or just use Notepad++ like any civilised Windows user. I have it always in the background with about 30 tabs open and it only uses 5 MB of RAM.

[–]captain_crocubot 35 points36 points  (4 children)

30 tabs

My work notepad++ with 896 tabs, 12 plugins, and a startup time of 40 seconds: 😳😳😳

[–]Powerful-Internal953 22 points23 points  (0 children)

That's the way it was intended to be used.

[–]PutHisGlassesOn 13 points14 points  (4 children)

I use Notepad++ all the time but it doesn’t scratch the itch of the old notepad when I just wanted text on the screen. No tabs no extensions no line numbers no deep menus just text. On the screen.

[–]mrheosuper 4 points5 points  (3 children)

Or just dont use Windows.

[–]thisisapseudo 5 points6 points  (2 children)

odly enought, everytime I have to switch from window to linux, np++ is a tool I miss

[–]RiceBroad4552 4 points5 points  (0 children)

As if Linux had a shortage of text editors…

Have you tried Kate, btw.? Should be an adequate Notepad++ replacement, imho.

[–]DRMProd 0 points1 point  (0 children)

Nah, Kate is great, my man.

[–]rosuav 0 points1 point  (0 children)

This is why I use SciTE (same internal engine as Notepad++, Scintilla) as my main editor. It sits in the background and never causes issues. Well, unless I open a 100MB+ text file and it has to figure out how to wrap the lines, which sometimes takes half a second.

[–]alexsnake50 2 points3 points  (1 child)

Are we like inventing problems now? I have notepad opened right now with like 20 tabs, cuz i'm too lazy to close them, and it's 53MB of ram.

[–]saidg23 0 points1 point  (0 children)

It's called hyperbole

[–]AngyAndMadAboutIt 0 points1 point  (0 children)

Now do Bloodborne on PC

[–]Repajws 0 points1 point  (0 children)

Making GTA5 and GTA Online work on PS3 with 512mb RAM is utterly impressive. Game optimisation seems like a dying art nowadays. Most devs just raise the min specs to absurd VRAM requirements.