Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing Bevy's "foreach" function systems #42

Closed
cart opened this issue Jun 25, 2020 · 1 comment
Closed

Consider removing Bevy's "foreach" function systems #42

cart opened this issue Jun 25, 2020 · 1 comment

Comments

@cart
Copy link
Member

cart commented Jun 25, 2020

From what I can tell, they are incompatible with legion's new lifetimes. Additionally, they add a significant amount of cold compile time (over 20 seconds).

Its a shame because they are so ergonomic:

// foreach system from the ECS Guide
fn score_system(player: Com<Player>, mut score: ComMut<Score>) {
    let scored_a_point = random::<bool>();
    if scored_a_point {
        score.value += 1;
        println!(
            "{} scored a point! Their score is: {}",
            player.name, score.value
        );
    } else {
        println!(
            "{} did not score a point! Their score is: {}",
            player.name, score.value
        );
    }

    // this game isn't very fun is it :)
}
@cart
Copy link
Member Author

cart commented Jul 11, 2020

fortunately we can have our cake and eat it too thanks to the port to hecs/bevy_ecs. we can have foreach systems and reasonable compile times

@cart cart closed this as completed Jul 11, 2020
pcwalton pushed a commit to pcwalton/bevy that referenced this issue Aug 30, 2021
…ctive

Fix for bevyengine#41. support physics_pipeline_active false in all cases.
tychedelia pushed a commit to tychedelia/bevy that referenced this issue Nov 23, 2024
in wasm, errors are printed to the console.
This can gives something like:
```
ERROR crates/bevy_render/src/render_resource/pipeline_cache.rs:812 failed to process shader:
�[0m�[1m�[38;5;9merror�[0m�[1m: expected ']', found '32'�[0m
   �[0m�[34m┌─�[0m crates/bevy_pbr/src/render/mesh.wgsl:69:82
   �[0m�[34m│�[0m
�[0m�[34m69�[0m �[0m�[34m│�[0m     var model = bevy_pbr::mesh_bindings::mesh[0u�[0m�[31m32�[0m].model;
   �[0m�[34m│�[0m                                                                                  �[0m�[31m^^�[0m �[0m�[31mexpected ']'�[0m
   �[0m�[34m│�[0m
   �[0m�[34m=�[0m expected ']', found '32'
```

This PR disable term colors in wasm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant