Managing Complexity with Systems

Systems are a special type of function that queries the ECS for data and performs operations with the results. An ECS game may have a lot of systems (my Nox Futura project has over a hundred systems). Systems can run concurrently and are managed by a Scheduler. Legion builds a schedule by examining the systems you give to it, and determines data dependencies between them. Many systems can read data at once, but only a single system can safely write to it. The order in which you present systems is also considered: Legion will run systems in the order in which they are presented, unless they can be grouped together to run concurrently. The good news is that you usually don’t need to worry too much about this—Legion ...

Get Hands-on Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.