Sorry for the delay! I just wanted to make this video quickly before I put my head down and add more things to the game. I'm still not ready to share the exact premise of the game (I promise it's not a top down adventure game) but *hopefully* I'll be able to release a prototype for anyone who wants to check it out within the next handful of videos. Thanks again for sticking around :)
An outstanding video as always! I have a question, in your ecs library i'm seeing a lot of `.ForEach` and stuff inside can you show in way how did you accomplish that? and I don't just mean code side, since there has to be some decisions made performance wise Cheers :D
Thank you! From a code perspective: It's all available in the description! But for performance, every time I add/remove a component, the entity is sorted into a sparse set that groups entities with similar components, and the for each just iterates and returns each of the entity's components in the relevant groups as a parameter in the ForEach function (Went more indepth about some decisions in the last video). It's flexible but definitely still a lot of room for improvement though!
Very nice. I would just suggest not using std::unordered_map inside your components, because that class uses heap memory which will ruin cache coherency in your systems. Since Actions is an enum, just make a special value Actions::COUNT as the last value, and make Cooldown::data a fixed-size array with size equal to Actions::COUNT.
This is in my own engine which uses a fixed timestep on physics; so I pass in the fixed timestep as deltatime. Maybe it would be better for me to rename it to fixedDeltaTime for clarity
I had heard it was your own engine, but since most engines implement standard DT and fixed DT, a lot of bugs can be generated by using the incorrect one If there is a possibility of you wanting a non-fixed dt in the future, future you may appreciate the clarification 👍