ucsd-cse125-sp24 / group5

A character-based ability shooter 2v2 heavily inspired by Four Seasons
https://cse125.ucsd.edu/2024/cse125g5
6 stars 0 forks source link

Adding ECS framework #11

Closed realmatthewpeng closed 2 months ago

realmatthewpeng commented 2 months ago

nvm client still segfaulting on my machine

realmatthewpeng commented 2 months ago

I figured it out. Not a code logic issue. Just needed to change file paths to models and it worked.

realmatthewpeng commented 2 months ago

@Melody-Ruth https://austinmorlan.com/posts/entity_component_system/#the-system

Theoretically, if we follow "true" ECS, the World should not be responsible for updating state. Instead, this should be implemented through different Systems, such as movement system, collision system, health system, etc. The benefit I guess is in our final game loop, we wouldn't have a bunch of function calls like: { detectCollision(); performMovement(); updateHealth(); } but rather, a loop through all the systems stored in the world with a call to update() on each. I think using Systems would be more challenging to set up, but easier to extend. In any case we should discuss which direction is more suited for our purposes.

Alanine42 commented 2 months ago

Looks good. I will add some changes to eliminate data duplication (--my old arrays) and embrace ECS.