Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Game engine architecture state-of-the-art

I have been reading a lot about game engine architectures, and would like to know the following: what is (are?) the currently considered best architecture for a game engine?

I would be very grateful if we could find some academic resources (such as papers or similar) rather than anecdotal experience from isolated developers.

Thanks

like image 595
Giuseppe Maggiore Avatar asked Jul 12 '11 16:07

Giuseppe Maggiore


1 Answers

"Best" is quite subjective. Not being a professional game developer, I can't answer your question entirely rigorously, but I've heard about component-based game engines and (functional-)reactive engines. There's also the option of using a hierarchy of entities, as described in, for instance, "Evolve Your Hierarchy", but from what I've seen, that's being dropped in favor of component-based engines.

Hierarchical: Use inheritance to provide functionality ("Evolve Your Hierarchy" shows an example of a Car subclassing Vehicle which subclasses Moveable with subclasses Entity). As described, the problem is deciding where functionality should be put: if put higher in the inheritance tree, it burdens subclasses with functionality that may not be used; put it too low, and you end up duplicating/refactoring code to get the functionality to where it's needed.

Component-based: Each game object/entity is a composition of "components" that provide reusable, specific functionality, such as animation/movement, react to physics, be activated by the player, etc. "Component based game engine design", another SO question, describes it in detail and provides links to papers, etc., which 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, with behavior being described in terms of these values and other building blocks, such as events to represent discrete events. "What is functional reactive programming" provides a better description than I can. I believe .NET's WPF data binding is an example of the concepts. As far as I know, this is still being experimented with/researched, but the Wikipedia article for reactive programming (not FRP, mind you) links to libraries written for Lisp, Python, Java, and other languages.

like image 180
li.davidm Avatar answered Nov 25 '22 21:11

li.davidm