Because we use the Unity engine to create our game, I use c# to build the whole backend system. The server framework finally looks like this in the end:
We divide our backend system into three modules: Room System, Battle System, AI System. As for AI, we might have more than 100 robots at "Room5", the defense battle scene. We have made some optimizations in sticky package subcontracting and serialization to improve overall performance. We used the "Master-Client" AI framework, which means only the master client controls each AI state machine and sends instructions and other clients only execute instructions from the master client.
I also wrote the Network module for the frontend. One key feature I added is RPC (Remote-Process Call), which could help us call other client's functions like local calls. This feature has greatly improved our development efficiency, and we no longer need to define protocols one by one.
Comments