(Topic ID: 273352)

Creating pinball playfield from virtual

By openpinballproj

3 years ago



Topic Stats

  • 5 posts
  • 3 Pinsiders participating
  • Latest reply 3 years ago by BorgDog
  • Topic is favorited by 3 Pinsiders

You

Linked Games

No games have been linked to this topic.

    #1 3 years ago

    Continuing on a quest for a collaborative pinball machine (yes, it is the 100 year journey that starts with a single step)...I always start by running into this issue...how can multiple people work on a playfield layout and use a versioning tool to iterate the design.

    Here's the background. I started a design with toyotaboy in Future pinball. It saves files as *.fpt. From a quick look at fpt files, they look like a binary format. The issue with this is that if toyotaboy makes a change (such as moving a post 3 mm to the left), I can't see what has changed inside the proprietary save file format. So that is the issue with Future Pinball. Does anybody know if Visual Pinball (VPX) has the same issue?

    What I'm looking for is a virtual pinball simulator that uses text based files to "compile" into a table so that you can easily see what changes have been made when taking "diffs" of the "source" files. So something like PCB software where each pinball element (pop bumper, post, etc) is listed as its position on the playfield, radius for the pop bumper, how bouncy and object is, etc. When looking at that file, I would look at the changes in the position to tell that toyotaboy moved a will 3mm to the left, added a wall, changed the bounciness, etc.

    So on a slightly different question, the Unity game engine has a physics engine built into it. Are there any Unity projects out there that have a working pinball machine that could be extended to be more generic and maybe preprocess files into something that can be fed into the engine to create custom machines? It would basically be rewriting Future Pinball and Virtual Pinball pieces in Unity to make this possible. I'm only looking for basic functionality like pop bumpers, ramps, flippers, posts, walls, (wireforms, but those could just be ramps), etc. No desire or need to run old PROMs. If Future Pinball and Virtual Pinball can't show differences with slight changes, it seems this is the only way to go.

    Any helpful pointers or information would be greatly appreciated. Any Unity partially completed projects would be interesting to take a look at. I do like that Unity is multiplatform, so it removes issues with Linux/Mac/Windows users not being able to contribute.

    #2 3 years ago

    I'm pretty sure you'd have the same issue with vpx files, I believe they are binary format as well.

    On your other question there are a group of people working on porting visual pinball to unity, I'm only vaguely following along so don't have any details, but the project thread is here: https://www.vpforums.org/index.php?showtopic=43651&page=1

    There have also been some individual tables built by a guy in Unity, but I'm not sure where I saw those at, likely vpforums.org as well

    #3 3 years ago

    VPX is kind of better for two reasons: 1. You can interface it with MPF to develop your game with virtual hardware if you want. No need to reimplement everything. 2. Blender can import the playfield and you can convert it into CAD. This obviously needs a lot of cleanup afterwards but it helps you to transfers dimensions and placing.

    I'm not aware of similar things for FP. But I would love to hear about them if they exist.

    Jan

    #4 3 years ago

    Good information. Thanks for the responses so far. Since both VPX and FP sound like their file formats are binary, that really precludes multiple people working on a single design and iterating over it. They could of course pass the binary file back and forth, but there wouldn't be any easy way to see the changes that were made. Maybe there is a way to come up with a file format that ends up creating a VPX playfield. When a VPX playfield is exported and then imported into blender, what formats are used? jabdoa Do you know of any links that describe how to export from VPX into blender? (Note: I know nothing about VPX at all. I've only ever used FP and I'm hoping to gather enough info on the next step to make the right choice going forward)

    The reason that I brought up Unity is that it contains a physics engine. Maybe I'm being naive, there seem to be relatively few elements needed to create the first layer of a playfield. A pop bumper is basically a cylinder with a certain elasticity. (Does VPX take into account the spin that is imparted on the ball because of the pop bumper?) A flipper is a, well, a weird shape, but certainly definable with a small number of polygons. The band on the flipper has a certain elasticity. A post is just a cylinder with a certain elasticity. Is it naive to believe that I could create basic elements in Unity that could simulate a playfield? Look at some of the projects suggested by BorgDog that has probably done some of the hard work?

    A little more background on this is that toyotaboy and I started a layout in FP. He made changes that improved the playability, but without being able to see the changes and merge them with changes from other people, the layout would quickly become unmaintainable. Then of course there was the issue of how to convert that into physical playfield.

    So I'm guessing that Unity uses some sort of a coordinate system (like any other 3D modelling software). Each object has an origin, and set of angles to rotate it correctly in 3D space, etc. So when somebody wants to move a post, you can immediately see that the origin has changed, and it has moved by x number of units. Maybe units are in inches, or mm, whatever makes the most sense. Everything can be scaled from units to physical measurements using the chosen factor. Hopefully the Unity framework makes it easy to create something as a flat surface, and then tilt the angle to 7 degrees or so to make the physics work properly.

    I will admit I have no idea how I'm going to do ramps at this point to add the second layer of the playfield, or the bottom playfield, but hey, let's just ignore that for the moment.

    Another issue is that VPX is well known to take a crap load of processing/GPU to run. I don't believe that I have a PC that has enough umph to run VPX properly. I have 0 graphics cards in my house. (I'm just using the graphics on the motherboard of the laptop. I don't game on PCs at all). The laptop that I'm targeting to do this on was discarded by the rest of the family because it is too slow. (Hey, now it is my pinball development linux box). It is dead dog slow. It might be a pipe dream to believe that it has the possibility of running either VPX or Unity for that matter. (Unity says they need a Graphics card with DX10 shader model 4.0....ummm, yeah, whatever that means. Since I don't care about shading and lighting, does Unity?).

    Thanks for any other suggestions of where to do more investigations.

    #5 3 years ago

    I did my entire homebrew in vpx before ever starting on the real one, heck before even thinking of making a 'real' version. VPX can export a blueprint in bmp format of your table, only showing whatever layers you have visible when you export. It's not high resolution, but it was good enough for me to have printed at Staples and attach to my plywood to place all the objects. I wish the mpf-vpx bridge was around when I started that project, would have saved me time recoding the whole thing in mpf.

    VPX also exports to obj for import into blender or whatever. You can export individual objects or the entire assembly.

    VPX will run on lower end hardware, it just doesn't look as nice or as smooth. It has a preset for low-end hardware in the video settings.

    The only collaborations I've done on vpx projects just involved passing the binary back and forth and telling the other person what you did, and hopefully not both changing things at the same time as there is no way to merge the changes easily, although there were a lot of times I changed a bunch in the script while the other person worked on layout and graphics and such, then just replaced the entire script with my updated version.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/creating-pinball-playfield-from-virtual and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.