Beyond Framerate: Taming Your Timeslice Through Asynchrony
Vložit
- čas přidán 7. 09. 2024
- In this 2017 GDC session, Havok's Ben Sunshine-Hill describes how to implement an asynchronous task processing system which can smooth CPU spikes, leverage idle cores, and guarantee an exact processing time limit for their AI step allowing programmers to still use complex and long-running AI computation in a real-time video game without compromising simulation quality.
Register for GDC: ubm.io/2yWXW38
Join the GDC mailing list: www.gdconf.com/...
Follow GDC on Twitter: / official_gdc
GDC talks cover a range of developmental topics including game design, programming, audio, visual arts, business management, production, online games, and much more. We post a fresh GDC video every day. Subscribe to the channel to stay on top of regular updates, and check out GDC Vault for thousands of more in-depth talks from our archives.
This talk was seriously the BEST I have ever heard on these topics. Your explanations were clear, well-written, and accompanied by perfectly self-evident diagrams: not too complicated, nicely spaced, etc.
Thank you! I hope you give more talks about these kinds of things. You're teaching style is very very good.
Don't worry about the sound people. They have a dedicated thread. Or even an entire dsp core. They don't need to care about this at all.
I like this guy. Every struggle I've been through, he's been through. Turned out that my naive timing method is called "manual slicing", I thought I was the only one would do that haha.
there haven't been many advances in software since the '70
It makes very much sense that most of AI has a bit of extra time before it has to know what to do.
Living animals like us also have to think a little before they finished deciding what to do.
Sound people want real-time physically-based audio reflections for every positional audio source and listener. And Boba tea.
are you saying this as if they're asking for too much?
That old fella at the start man. ahah
Pretty sure that was Dave Mark, AI summit "Team Dad"
Love the animated diagrams, great content, pronunciation of semaphores was distracting.
wait until you hear how it's pronounced in it original language...
Can I even do this in unity or unreal? I've never even heard of half of these terms in regards to programming semaphore, affinities, etc. I've got a bunch of googling to do
And yea you can do this on Unity. If you truly wanna take full advantage of what the CPU can do, you might wanna check out their Data-Oriented Technology Stack (DOTS) unity.com/dots
This is low-level "understand how processors *really* work" stuff. It's not so much dependent on your game engine, as that it relies on a deeper understanding of the interplay between software and hardware than most devs acquire these days (even many CS students, sadly). But you can definitely learn - start with a decent book/chapter on multithreaded and parallel programming, read up on the processor architecture of your platform(s) of choice, and then start experimenting with something small and easily broken/repaired.
@REGALPALADIN Generally, yeah, let the engine folks handle the implementation details. But it is still important/useful at times to understand just what is going on "under the hood", especially if you're trying to eke out more resources for a specific purpose (heavy AI computation, here).
async function calling is possible in both but not via visual scripting in the vanilla engine
what it I told you Neo, there is no frame...
20:53 Having your (user-space) production code rely on the precise semantics of RDTSC, given its history, seems like a possible timebomb waiting to go off. Caveat emptor.
Well, he do spend the rest of the presentation on that exact issue.
But he isn't explicit to give a proper warning. I.e its too time expensive for full usage, and it needs to be profiled to avoid massive performance pitfalls.
On top of several possible legacy issues.
what do you mean "precise semantics" ?
i'm at 11:37 ... let me guess... the idea will be a lightweight vm or bytecode execution engine
... but what if the character in the game IS a robot and its reaction times ARE sub millisec?? 🤔
huh?
@@mgeorgescu hm?
Then the stoopid hooman playing the thing still ain't gonna notice…
But if you seriously want to have immediate answers, maybe go with (very approximate) probability distributions on likely actions? Computing the whole plan may take a while, it may even be uncertain whether you have to turn left or right, but if it seems likely that the goal is reachable at all, then you can be pretty confident that you'll have to start moving first… so just start that animation, and then use that time to compute more of the plan.
@@__nobody__ it was more of a joke, really