"Best" is pretty subjective. Not being a professional game developer, I cannot fully answer your question, but I heard about game engines based on components and (functional) jet engines. There is also the possibility of using a hierarchy of entities, as described, for example, "Develop your hierarchy" , but from what I have seen, this is discarded in favor of component engines.
Hierarchical: Use inheritance to provide functionality (“Develop your hierarchy”) shows an example of a subclass of Car Vehicle , which is subclassed by Moveable with subclasses of Entity ). As described, the problem is to decide where the functionality should be placed: if you put it higher in the inheritance tree, it burdens the subclasses with functionality that cannot be used; it's too low, and you end up duplicating / refactoring the code to get the functionality where you need it.
Component: each game object / object is a composition of "components" that provide reusable specific functions, such as animation / movement, response to physics, activation by the player, etc. "Component design of the game engine," another SO question, describes it in detail and provides links to documents, etc., that should help.
(Functional) reactive: Often studied in the context of functional languages such as Haskell. As I understand it, the central concept is first-class time-varying values, and the behavior is described in terms of these values and other building blocks, such as events for representing discrete events. "What is functional reactive programming" gives a better description than I can. I believe that .NET WPF data binding is an example of concepts. As far as I know, this is still experimenting / exploring, but the Wikipedia article for reactive programming (and not FRP, mind you) links for libraries written for Lisp, Python, Java and other languages.
source share