vpinball / b2s-backglass

B2S Backglass Server for use with Visual Pinball
Other
37 stars 7 forks source link

Feature Request: DMD location inside FullDMD #70

Open francisdb opened 8 months ago

francisdb commented 8 months ago

Feature request

Let the b2s author indicate the location of the hole reserved for the DMD.

This would have to be a relative position so coordinates within the FullDMD window can be calculated from the actual window size.

eg:

x1, y1, x2, y2
0.2, 0.2, 0.8, 0.6
FullDMDRes = 1024*768
DMDLoc = 0.2*1024, 0.2*768, 0.8*1024, 0.6*768

On standalone we could then automatically place the DMD window relative to the FullDMD window.

francisdb commented 8 months ago

In case of 2 screens the location might be in the backglass instead of the FullDMD

eg: Checkpoint (Data East 1991)

JockeJarre commented 7 months ago

Sounds like a cool feature... but for the B2S Designer (as a first checkpoint) ?

This way the directb2s files would get this information into it's xml structure. Something you would like to look into?

francisdb commented 7 months ago

Feel free to move this to the appropriate repo.

francisdb commented 7 months ago

Regarding looking into this I guess that's not doable on Linux/Mac?

JockeJarre commented 7 months ago

Feel free to move this to the appropriate repo.

We can leave it here, cause we will need a change both here and in the Designer. So another issue on the Designer to make it possible to mark the DMD position. By the way, I checked your Table inspection tool as inspiration for my VPinballX.starter.

Regarding looking into this I guess that's not doable on Linux/Mac?

You are right, it doesn't make it easier. I guess .NET isn't a blocker anymore, but these tools use Windows Forms for the GUI, so that isn't easy. I know there are users running the B2S Server on linux through Wine. But it is of course possible to use a VM with VS already installed. M$ even has the VM files available for download with a license active for a couple of months.

francisdb commented 7 months ago

@JockeJarre A Developer section in the readme that explains how to get started, what tools needed, how to build the project would be great. Same for the designer.

Not saying that I will find the time to look into this as I have other higher priority standalone issues I would like to see fixed first.

JockeJarre commented 7 months ago

Good point! Done!

JockeJarre commented 7 months ago

I think it should be rather easy once the DMD can be set in the Designer, the calculation of the position is already handled by the Server.

francisdb commented 7 months ago

Personally I am mostly interested in the directb2s file and the designer as vpinball standalone ported the server code to C++ and standalone has a specific way of showing dmd's.

https://github.com/vpinball/vpinball/tree/standalone/standalone/inc/b2s

francisdb commented 7 months ago

ping @jsm174

jsm174 commented 7 months ago

Sorry, I'm not fully following. So we know the position of the B2S DMD window, but not the position of the VPinMAME or FlexDMD window inside the B2S DMD window. Or am I wrong on this?

francisdb commented 7 months ago

We want to know from the .directb2s file what the location of this dmd hole is so we can put the dmd automatically at the correct location.

As you can see below these holes are not always the same size and at the same location

Fulldmd with hole from Corvette

image

Fulldmd from Black Rose with DMD at more or less correct location

image

JockeJarre commented 7 months ago

So that future version of the B2S.Server could potentially know where the DMD should be placed. Hopefully make a more seamless experience...

toccata10 commented 4 weeks ago

Hi, I'm developing the configgen on batocera for vpinball. The idea is to get everything as easy as possible for the user. So, full DMD currently requires per table manual adjustment of the position and size. It would be great if this thing could be implemented. I just wanted to let you know that this enhancement would be super useful for us to have automatic positioning.

JockeJarre commented 4 weeks ago

If you want to make it as easy as possible, I would inspect the images for the full DMD and grill and then find the largest rectangle within the image, to automatically define the position. Se the image examples above... Or maybe to make it more bullet proof, have the full DMD and grill images defined as transparent where the DMD is to be positioned.

francisdb commented 3 weeks ago

The simplest way is adding 2 relative coordinates to the xml. Other heuristics will be imprecise and slow down b2s startup.

toccata10 commented 3 weeks ago

I completely agree that it's best to add coordinates in the xml. I would say: x,y,width and height.

francisdb commented 2 weeks ago

For example here finding an empty square or transparent pixels won't help

image

JockeJarre commented 1 week ago

yes, sounds good! The B2S.Designer needs the possibility to mark the DMD position and save it in the directb2s file. Here is the repository: b2s-designer

Do not forget, two different DMD positions are needed. One for 2 screen cab with grill and one for 3 screen with full DMD.

Ltek commented 3 days ago

this is 100% needed and was quite surprised it wasnt added long ago. basic text in a location of the B2S that other apps can read... even if it need to be manually input (eg, not using the designer's GUI to find the coordinates) would be better than nothing.

JockeJarre commented 3 days ago

It is so good we are open source, just hack away!