Entity Rewrite Possibilities
#2
How about this:

Single class, cEntity. Contains fields for plugging "subsystems" - a subsystem for pathfinding, a subsystem for physics, a subsystem for handling interactions, a subsystem dictating the graphical look of the entity, a subsystem for handling sounds, etc. Basically what your interaction functions do, I'd put into a subsystem (an interface, a class with virtual functions, descendants implement actual behavior). Each of these subsystems can also load and save specific NBT data; only the subsystem knows what NBT data it can load or save.
Each cEntity also has a dictionary / hashmap for storing custom values.
Reply
Thanks given by:


Messages In This Thread
Entity Rewrite Possibilities - by Lazauya - 04-06-2020, 08:29 AM
RE: Entity Rewrite Possibilities - by xoft - 04-06-2020, 07:27 PM
RE: Entity Rewrite Possibilities - by Lazauya - 04-07-2020, 06:34 AM
RE: Entity Rewrite Possibilities - by Lazauya - 04-09-2020, 06:35 AM
RE: Entity Rewrite Possibilities - by xoft - 04-12-2020, 12:51 AM



Users browsing this thread: 1 Guest(s)