We adopt Unreal Engine to construct a virtual football stadium. In the virtual football stadium, we set two teams of AI players controlled by behavior trees, and simulate football games by playing against each other. At the same time, we deploy a virtual camera in the auditorium that can be rotated horizontally and vertically to capture the picture. We adopt the Transmission Control Protocol communication plugin in the mall to realize the communication between Unreal Engine and programs. Saving the current frame picture locally through the built-in screenshot command of Unreal Engine, and send the internal game information to be read to the client at the same time. The client reads the local image, accepts the information and sends the corresponding action to the Unreal Engine. Unreal Engine executes the received action to rotate the camera.
|