bevyengine / bevyengine/bevy

Add a system ordering example

Open
#10,247 2 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Docs C-Examples
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## How can Bevy's documentation be improved?

Beginners often struggle to get a cohesive view of how system ordering works in Bevy.

The [`ecs_guide` example](https://github.com/bevyengine/bevy/blob/main/examples/ecs/ecs_guide.rs) is surprisingly good for this, but that's hard to discover.

We want to cover all of the tools talked about [here](https://discord.com/channels/691052431525675048/742569353878437978/1161446623294017707):

> So, there are 4 main tools for scheduling systems in Bevy. I'm going to go in order of complexity:
>
> Put you systems in a tuple and then call .chain on them. They will run in the order listed. Very straightforward, but limited to code in the same place and linear orderings.
> Use explicit system ordering like avoidance.after(set_velocity). This will do exactly what it says, as long as they're both in the same schedule.
> Add your systems to a system set like set_velocity.in_set(VelocityManagement) and then use system ordering like avoidance.after(VelocityManagement). Great for modularity and preserving a tightly scoped public API.
> Change which schedule you're adding the systems to. Useful if you need to carefully order things relative to Bevy's built-in systems, or are working with Commands. 90% of the time though, your systems should all just be in either Update (very easy!) or FixedUpdate (if you care about networking or framerate independence).

Contributor guide

Open the contributing guide

Research direction

Start with the linked examples/ecs/ecs_guide.rs example and the referenced discussion about system ordering. Check how the documentation currently presents scheduling, then add a cohesive example covering tuples with chain, explicit ordering, system sets, and schedule choice. Done means beginners can find and understand all four approaches.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.