|
|
Data architecture :
|
|
|
|
|
|
We had a discussion about the data management.
|
|
|
A problematic appeared (it is general but we give an example) :
|
|
|
* The Core Simulation has a variable x (for example playerPosition) that can be modified at each frame.
|
|
|
* The IAs requires that variable to do their calculation. It is needed at each frame.
|
|
|
* How the IA get access to the value ?
|
|
|
|
|
|
We thought about 3 possible solutions :
|
|
|
1. Both the Core Simulation and the IAs has a physical access to the variable x. They can both modify it and get access to it. But IA shall not modify it.
|
|
|
|
|
|
++ : It is really (really) quick at execution.
|
|
|
-- : The modules are not seperated. The IA shall not possibly modify this variable.
|
|
|
|
|
|
2. The Data Management discussion came with the following idea : We use a central module which has access to all the datas, gives the data required when asked by a module. Datas are actualized when a variable is modified. (there s a existing module to do that efficiently) This module could be merged with Core Simulation if it decreases a lot the quantity of data exchanged.
|
|
|
|
|
|
++ : It permits to have different programmation languages for each module. It is easier in the implementation for modularity.
|
|
|
-- : Time execution may be too long for real time game (is it less than 33 ms (30Hz) ?)
|
|
|
|
|
|
3. Use a class system to allow only a getter to the IAs and the whole class to the Core Simulation.
|
|
|
|
|
|
++ : It can't be quicker, it is the same as a physical access but with no possible modification.
|
|
|
-- : It can be harder to implement, it may affect the modularity because it may force both module to be implemented in the same programmation
|
|
|
|
|
|
language.
|
|
|
|
|
|
Conclusion :
|
|
|
|
|
|
I think that the second option is the most interesting, as it permits any module to do what they want on their own (and it would be the data
|
|
|
|
|
|
management group that would have to do the dirty work). But it needs to be really quick to be allowed. If it is not quick enough, I think we shall
|
|
|
|
|
|
get to solution 3. |
|
|
\ No newline at end of file |