~/talk

Why I reimplemented Trio in a game engine

Talkat PyCon US 2022 · 2022-04-27..05-03· [python]
links:none on file
slides:none on file

Reimplemented Trio-style structured concurrency inside the Wasabi2D game engine and actually ships games using it, claiming it simplifies game logic by making lifetimes explicit and cleanup automatic. Uses async functions, nurseries and cancellation scopes plus event objects to spawn enemy waves, bullets and iris doors; cancellation throws into every task and collapses a task tree so explosions and cleanup run reliably. Scheduler favors earliest-created tasks and time is frame-discrete rather than continuous; the Pi Week infinite-waves demo works and reduced state-bug headaches.

AI-written summary · about

  1. 0:00A Standard PyGame Tutorial
  2. 0:24Hard-coded game loop
  3. 0:55Scenegraph
  4. 1:51Taking the concurrent view
  5. 2:45Update functions do busy work
  6. 3:10Coroutines to the rescue!
  7. 4:41Unity Game Engine
  8. 5:38Scratch has implicit coroutines
  9. 6:54Subtasks are launched through nurseries
  10. 8:55Asyncio Task Group arriving in 3.11
  11. 10:43Enemies that come in waves
  12. 11:28Each ship is a bundle of tasks
  13. 12:11Awaiting input
  14. 14:26Outer cancellation implies inner cancellation
  15. 18:24Event Objects
  16. 19:05Synchronisation using events
  17. 20:04Event loops
  18. 22:18Discrete vs continuous time
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.