Let’s get started with some rendering and ECS using hecs and ggez.
Firstly let’s get positioning out of the way, as we’re using a 2D world we can simply create a position component, using Vec2 a from glam using the newtype pattern as follows:
#[derive(Debug)]
pub struct Position(Vec2);
Almost any rust type can be component in hecs, The reason why ECS is so powerful though is we can access all entities with specific component/s through systems, So for example we can query all “position” components to render entities at that specific position!