Hey All,
I purchased Game Coding Complete about 3/4 months back and I was very happy with the content going over it roughly a first time, I've recently renewed my interest in game engine development now I have a couple of people to work on it with me so I took up the book again and theres something that none of us can understand.
At this stage we have a number of segregated game objects done such as terrain mapping with textures into a quad-tree like uniform grid, large structure loading, etc&
We finally got the point where were looking for a higher level design to integrate components into so we can start on other areas such as NPC management, entity collision against the terrain and structures (e.g. a castle) and we hit a wall. After agreeing upon the event system presented in in GCC were stuck on how some of the concepts involved.
The biggest problem is the renderer, I have heard many time that its good to keep a level of separation between the renderer and the other subsystems, for entities I can see how the works; You could store the model/textures and any vertex data in the renderer and associate with something like a bounding volume in the game logic then link them together with a unique ID, the event handler would then take any events such as ID 123456 moved to x y z to which the renderer would react.
With after this I am left with two gaping question I cant seem to figure out based on the book:
1. With our terrain we plan to use the individual vertices to with a technique like ellipsoids in conjunction with Uniform Grid BVH to perform ground collision, so the question is (finally) how does one achieve the separation of graphical elements such as vertices from renderer without restricting the game logic and vice versa? The renderer would need direct access to vertices in order to draw them, and at the same time the game logic would need direct access to be able to perform any terrain based calculation. The same question also applies to structures.
2. The second question is, on events such as player moved would the renderer be responsible for smoothly translating the object or would it be the job of game logic to send an event every update cycle to move the object slightly more forward in case something inhibits it mid translation?
Sorry for the essay long question I hope I was able to convey it well enough, I would greatly appreciate any help with this,
Thanks!
Istinra
I purchased Game Coding Complete about 3/4 months back and I was very happy with the content going over it roughly a first time, I've recently renewed my interest in game engine development now I have a couple of people to work on it with me so I took up the book again and theres something that none of us can understand.
At this stage we have a number of segregated game objects done such as terrain mapping with textures into a quad-tree like uniform grid, large structure loading, etc&
We finally got the point where were looking for a higher level design to integrate components into so we can start on other areas such as NPC management, entity collision against the terrain and structures (e.g. a castle) and we hit a wall. After agreeing upon the event system presented in in GCC were stuck on how some of the concepts involved.
The biggest problem is the renderer, I have heard many time that its good to keep a level of separation between the renderer and the other subsystems, for entities I can see how the works; You could store the model/textures and any vertex data in the renderer and associate with something like a bounding volume in the game logic then link them together with a unique ID, the event handler would then take any events such as ID 123456 moved to x y z to which the renderer would react.
With after this I am left with two gaping question I cant seem to figure out based on the book:
1. With our terrain we plan to use the individual vertices to with a technique like ellipsoids in conjunction with Uniform Grid BVH to perform ground collision, so the question is (finally) how does one achieve the separation of graphical elements such as vertices from renderer without restricting the game logic and vice versa? The renderer would need direct access to vertices in order to draw them, and at the same time the game logic would need direct access to be able to perform any terrain based calculation. The same question also applies to structures.
2. The second question is, on events such as player moved would the renderer be responsible for smoothly translating the object or would it be the job of game logic to send an event every update cycle to move the object slightly more forward in case something inhibits it mid translation?
Sorry for the essay long question I hope I was able to convey it well enough, I would greatly appreciate any help with this,
Thanks!
Istinra