Entity Programming tutorials?
I recently learned the basic (in the roughest of definitions) idea of Entit开发者_开发问答y programming and would like to learn more. The concept I got was pretty much just a massive abstraction. Is this right?
From what I can tell, it doesn't seem to be a very well known method. The only information I could find seems to back up what I thought - 'Entity' programming means having a number of objects that can all be used interchangably in a data structure (such as a game's scene graph). In addition, the entity should be definable in data, meaning an entity could be constructed from, say, an XML file, or equally important, written out to an XML file and reloaded from it.
As far as I remember, Quake used the term 'entity' back in the day to refer to non-static objects (i.e., anything but the BSP tree that made up the terrain). Things such as lights, doors, etc.
Entity
is simply a base abstraction for objects on a scene graph/"your world". Nothing more.
Each game engine defines and uses entities in different ways. Some game engines may attach world coordinates or common properties to entities, others may not. Since it varies from game to game, there isn't much more that can be said about it.
If you haven't read up on them, it might be useful to read up more on programming abstractions. Polymorphism, abstract base classes, the Liskov Substitution Principle (LSP), or the book Code Complete may be good things to look at. Or it might be a good idea dig down deep and learn a lot more about a specific game engine, and use a SDK to develop something for it (UDK looks pretty cool, for example).
精彩评论