I've tried to make games in my spare time before. Working in Bevy is the first time I've made actual progress on my projects.<p>There's something about the way the ECS framework is designed that just <i>works</i>. In particular the way the "systems" part of the ECS is automagically generated from regular old rust functions is just brilliant to me.<p>Aside from the ECS stuff, the WASM support is something else I'm pretty happy with (shout out to mrk-its for their help here). I can compile my game for native when I'm working on it locally, then when I want to show it off I can just `aws s3 cp` it up to a bucket and have people try it out in their browsers. The performance is still great there.
From the getting started tutorial,[1] I notice that (certain) functions appear to have the method "system" added to them. For example:<p>> Note the hello_world.system() function call. This is a "trait extension method" that converts the hello_world function into the System type. ...<p>Later follows an example where a function previously defined as add_people appears to have a method called "system", allowing expressions like this:<p><pre><code> add_people.system()
</code></pre>
I don't see any macros on the function definitions, so where does this come from. Also, what's the purpose of adding the system method to functions?<p>[1] <a href="https://bevyengine.org/learn/book/getting-started/ecs/" rel="nofollow">https://bevyengine.org/learn/book/getting-started/ecs/</a>