GithubHelp home page GithubHelp logo

visualpinball / visualpinball.engine.mpf Goto Github PK

View Code? Open in Web Editor NEW
0.0 10.0 0.0 17.25 MB

Mission Pinball Framework support for VPE

License: MIT License

C# 100.00%
visual-pinball-engine mpf mission-pinball-framework

visualpinball.engine.mpf's Introduction

Visual Pinball Engine - MPF Gamelogic Engine

UPM Package

Enables the Mission Pinball Framework to drive VPE

Structure

This project contains three folders:

  • VisualPinball.Engine.Mpf is a library which builds the gRPC protos and wraps them into a nicer interface.
  • VisualPinball.Engine.Mpf.Test is a command line tool that allows quick testing without running Unity
  • VisualPinball.Engine.Mpf.Unity is the Unity UPM package that plugs into VPE and implements the gamelogic engine.

Currently, only the first two projects are contained in the provided VS solution. In the future we might add the Unity project with its dependencies, but for now you'll need to open it through Unity.

Binaries

Both gRPC and Protobuf come with dependencies that conflict with Unity's, namely System.Buffers, System.Memory and System.Runtime.CompilerServices. To solve this, we disable assembly validation for Google.Protobuf.dll and Grpc.Core.dll via the plugin inspector.

Unity Package

The goal of this repo is to use it within Unity. In order to do that, open the Package Manager in Unity, and add org.visualpinball.engine.missionpinball under Add package from git URL.

The Unity package is build and published to our registry on every merge to master.

Setup

You currently need Python and MPF installed locally.

  1. Install Python 3
  2. pip install --pre mpf mpf-mc

Or, if you already have it:

pip install mpf mpf-mc --pre --upgrade

After that, mpf --version should return at least MPF v0.55.0-dev.37.

Development Setup

In order to import the package locally instead from our registry, clone and compile it. This will copy the necessary binaries into the Unity folder. Only then, import the project into Unity.

Since the Unity folder contains .meta files of the binaries, but not the actual binaries, .meta files of uncompiled platforms are cleaned up by Unity. In order to not accidentally commit those files, we recommend to ignore them:

git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/VisualPinball.Engine.Mpf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/Google.Protobuf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/Grpc.Core.Api.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/Grpc.Core.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/linux-x64/libgrpc_csharp_ext.so.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/VisualPinball.Engine.Mpf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/Google.Protobuf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/Grpc.Core.Api.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/Grpc.Core.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/osx-x64/libgrpc_csharp_ext.dylib.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/VisualPinball.Engine.Mpf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/Google.Protobuf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/Grpc.Core.Api.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/Grpc.Core.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x64/grpc_csharp_ext.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/VisualPinball.Engine.Mpf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/Google.Protobuf.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/Grpc.Core.Api.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/Grpc.Core.dll.meta
git update-index --assume-unchanged VisualPinball.Engine.Mpf.Unity/Plugins/win-x86/grpc_csharp_ext.dll.meta

License

MIT

visualpinball.engine.mpf's People

Contributors

freezy avatar github-actions[bot] avatar jsm174 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

visualpinball.engine.mpf's Issues

Player' does not contain a definition for 'Queue

error CS1061: 'Player' does not contain a definition for 'Queue' and no accessible extension method 'Queue' accepting a first argument of type 'Player' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(182,13):
Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(192,13):
Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(207,13):
Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(224,12):
Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(240,12):
Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(255,12):

broken in 2021.3.0f1

Library\PackageCache\[email protected]\Runtime\MpfExtensions.cs(27,21): error CS1729: 'GamelogicEngineSwitch' does not contain a constructor that takes 2 arguments

Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(72,28): error CS1061: 'GamelogicEngineSwitch' does not contain a definition for 'InternalId' and no accessible extension method 'InternalId' accepting a first argument of type 'GamelogicEngineSwitch' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(73,21): error CS1061: 'GamelogicEngineSwitch' does not contain a definition for 'InternalId' and no accessible extension method 'InternalId' accepting a first argument of type 'GamelogicEngineSwitch' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(77,21): error CS1061: 'GamelogicEngineCoil' does not contain a definition for 'InternalId' and no accessible extension method 'InternalId' accepting a first argument of type 'GamelogicEngineCoil' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\MpfGamelogicEngine.cs(81,21): error CS1061: 'GamelogicEngineLamp' does not contain a definition for 'InternalId' and no accessible extension method 'InternalId' accepting a first argument of type 'GamelogicEngineLamp' could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\[email protected]\Runtime\MpfExtensions.cs(69,23): error CS1729: 'GamelogicEngineCoil' does not contain a constructor that takes 2 arguments

Library\PackageCache\[email protected]\Runtime\MpfExtensions.cs(106,41): error CS1729: 'GamelogicEngineLamp' does not contain a constructor that takes 2 arguments

Screenshot 2022-05-30 033619

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.