Beyond Framerate: Taming Your Timeslice Through Asynchrony

Sdílet
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.

Komentáře • 26

  • @think2086
    @think2086 Před 5 lety +16

    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.

  • @henke37
    @henke37 Před 5 lety +16

    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.

  • @hucancode9
    @hucancode9 Před 5 lety +7

    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.

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety

      there haven't been many advances in software since the '70

  • @sosasees
    @sosasees Před 5 lety +2

    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.

  • @NunSuperior
    @NunSuperior Před 5 lety +8

    Sound people want real-time physically-based audio reflections for every positional audio source and listener. And Boba tea.

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety +2

      are you saying this as if they're asking for too much?

  • @gamesdisk
    @gamesdisk Před 5 lety +16

    That old fella at the start man. ahah

    • @mandisaw
      @mandisaw Před 5 lety +2

      Pretty sure that was Dave Mark, AI summit "Team Dad"

  • @tomgcolemangoplayer
    @tomgcolemangoplayer Před 5 lety +2

    Love the animated diagrams, great content, pronunciation of semaphores was distracting.

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety

      wait until you hear how it's pronounced in it original language...

  • @oopsy444
    @oopsy444 Před 5 lety

    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

    • @noobingame9291
      @noobingame9291 Před 5 lety

      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

    • @mandisaw
      @mandisaw Před 5 lety

      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.

    • @mandisaw
      @mandisaw Před 5 lety

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

    • @vegitoblue2187
      @vegitoblue2187 Před 3 lety

      async function calling is possible in both but not via visual scripting in the vanilla engine

  • @adama7752
    @adama7752 Před 5 lety

    what it I told you Neo, there is no frame...

  • @cacheman
    @cacheman Před 5 lety

    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.

    • @loled123
      @loled123 Před 5 lety +1

      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.

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety +1

      what do you mean "precise semantics" ?

  • @GeorgeTsiros
    @GeorgeTsiros Před 5 lety

    i'm at 11:37 ... let me guess... the idea will be a lightweight vm or bytecode execution engine

  • @GeorgeTsiros
    @GeorgeTsiros Před 5 lety

    ... but what if the character in the game IS a robot and its reaction times ARE sub millisec?? 🤔

    • @mgeorgescu
      @mgeorgescu Před 5 lety

      huh?

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety

      @@mgeorgescu hm?

    • @__nobody__
      @__nobody__ Před 5 lety +3

      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.

    • @GeorgeTsiros
      @GeorgeTsiros Před 5 lety

      @@__nobody__ it was more of a joke, really