Jump to content



Photo
* * * * * 26 votes

WIP: Visual Pinball in Unity


  • Please log in to reply
813 replies to this topic

#501 OMNIKAM

OMNIKAM

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: Australia

  • Favorite Pinball: Ghostbusters Le

Posted 01 October 2020 - 01:33 PM

Im super excited and impressed with this project, I have a few questions
1. How will performance scale in unity? Is running VP in unity more demanding?
2. VP has for the most part been left alone by major pinball manufacturers, and availability to roms has remained mostly easy, but bringing VP to unity might increase public exposure from enthusiastic to commercial. What's to stop people from say posting table's on Playstore and potentially infringing on copyrights and perhaps bringing unwanted attention.. I think VP success has been the blind eye of the law and although I'm super excited about the future of this project I also hope it continues to stay under the radar

Is there a link to a unity build for testing? Never mind I found it will test shortly
Amazing idea

Edited by OMNIKAM, 01 October 2020 - 01:54 PM.


#502 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 01 October 2020 - 02:01 PM

  1. Performance seems fine so far. Physics take about 4ms per frame with 10 balls in play. But we haven't touched dynamic lighting and all that, so that's still up to test.
  2. It's a valid concern. While you can do binary builds in Unity and we technically can't do much about it, I don't think the engine could be held responsible for infringements of third party users. It's basically the same as if someone were to sell table packs commercially. Those who do get expelled and outlawed by the community. And to be honest I don't think anyone would risk legal proceedings for a few quick bucks on Steam (and AFAIK they have a validation process there as well). As for the "commercial" aspect, there's absolutely nothing commercial in the sense of commercial exploitation. VPE is and will always be free and open source. About "ease of use", I hope it will be easier to set up than VPX, but you'll still have get the tables yourself so it'll never be a "click and play" experience like the commercial products.

    Lastly, we would really like to make the creation of original tables easier. We're talking with MPF to get a compatible layer into VPE, and there are a lot of things original authors will appreciate. So we hope to move the narrative from a mainly VPM driven community to a more original creation process. That of course depends a lot on the authors, but the FP community has given us a lot already, and we think the table creation process will be even easier with VPE.
     

EDIT: There are no builds and there won't be for a while. If you want to test it, you'll have to build it for yourself :)

EDIT2: Performance details


Edited by freezy, 01 October 2020 - 02:09 PM.


#503 OMNIKAM

OMNIKAM

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: Australia

  • Favorite Pinball: Ghostbusters Le

Posted 01 October 2020 - 03:10 PM

Personally Im looking forwards to building tables within the unity editor, although playing a table using the unity renders would also be nice :otvclap:



#504 OMNIKAM

OMNIKAM

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: Australia

  • Favorite Pinball: Ghostbusters Le

Posted 02 October 2020 - 03:30 AM

I just tried it out and must say that its a wonderful editor, importing my table was fine, although i wasnt able to actually play the table which i expected as its very new

I had hoped to be able to export my imported  table , but could not find an option to save it out as a vpx

Hopefully  it will be implemented soon and i can test it more thoroughly

Really impressive Freezy



#505 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 02 October 2020 - 07:30 AM

Select the root table node and you'll have an export button in the inspector.



#506 OMNIKAM

OMNIKAM

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: Australia

  • Favorite Pinball: Ghostbusters Le

Posted 02 October 2020 - 11:02 AM

Select the root table node and you'll have an export button in the inspector.

:tup:  Very  nice. I made some changes and exported a table then loaded it up in vpx to test. Worked without fault

I just tried to delete the main camera and import my pimax Vr camera to test it in vr, 11 minutes and counting with hold on busy under application enterplaymode. Im not sure if this is a bug or just somehow incompatible, further testing is needed 



#507 iryan2

iryan2

    Hobbyist

  • Members
  • PipPip
  • 15 posts

  • Flag: ---------

  • Favorite Pinball: White Water

Posted 02 October 2020 - 11:19 AM

I also had a never ending “busy” dialog on the first attempt in VR (Rift CV1), but it worked the next day when I tried again. I just chalked it up to Unity being flakey, but maybe it’s a reproducible bug

#508 OMNIKAM

OMNIKAM

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: Australia

  • Favorite Pinball: Ghostbusters Le

Posted 02 October 2020 - 12:09 PM

I also had a never ending “busy” dialog on the first attempt in VR (Rift CV1), but it worked the next day when I tried again. I just chalked it up to Unity being flakey, but maybe it’s a reproducible bug

Ive tried twice with fails and unity crashing, i also tried to build under windows and had 3 major script compile errors , so perhaps thats my issue



#509 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 03 October 2020 - 09:46 PM

So here's an update of what's happening at the moment with VPE.

TLDR; Not ready for players yet! ;)

Physics

The port is complete! It's not battle-tested at all, but VPE's physics should have feature parity with Visual Pinball's. There are a few quirks to fix (e.g. custom playfield meshes are still handled incorrectly), but I've spent weeks debugging physics and am quite happy to move on with other things now. :)

License

Some might have followed the license discussion. In short, there were two issues. Firstly, our initial GPL-2 conflicted with the Unity license. That meant that while there was nothing wrong with the VPE code itself, redistribution wouldn't have been possible without violating either license. That made us decide to re-license VPE under the GPL-3+ which shouldn't have that issue.

Secondly, we have ported quite a lot from Visual Pinball, which was under the MAME license, which is also incompatible with GPL (or any other license, for that matter). So I've spend a few days going through all of VPE's source code and tagging in the VP code base which parts where ported and where to. Then, with the help of Toxie, Fuzzel and all the other relevant VP contributors, we've managed to re-license those parts under the GPL-3.

