geneotech
Joined 3 years ago
Karma
101
Submissions
11
Member since
Jun 25
Joined 3 years ago
struct player { components::transform transform; components::health health; };
struct box { components::transform transform; components::physics physics; };
Then my ECS simply holds a std::vector<player> and a std::vector<box> rather than having a vector per each type of component. I also use the integer identifiers like you describe but with a twist - there is one more indirection involved so that deleting from the vectors does not invalidate existing indices pointing to vector elements. It's still exactly O(1). See the section on the Memory pool in the game repo's README.
- I have done various gamedev jobs over the years, the most recent being gameplay programming for this minigame in PUBG: https://www.youtube.com/watch?v=tSP5P0QGWa4 I managed to successfully invest my savings too which let me focus entirely on Hypersomnia.
- Yes, I'd love to release on Steam before 2024.
- For now there is no persistent world at all, I just mentioned it as a teaser for where the game might be heading if it becomes successful.
- Rebuilding the physics should not at all shift positions. What is rebuilt is merely the "hot state" like contacts and trees - the only moment where hot state matters is during the process of advancing the simulation from one state to the next, it does not influence how state is later rendered etc. The only impact on the existing players could be a single framerate drop in case the physics world to be rebuilt is massive, but in practice all our maps are still rather small, best suited for 3v3 matches.