Hi all.
I recently started to to learn Irricht 3D Engine, I already went through all the tutorials and I'm feeling ready to build a simple game upon it. So here is some background:
I have irricht , a 3D engine that is based upon the scene graph model . It knows how to load meshes & textures and show them , It provides me structured classes to handle input from the user , It provide me easy way to build a GUI. It provide me easy ways to define camers , lights , fogs , etc and provide me more convenient ways to do more things....
BUT , naturally , What the engine doesn't provide is a way to define the entities in the game and the logic relations between them. (For example , If a ball hit the wall , I want the wall to be broken into several pieces).
So ok , This is my job to lay down an infrastructure that will represent the game logic. so lets say I already did it , and I have some Data model that abstract objects and how they relate to each other (I am talking about Logic relations and not Spatial relations) that handle all the logic and represents all entities in the game.
Now Here is my question. What is the Best way to connect my data model to the engine? This is not a techincal question but rather a design question.
Some points to keep in mind:
- My data model isn't built upon the engine. It doesn't aware of anything. It is accessible through interfaces though.
- When something in the data model changes , I don't want to build my whole scene graph again but rather only the appropriate parts.
- My Data model Is mainly a class hierarchy of of entities that can communicate with each other in some way.
I am thinking about the MVC pattern , but I would like to hear more opinions from anyone who has some experience with making games.