Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Why I Reimplemented Trio in a Game Engine

PyCon US via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the implementation of Trio-like structured concurrency in a game engine through this PyCon US talk. Discover how Daniel Pope reimplemented Trio concepts in Wasabi2D, simplifying game logic tasks and making concurrent programs easier to reason about. Learn about concurrency in video games, structured concurrency with game logic examples, and parallels between I/O-based concurrency tasks and those in video games. Gain insights into writing games in Wasabi2D and compare the differences between Wasabi2D and Trio's implementation of structured concurrency concepts. Understand which elements are foundational to structured concurrency and which are specific to Trio's problem space. Dive into topics such as coroutines, nurseries, task groups, event objects, and the differences between discrete and continuous time in game development.

Syllabus

A Standard PyGame Tutorial
Hard-coded game loop
Scenegraph
Taking the concurrent view
Update functions do busy work
Coroutines to the rescue!
Unity Game Engine
Scratch has implicit coroutines
Subtasks are launched through nurseries
Asyncio Task Group arriving in 3.11
Enemies that come in waves
Each ship is a bundle of tasks
Awaiting input
Outer cancellation implies inner cancellation
Event Objects
Synchronisation using events
Event loops
Discrete vs continuous time

Taught by

PyCon US

Reviews

Start your review of Why I Reimplemented Trio in a Game Engine

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.