You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interested in trying to migrate a server authoritative tower defense game I made in bevy to Spacetime, and was curious if anyone has any material for how to reason about implementing game logic in Spacetime from an ECS?
I've seen the example repos, and how they use timers. But I'm struggling to grasp how, for example, one would handle multiple entities with a shared component. Like a player and mob both having a position/velocity to be ticked every 50ms or so. Do you just setup multiple timers like in the example? How do you mitigate duplicated code with many entity types? Do you foreign key and setup a position/velocity table?
Are there performance concerns in keeping all data structures an ECS would normally have in the DB, while using tables like individual components? like having an entity table with ids, then a velocity/position table with their relevant data and a foreign key into the entity table? Are there performance concerns for the big SQL joins you'd have to do to find all entities that share 5 or so components?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Interested in trying to migrate a server authoritative tower defense game I made in bevy to Spacetime, and was curious if anyone has any material for how to reason about implementing game logic in Spacetime from an ECS?
I've seen the example repos, and how they use timers. But I'm struggling to grasp how, for example, one would handle multiple entities with a shared component. Like a player and mob both having a position/velocity to be ticked every 50ms or so. Do you just setup multiple timers like in the example? How do you mitigate duplicated code with many entity types? Do you foreign key and setup a position/velocity table?
Are there performance concerns in keeping all data structures an ECS would normally have in the DB, while using tables like individual components? like having an entity table with ids, then a velocity/position table with their relevant data and a foreign key into the entity table? Are there performance concerns for the big SQL joins you'd have to do to find all entities that share 5 or so components?
Beta Was this translation helpful? Give feedback.
All reactions