Honestly, the entity component design pattern is just the strategy pattern but for video games, but I'm not sure how efficient it is to store objects by giving them IDs and storing them in a hashmap. At that point, you are treating game objects like entries in a SQL database.

@xianc78 quite, apparently. when processing you walk a linear array of the live components and everything crams in to cache better than expected. Boliz has a talk about thisn in overwatch. also old articles on Our Machinery
Follow

@icedquinn I normally don't store objects in arrays. I use lists/vectors.

· · Web · 1 · 0 · 0
@xianc78 a lot of object IDs are indexes in to segmented arrays/banks
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.