-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Hello there,
I was wondering if anyone with deeper knowledge of the engine could elaborate on the workings of gkGameObject and gkEntity. One's intuition for creating a new type of game entity would be to either extend GameObject or Entity (The difference between these two classes is also unclear to me), but looking at the constructor of these classes shows that they are not meant to be created manually, but through gkGameObjectManager. This however doesn't allow any extended class to be created this way without uglyness (adding a new function to GameObjectManager).
When looking at the vehicle demo sample, gkVehicle, a new entity class, does not inherit at all from a object related class, but simply contains different parts of the vehicle as GameObjects. While I can imagine this being the intended way to create a new object type, I still see a problem with lack of standardisation. Wouldn't it make more sense for there to be a class you can easily extend to make a new object type?
Unless i'm missing something important, one of the following should have to happen:
- GameObject/Entity should have an additional constructor for manual creation. (Which of the two?)
- A new class is created, inheriting from GameObject/Entity allowing manual creation.
While I would gladly do the work to implement this, I would like the opinion and advice from other people before starting.
I would also like to turn any insightful comments about this question into documentation, as this project absolutely deserves better documentation.
Thanks,
Cornee Traas