|
1 | 1 | # Visual Pinball Engine - MPF Gamelogic Engine
|
2 | 2 | *Enables the Mission Pinball Framework to drive VPE*
|
3 | 3 |
|
| 4 | +## Structure |
| 5 | + |
| 6 | +This project contains three folders: |
| 7 | + |
| 8 | +- `VisualPinball.Engine.Mpf` is a library which builds the gRPC protos and |
| 9 | + wraps them into a nicer interface. |
| 10 | +- `VisualPinball.Engine.Mpf.Test` is a command line tool that allows quick |
| 11 | + testing without running Unity |
| 12 | +- `VisualPinball.Engine.Mpf.Unity` is the Unity UPM package that plugs into |
| 13 | + VPE and implements the gamelogic engine. |
| 14 | + |
| 15 | +Currently, only the first two projects are contained in the provided VS |
| 16 | +solution. In the future we might add the Unity project with its dependencies, |
| 17 | +but for now you'll need to open it through Unity. |
| 18 | + |
| 19 | +### Binaries |
| 20 | + |
| 21 | +Both gRPC and Protobuf come with dependencies that conflict with Unity's, namely |
| 22 | +`System.Buffers`, `System.Memory` and `System.Runtime.CompilerServices`. To |
| 23 | +solve this, we pack all dependencies into a single DLL and ship it to Unity as |
| 24 | +a single binary. So, what Unity is getting is: |
| 25 | + |
| 26 | +- `VisualPinball.Engine.Mpf.dll`, which is `VisualPinball.Engine.Mpf` including |
| 27 | + all its .NET dependencies |
| 28 | +- `grpc_csharp_ext.dll`, which is the native gRCP library used by the C# wrapper. |
| 29 | + |
4 | 30 | ## Setup
|
5 | 31 |
|
6 | 32 | You currently need Python and MPF installed locally.
|
@@ -33,13 +59,6 @@ var descr = await mpfApi.GetMachineDescription();
|
33 | 59 | Console.WriteLine($"Description: {descr}");
|
34 | 60 | ```
|
35 | 61 |
|
36 |
| -## Unity |
37 |
| - |
38 |
| -This currently need the following compiler flags in order to compile: |
39 |
| - |
40 |
| -- `GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE` |
41 |
| -- `GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION` |
42 |
| - |
43 | 62 | ## License
|
44 | 63 |
|
45 | 64 | [MIT](LICENSE)
|
0 commit comments