Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hidden Gems of Everyday Game Development with C#

Hidden Gems of Everyday Game Development with C#

Hidden Gems of Everyday
Game Development with C#

8b750470b6ef921635bf62c4a8ffff1f?s=128

Andrea Magnorsky

December 05, 2013
Tweet

More Decks by Andrea Magnorsky

Other Decks in Technology

Transcript

  1. Hidden Gems of Everyday Game Development with C# Andrea Magnorsky

    @silverspoon roundcrisis.com
  2. None
  3. The humble Game Loop

  4. Hello Dovahkiin

  5. None
  6. Delegates, func, etc

  7. Don’t use linq

  8. Coroutines “Coroutines are computer program components that generalize subroutines to

    allow multiple entry points for suspending and resuming execution at certain locations”
  9. Why?

  10. _changePositionCoroutine.MoveNext()

  11. Iterator

  12. Multi threaded rendering • Double buffer • Triple buffer •

    Concurrent Collections • Jobs and workers
  13. Renderer waiting for render commands Update Frame 1 Wait for

    renderer to switch buffers Swap buffers Double Buffer
  14. Renderer waiting for render commands Update Frame 1 Draw Frame

    1 Update Frame 2 Wait for renderer to switch buffers Draw Frame 2 Wait for renderer to switch buffers Renderer waiting for render commands Swap buffers Swap buffers
  15. Renderer waiting for render commands Update Frame 1 Draw Frame

    1 Update Frame 2 Wait for renderer to switch buffers Draw Frame 2 Wait for renderer to switch buffers Update Frame 3 Blocked until rendering finished Draw Frame 3 Renderer waiting for render commands Swap buffers Swap buffers Swap buffers Wait for renderer to switch buffers
  16. None
  17. None
  18. Why

  19. Using concurrent Queue instead and Blocking Collection

  20. Analysis

  21. Comparision Double buffer Concurrent Queue

  22. None
  23. Thanks  More to read http://bitly.com/bundles/roundcrisis/3 Andrea Magnorsky @silverspoon roundcrisis.com

    batcatgames.com