It was quite an effort, but that means we're clean now. :)

Documentation Site

We have a webite! It's still very basic, but there are detailed installation instructions for creators, and we're trying to keep it up to date as we add new features. Basically the setup is documented, then nothing, and then the new features since we have the documentation site. So we still need to cover all the things in between.

The documentation is part of the code base and is deployed automatically when we merge PRs. On every page there is a "Improve this Doc" button, which allows you to easily propose changes. It will become more important in the future, but even today if you see spelling errors or you think some part could be explained better, don't hesitate to make use of it.

For me, documentation is a key part and I hope to keep the quality of this very high.

Scripting / Gamelogic Engine

We have an awesome new feature, which also made it more clear to me where we want to go in terms of scripting. My main conclusion for now is that we will split scripting into two parts: game logic related and mechanics related. Head over to the brand new documentation for more details.

This is probably the next part I'll be working on, so the details are still vague. The main idea is to make these engines pluggable, i.e. they have a well-defined API and anyone can write an implementation for it. Of course we'll use it internally as well to provide default implementations, and tables can provide individual implementations as well. The goal is to have maximal flexibility but also to provide minimal-effort solutions if adequate. We'll also provide implementations for the most common gamelogic engines, namely PinMAME, and, the next topic:

Mission Pinball Framework

For those who don't know what MPF is: It's like a ROM creator for real machines. It's what people use to re-program their existing machines, or program original (pyhsical!) creations. MPF is typically what a gamelogic engine does, and I'm excited to get this running within VPE. I really think that for original authors, this could be a godsend, because it's soo well documented and programming your game logic will be sooo much less pain than writing thousands of lines of VBScript. Anyway, you can read up how it is going here.

WPC-EMU-CS

Finally, @jsm174 thought why not! and ported neophob's wpc-emu from JavaScript to C#. So we'll soon have a native WPC emulator. Which, if nothing else, will be awesome to rapidly test out stuff.

 

2020-10-03_11-07-54.2020-10-03_11_08_51.



#510 blindpeser

blindpeser

    Enthusiast

  • Members
  • PipPipPip
  • 421 posts

  • Flag: ---------

  • Favorite Pinball: WCS94

Posted 04 October 2020 - 06:48 AM

Wow, that sounds like a lot of hard work and great progress!

Cant wait to see some real time action that shows the physics.

What's next?

#511 hitman2304

hitman2304

    Enthusiast

  • Members
  • PipPipPip
  • 129 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: AFM,Monster Bash,Medieval Madness,TOM.

Posted 04 October 2020 - 08:15 AM

I'ts some nice progress but i'm not surprised cause i'm following github daily :tup:



#512 pitty

pitty

    Hobbyist

  • Members
  • PipPip
  • 38 posts

  • Flag: Australia

  • Favorite Pinball: star wars

Posted 04 October 2020 - 09:08 AM

Exciting times, This is definatley the future of pinball imo.

 

 

Amazing work mate, do you need more people coding, problem solving etc etc?

 

Have you advertised to communities on reddit? Do you even want publicity at this stage? The crossover between pinball and PC gaming is as large as the community.

 

There are a lot of smart coders on there in various communities, some of them just love coding for fun.

 

You are amazing by the way.


Edited by pitty, 14 October 2020 - 04:17 AM.


#513 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 04 October 2020 - 09:36 AM

Posted a while ago on /r/unity3d. I think /r/gamedev at some point would make sense as well, but it needs to be more accessible first.

 

Getting new developers in is always cool, but they should be kind of passionate about pinball and not just looking for another project to mention on their CV.



#514 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 06 October 2020 - 10:37 PM

I have installed into Unity 2020.1.7

 

but get an error after loading it up VPE in the Package Manager. 

 

D:\VPE\VisualPinball.Engine-master\VisualPinball.Engine\VPT\Surface\SurfaceHitGenerator.cs(91,42): error CS1503: Argument 1: cannot convert from 'VisualPinball.Engine.VPT.Surface.SurfaceData' to 'UnityEngine.XR.WSA.SurfaceData'

 

 

here's line 91 =    var slingLine = new LineSegSlingshot(_data, pv1, pv2, bottom, top, ItemType.Surface, item)

 

 

This occured with both The URP and HDRP pipelines.  The editor menu does not show in the top menu either. 

 

Hope this helps. 


Edited by mickman, 07 October 2020 - 02:31 AM.


#515 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 07 October 2020 - 08:04 AM

Did you add the XR package?



#516 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 07 October 2020 - 09:38 AM

XP  package is on by default.   

 

I  tried disabling the XP package and the error still persists. 

To disable XP you also need to disable VR package.

 

 

note: I am using a clean install of Unity 2010.1 


Edited by mickman, 07 October 2020 - 09:57 AM.


#517 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 07 October 2020 - 09:54 AM

Well, as the error points out, there's a conflict so you'll probably need to explicitly specify the namespace somewhere.



#518 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 07 October 2020 - 11:13 AM

I'm not strong in coding so will have to wait till the next GitHub push.  

 

note:  I tried looking up adding the prefix "namespace "  but can't find out where to add it.



#519 pandeli

pandeli

    Neophyte

  • Platinum Supporter
  • 5 posts

  • Flag: ---------

  • Favorite Pinball: Time Machine

Posted 12 October 2020 - 07:09 AM

Just started exploring some of material and rendering bits...

Attached File  unknown-3.png   1.08MB   67 downloads

This is not yet optimized and is by no means playable in this state...yet. But it does hint at some of the potential of VPE.

#520 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 12 October 2020 - 07:35 AM

This makes me very happy :)