This is a third and hoping last part of cycle about using flatbuffers in Unity. Here we take a look at usage example. There is an example of PingPong game. It is not about fascinating gameplay it is just demonstration of flatbuffers usage. First of all, there are three .fbs-files (BallCoordinates, MoveDirection and PlayerAction) that we need to compile into c# and python (.cs and .py respectively). Do not forget that you can choose a flatc-compiler (although there is default one for each of platforms: Windows, MacOS, Linux). After compiling you have to move python files into server-part folder. (Scripts->Server->FbsCompilled). It is time to prepare server: Install python and pip Optionally you can create python environment: python -m venv /path/to/new/virtual/environment Install requirements from file "requirements.txt" (with the help of pip): pip install -r requirements.txt Run flask server with the help of script run_server.bat. There should be output:
GameDev
Blog about Unity game development. Some tips and tricks, thoughts and so on