[][src]Module rust_action_heroes::component

Putting the C in ECS!

Components are pieces of data attached to an entity which we reference in systems. They allow us to think about systems in terms of "how do things with X interact with Y" instead of "how does a X interact with a Y".

Components are a huge part of data-driven design in games and are super powerful!

Some components are just flags, like "This entity is a key", while others contain data and methods, like "This has a position in space and can be moved in these directions".

This game is relatively small, so I haven't seen much of this, but components also allow you to design a game with interesting rules and allows you to "discover" emergent properties of those how those rules interact.

Modules

door
exit
holding
immovable
key
lock
movable
named
position
switch