What I am looking for is some advice on possible implementations of a game engine that is able to handle many (100+) different entity types (e.g. Wrenches, Clothes, Wall segments, Grilles, Chairs, etc. etc.) and also efficiently allocate resources for many instances of that entity (50+).
Some context: I am programming a 2D tile-based map where each tile can hold a certain number of items with which the player can interact. Each entity has some properties which can be shared (e.g. a wrench and a cigarette can both be picked up) but differ in many other ways, and some entities can be interacted with whilst still on a tile (chairs can be sat upon, items placed on tables...).
I have looked into entity component systems and have tried looking at an implementation that would work, but the problems i would need to overcome to make such a system usable are:
- Per entity type data needs to be retained and not stored on each instance of that entity type (every single chair entity should not need to store a reference to it's texture, or a component stating that it can be wrenched to the floor)
- Actions that aren't greatly suited to the use of systems and better suited to a reactional/event based design (drinking, welding...)
So do any of you have suggestions for either ways to fix the above problems or alternative architectures that work better in these circumstances?
UPDATE:
Thank you for your contributions. A post below by me details the chosen implementation based on the answers above it that I deem satisfactory for the requirements of the game.