Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Useful information of amethyst game engine


The coordinate system is +Y up, and the camera looks toward -Z


A component must be registered before used. It is registerd automatically in the setup function by the System trait. If, for any reason, the component is not yet used by any system, you can register it using the below code, and thus avoid panics.



To create a new primitive mesh is possible to use the following helper:

use amethyst::renderer::Shape;
 let sphere_mesh_data : types::MeshData = Shape::Sphere(32, 32)
                    .generate::<(Vec<Position>, Vec<Normal>, Vec<Tangent>, Vec<TexCoord>)>(None)

Is it also important to notice that to be visualized the mesh must have a valid material attached to it.


Is possible to Add, Remove, entities within the systems. Is also possible Remove or Add components to a particular entity inside a system.

Of curse is possible to do so even out of the systems, but an extra step is required. You must take the compoent Storages or use the below code:

WriteStorage::<Component>::fetch(&world).insert(entity, component)

Custom join filtering

Is possible to populate a BitSet with entity indices and use it to filter a storage. This is a good example on how do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment