Hi. I’m studying UE and I have a question about the architecture of the game. We have 50 NPCs per 10 square meters. A lot. They have a Gene component. The gene stores the level of the gene, the generation number, and a mutation array. A mutation is essentially a change of npc’s skin (a couple of mash/material, plus the name of the mutation). We have more then 100 Mutations, a lot in general. Each new gene level gives a random mutation from a list of all mutations. How best to implement mutation storage and management in UE and how to refer to this structure/class/object from C++?
- A new Actor for every mutation is unnecessary. And Actors for rendering objects, right? We don’t need to spawn anything, we need just to keep information and manage it.
- Making a separate MutationManager Actor, which would store an array of all mutations as structures. But again, I don’t need to spawn it… It should somehow be embedded into the engine process and just store an array of structures and implement methods to work with that list. And the gen component will just call the right methods when it needs to.
- Player controller? But it has nothing to do with the player.
- The npc actor? Why would every npc need to store a huge array of all mutations, even if it’s just pointers to mutations or pointers to mash/material pairs? AI controller is the same. It’s create instance for each npc, lots of duplications.
- GameMode? I don’t think so… Game Mode for different things.
How to make it as optimized and logical as possible in terms of architecture, both the engine and the principles of OOP in general?
Sorry in case of mistakes in English. I’m not Native.