I think the first goal to be referenced is. NET Framework, which is regular and uniform.
So if this. if game framework (Dreamwork is not set yet) is to be created, I think it is necessary to first determine that a root object type is needed (refer. net), such as gobject. Everything provided in this framework (except exception) must start from gobject, whether it is an engine object or a game object. The benefits of doing so should be the same as the benefits brought to us by objects: We can use gobject as the super type. When there are some situations that may involve collaboration between different objects, you can use gobject instead. So what does this gobject need to implement? I think it is necessary to implement some basic capabilities, especially those not provided by the. NET Framework itself. For example, the proxy mode is used to reduce unnecessary memory usage and delay the data loading time (indirectly increasing the loading speed and response speed of the game ). Of course, this is just for the moment, and it is not very careful. Can we also consider other pattern types, such as flyweight?
Starting from gobject, there are at least two types: Engine objects and Game objects. Engine objects are responsible for maintaining the most basic operations of the game, describing the work of examples, receiving and processing certain messages (such as keyboards), data storage, network data transmission, and data security, online upgrades. Engine objects are more sensitive to speed. If there is a problem with speed, it may cause the pause of the entire game and it is completely impossible to play. Therefore, engine objects may be written in unmanaged mode, but managed is not excluded. If unmanaged is used, a managed wrapper or similar mechanism will be provided, so that developers of pure. Net can use it. However, gaming objects are more likely to focus on Role maintenance, item descriptions, map construction, and the AI of Game objects. In addition to the speed-sensitive nature of AI, the other part is not very sensitive to speed, but it is often necessary for the final game developer to write this part in detail. As we often use. net, we will feel that the. NET Runtime Library is very robust, so that even if we make stupid mistakes, it will not cause a serious crash of the entire program. One of our goals of this game framework is to provide a robust platform for end game developers. Therefore, unmanaged is not allowed for part of the game object, and everything is developed purely in managed mode. If you have played terrarium, you should be able to understand what I think-to make a game with the final players involved in the design. You cannot guarantee the final player's design level, so you have to ensure the robustness of the entire framework. In general, the final player only modifies the part of the game object. Therefore, security considerations only need to be enhanced in the part of the game object.
To be continued ......