6

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

Giuseppe Maggiore
  • 2,011
  • 1
  • 23
  • 31
  • As a word of advice, real game developer comments/blogs are each worth a million academic papers that use toy languages to solve model problems and don't have to run on PC/360/PS3 at 30Hz+ - I hear data driven designs are the way forward - http://seven-degrees-of-freedom.blogspot.com/ for instance, advocates this based on experience. – jheriko Jul 13 '11 at 02:21
  • 1
    I'm not sure I agree. I am a game developer and collaborating as a researcher at the University of Venice. What I feel is sorely missing is exactly what you so easily discard: in a sea of anecdotes, someone who tries to put some order and classify different approaches. As things stand now, there are lots of isolated reports that are short, sometimes incomplete, and often at odds with each other. Some systematization is required, and from this many gamedevs who use obsolete techniques could find a migration path to newer, better methods of software engineering. – Giuseppe Maggiore Jul 14 '11 at 06:51
  • good point. my suggestion about academia should be taken with a pinch of salt, "toy" languages are fine if you want to make indy games and every title I've worked on has been polluted to some extent by bad ideas that should stay in research papers - and they still shipped just fine. i think the biggest obstacle to any really valuable work being done in this area though is simply the competitive, capitalist philosophy at the heart of most studios, its in no ones real interest to improve the quality of information available, but there are many naive arguments for why you should not... – jheriko Jul 16 '11 at 01:43

1 Answers1

5

"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.

Community
  • 1
  • 1
li.davidm
  • 11,736
  • 4
  • 29
  • 31