|
From: Thomas H. <th...@gm...> - 2000-10-30 19:38:45
|
From: "Jorrit Tyberghein" <Jor...@uz...> > Ed Page wrote: > > > The system I developed is where entities are classes that sit almost right on CS and maybe simplify some things while objects are collections of entities or objects. I have objects like Camera, Body (combination physics/model w/CD), Weapon, the weapon's proechtile for now, hopefully will be expanded soon, vehicle, person, CameraPerson (a person with the camera, aka a player, but maybe will change soon so that it is easier to attach a camera to anything), and a almost dummy Ai Person (randomly walks and shoots). > > The only thing that would need to be done, I think, is to add SCF interfaces, which is planned since story and Ai are planned to be plugins. > > > > The Dreams Eternal entity system is fundamentally different. It does not > relate at all to the CS entities. Entities in DE are more general. They don't > always describe visual objects like sprites. That sounds very good. > I make a dynamic entity system that doesn't use inheritance on the C++ side > but uses inheritance on the Python side instead. On the C++ side entities > are defined by attaching property classes. For example, to make an object > movable you just attach the 'movable' property class. To make it have a > sprite you attach the 'visual' property class for a sprite. If you want an object > that can hold other objects (like a box) then you attach the 'inventory' property > class. Will it be possible to implement entity classes without using C++ at all? > This system is very dynamic. You can add/delete property classes at runtime. > This is something that is much harder to do with a inheritance system. > > Check out the Dreams Eternal design document for more information about > this if you are interested (http://dreams.sourceforge.net). I have read this, and I really like some ideas that are described there. On the other hand, I am missing some aspects that are in the csgame plugins (by concept, because most of the stuff is not yet implemented). The most important thing I am missing is inheritance (or I didn't fully understand your concept). How can I reuse an existing class and just modify selected parts of its implementation. Something like virtual functions in C++. In general, I think it would be reasonable to have a little more discussion on that DE entity system on the CS mailing list, as there are alread two other entity systems: Crystal Clear and csgame, and maybe there are some ideas that could be shared. (Though I understand that there will probably be no common code in the near future.) Thomas |