Re: Data oriented programming

OvermindDL1 <[email protected]> Thu, 7 Oct 2010 19:11:42 -0600
Newsgroups gmane.games.devel.sweng
Message-ID <[email protected]>
On Thu, Oct 7, 2010 at 3:54 AM, Gabriel Sassone <[email protected]> wrote:
> /* snip */

Slightly back on to topic, data oriented programming, I know what most
of it means anyway and I do use it in some specific areas, but I am
curious, a common use-case for a game:

Class hierarchy:
  GameObject
    Actor
      Pawn
        PlayerPawn
        Vehicle
          Wheeled
          Tracked
          Flying
      Controller
        PlayerController
        AIController
          MonsterController

I am not certain how to properly get functionality over to a
data-oriented model.  Just for the sake of ease-of-use argument, the
best way might be a component system?  But it seems that no matter how
I think of data usage, sometimes I will need, for example, the
positions with the force descriptions, or I might need positions with
the renderer, or I might need the force descriptions with the input to
each model (and how do you model an input system based on events, such
as you have a list of events and based on what they are they need to
modify the structures of one thing per event, with possible multiple
events per thing, or maybe zero).

I have done quite a bit of looking on Google for any articles or
tutorials that anyone may have done to convert a traditionally
C++/Java-style OO hierarchy into a data-oriented or so setup for
maximal speed, does anyone know of one?
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com