365 points · by Smaug123 · 5y ago · 169 comments
[0]: https://web.archive.org/web/20120113030236/http://groups.csa...
Memory model
– Garbage collection should be the only option
an interesting position to see Sweeney take up, since so many people in games reflexively say that garbage collection is totally non-viable whenever it comes up.but he also says:
By 2009, game developers will face...
CPU’s with:
–20+ cores
MacBook Pros, Razer Blades, the XBox Series X, and the PS5 all use 8-core CPUs, so the prediction of an ever-escalating number of CPU cores seems to have not really panned out. One thing that has been majorly outside of these predictions is the dedicated ML chips like the M1's Neural Engine.The presentation isn't explicitly dated, but since the sample game is Gears of War, which came out in 2006, later on he says "by 2009" as if it was not-yet 2009, and the file name is "sweeney06games.pdf", gonna say this is almost certainly a presentation given in 2006. At the time this was given, the iPhone hadn't even come out yet.
It's an interesting presentation. I wonder what Sweeney would say today about this presentation, about how much of it still rings true, and about which things he would second-guess nowadays.
1. Completely deterministic, so no worrying about pauses or endlessly tweaking GC settings.
2. Manual ref counting is a pain, but again ARC basically makes all that tedious and error prone bookkeeping go away. As a developer I felt like I had to think about memory management in Obj C about as much as I did for garbage collected languages, namely very little.
3. True, you need to worry about stuff like ref cycles, but in my experience I had to worry about potential memory leaks in Obj C about the same as I did in Java. I.e. I've seen Java programs crash with OOMs because weak references weren't used when they were needed, and I've seen similar in Obj C.
The problem with GC or with reference counting is that it needs to operate on each allocated object separately. If the task for the GC can be reduced to operate on whole memory areas only, its overhead is greatly reduced.
There are no GC implementations that have no pauses. You couldn't make one without having prohibitively punitive barriers on at least one of reads and writes.
Try-with-resources is ok, but not great.
Ultimately developers, especially those concerned with performance, prefer full control. And that means deterministic lifetime of memory and resources.
They just see C++ and don't look into the details.
Besides that, given that most engines now have a scripting layer, even if deep down on the engine GC is forbidden, the layer above it, used by the game designers, will make use of it.
It is like fostering about C and C++ performance, while forgetting that 30 years ago, they weren't welcomed on game consoles, and on the 8/16 bit home micros for games.
My phone is more powerful than any Lisp Machine or Xerox PARC workstation, it can spare some GC cycles.
Speak for yourself; most phones I see still take 2+ seconds to open some apps.
As far as desktop goes, even fewer cycles can apparently be spared - IntelliJ frequently freezes for 5s just after startup, most applications have insane startup times considering the power they have.
So, no, I don't want to add yet another slowdown because "our machines are 1000x faster than high-end digital workstations from 30 years ago", because it seems to me that all off the increases in hardware power have already been used up, and more.
It seems like he was off by a matter of a few months at most.
I have a quad AMD Opteron(tm) Processor 6172 (Mar 2010) 2U server with 48 hardware cores. This motherboard can also take the 16 core CPU's which were also introduced the following year, which would put it at 64 cores and 128 threads.
The Opteron 6 core CPU's were introduced in June 2009, so a quad server would be 24 cores, or 48 threads.
Of course, that's not cores in a single CPU, if that's what even what the prediction was referring to, but that probably wouldn't matter very much from a gaming dev perspective anyway. It was probably a pretty good guess, all things considered.
That‘s not usually what people game on, though. Even today, 20 core CPUs are the exception for gaming rigs.
And of course none of these happened. GPU and CPU did not converged, they both scale far ahead than anyone could imagined.
I mean, if you ask developers in 2006, no one would thought of doing 4K rendering with HDR / 120fps and still not doing Ray Tracing.
You seem to forget the GPU, how may cores does that have? (but really the question is: isn't parallelism the default mode when working with GPUs.
Really made me see things clearer.
Haskell has a separate problem here: all of these can fail, and there's nothing in the type system to alert you of this (in the standard library), such failures just mindlessly throw exceptions like some Java monstrosity. In Rust, on the other hand, all such functions return something like Either Result Error, forcing the caller to check (and ideally handle) any errors. Not to mention async exceptions in Haskell, which can happen anywhere, and the fact that every value is really of type value|undefined, due to laziness. It's practically impossible to cleanly formally reason about code in Haskell due to the fact that anywhere could be interrupted by an async exception.
When even C++ is considering trying to remove exceptions from the standard library, Haskell's love for untyped exceptions everywhere is seriously behind the times for a language that prides itself on correctness.
Do those things come under the category of unsafe? Why would we be programming if it weren't to do those kinds of things? If I buy a shovel, at some point I'll probably want to dig a hole with it.
Verse is more intended for Blueprint people and there is no way people working on the Blueprint code will be able to move into functional programming.
Also I don’t get the investment into Verse language itself, why not just fund LuaJit, do we really need another scripting language when LUA nailed some many things right?
I guess Epic will craft a pretty fast scripting language and try to lock game developers to their own ecosystem.
Thanks for the keyword quote. Interesting topic as I felt Spreadsheet is very under-represented form of programming. Especially when trillions of dollars relies on Excel to function properly.
It doesn't have lambdas/closures. You have to create a whole separate object in a separate file to pass something new with data that can be called later.
This is basically what Erik Meijer did isn’t it? He worked at Microsoft and produced some really nice things that had a big impact, like reactive extensions for example.
CurrentRound^ : int = 0
for (i = 1..NumberOfRounds):
CurrentRound := i
if(!SetupPlayersAndSpawnPoints()?):
ShutdownGame()
return
else:
Players.PutAllInStasisAllowEmotes()
ResetMatch()
Looks nonfunctional as heck to me. Also it isn't expression-based - at least that's what the bare `return` says to me.Honestly just looks like a dialect of Python. I wonder what SPJ will do with it...
Feels like "the whole everything is looking old we got new keywords! Metaverse! We need new languages...".
The older I get the more I feel like languages are just as generational as developers come into the market. They don't want to write Java, even python is getting old. We need new fresh languages every 5-10 years which frankly just feels like the same walls with a fresh coat of paint.
Honestly, if anyone can solve that problem, SPJ can!
[1] self-described co-designer of Typescript - https://www.linkedin.com/in/steve-lucco-b5084958/
The way to beat Apple is to develop better technology than them. It will take billions of dollars to do this, but Epic has the money.
So far it seems like they sort of vaguely want to turn Fortnite into it... but I haven't really seen much that I would call concrete.
I always thought their Travis Scott event was a pretty good example of something you could call early metaverse-ish, going beyond the usual scope of the game
https://www.youtube.com/watch?v=xG9-6k3RYIU
Slide 46 and on (mentioned on 48) is largely metaverse and a bunch of stuff presaging the Apple lawsuit, even though Fortnite hadn't launched yet:
https://cdn.akamai.steamstatic.com/apps/steamdevdays/slides2...
Of course that requires protocol interop (as did the Internet with TCP/IP and HTTP) and who knows if it will happen for the Metaverse.
I'm pretty sure that's not how they see it. I think the vision is of the singular Metaverse as the new narrow waist upon which all future apps are built.
I think it's been pretty clear that they're going to work on their own metaverse products. Epic seems to build on Fortnite , while Meta have Horizon.
I don't believe either have stated compatibility as a goal.
https://tech.fb.com/connect-2021-our-vision-for-the-metavers...
https://www.epicgames.com/site/en-US/news/announcing-a-1-bil...
This sounds really interesting, I learned about STM in Haskell while working on Cardano & it seemed so obvious - I am sure there will be some seminal outcomes of this too.
[0] https://skookumscript.com/about/look/ [1] https://twitter.com/nephasto/status/1340046706642186247
Is Epic worse than Facebook? I can’t imagine much of an upside to praying on human frailties in order to make games addictive to extract money from kids.
What?
(Yes, I know you played Mario Brothers as a child and turned out fine. So did I. But the stuff we had back in the day is extremely tame and weak compared to the hard stuff they peddle today.)