Follow

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.

· · Web · 2 · 0 · 1

But I'm sick of repeated code. It's either that or have HUGE parent classes and honestly, I'm seeing more advantages of composition over inheritance.

@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

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

@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.