Tutorial Creating HUD Overlay for Desktops and Pinball Cabinets

GeorgeH

Flippered Out
Site Supporters
Joined
May 3, 2016
Messages
2,601
Solutions
6
Reaction score
2,051
Points
145
Favorite Pinball Machine
Attack From Mars
Everyone knows a HUD overlay is squeezed together when it is displayed on a monitor that is rotated to 270 degrees. I have found you can create an extra wide version of the overlay that will display textures correctly at 270 degrees but then of course it will look stretched apart at 0 degrees. I sent @ravarcade a message saying I wanted to be able to switch between 2 overlays and asked if there is a way I can identify the setting for rotation (0, 90, 180, 270) that an end user selects. He said this script would accomplish what I want:

xBAM.Camera.AspectRatio < 1.0 ' screen is wide (the end user selected either 0 or 180 degrees rotation)
xBAM.Camera.AspectRatio > 1.0 ' screen is tall (the end user selected either 90 or 270 degrees rotation)

In conclusion, you can create 2 versions of the same overlay, one that displays correctly on a desktop (normally using 0 degrees rotation) and another that displays correctly on a pinball cabinet (which normally use 270 degrees rotation). You need to use the same image list for both overlays. Then, you can then use Rafal's code to select which overlay is displayed.

I have found that I can code both overlays identically and use a transparent texture to turn the display on and off without using the fade functions. Then I can add this code to the "BeginPlay" subroutine and the correct overlay will be displayed:
If xBAM.Camera.AspectRatio =< 1.0 then Overlay2.fadeout ' screen is wide
If xBAM.Camera.AspectRatio > 1.0 then Overlay1.fadeout ' screen is tall
This works by having both overlays display the same thing with one of the overlays faded out. The overlays can still be coded if you use the fade functions in places other than the above but it is not quite as simple.

I created the attached demo file so you can play a table after switching the degrees rotation to 0 or 270 to see it work. It includes the fail safe coding that you may want to use (though be aware that if one of the displays is not faded out, you will have 2 overlays being displayed at the same time).

I included an Excel file in the download that you can use to calculate the size of an overlay based on the dimensions of your texture.
 

Attachments

  • Demo+ExcelFile.zip
    1.7 MB · Views: 108
Last edited:
I have already updated the posting to include an Excel file that helps you figure out the correct size of an overlay. It identifies the size needed for overlays on screen rotations of 0, 90, 180 and 270. You may want to use it even if you are only interested in sizing an overlay for 0 degrees rotation. That is because Future Pinball stretches the texture out more than the texture. Another way of saying it is if you add a picture of a person and size the overlay by dividing the height and width of your texture by 2, then the person will be too fat.

I replaced the picture in the demo file so it shows 2 guys riding bicycles. You can detect distortion of pictures of humans and circles almost immediately.
 
I posted the final version of my Excel file on Message 1 above. I used it a lot on the "Road Girls" table. It takes the guess work out of sizing overlays so they are not distorted. It is useful even it you do not use the Camera.AspectRatio code.

It is pretty easy to use. You just key in the width and height of your texture. Then you key in either the width (or height) of your overlay and it will tell you the height (or width) of your overlay.
 
Last edited:
The only bummer is you can't adjust "DMDs" and other certain things in the same way you can with an overlay for adjusting the aspect ratio (DMDs are "stuck and stretched")

With PinEvent tables and pup-packs using pup stream...at least that is only using overlays / huds / holograms for the pup displays....so those can also be adjusted to work in a similar manner if needed to look correct.
 
Last edited:
This pretty much applies to overlays only. It doesn't work on DMDs and segmented displays. You mentioned holograms. They can't be used on a HUD but you should be able to size them using the non-HUD secion of the Excel file I created.
 
Thank you so much for this tutorial, it's very utile.
 
I play on a single screen with windows on the left and i rotate the table not the screen, I also am using cabinet reality and turning off force arcade mode, you can still see the dmd as your view of the table is a lot better , esp if you like scrolling gameplay....

ill have to check that script, so does it automaticallly detect the rotation and fade each other out?
that would be awesome.

thanks guys.
 
ill have to check that script, so does it automaticallly detect the rotation and fade each other out?
that would be awesome.

Yes it does but it may not be needed if you don't switch between desktop and cabinet modes. Plus it onlyu works with overlays.
 
Yes it does but it may not be needed if you don't switch between desktop and cabinet modes. Plus it onlyu works with overlays.
that works for me... ill check it out. thanks
the new default for bam for the polygons points on the ball makes a HUGE differance. Thats awesome, I feel like I can actuallly play some of the tables.
adams fam ult pro 1.05 i could almost never ever ever get the stair ramp... and nightare i got a new high score and actually finished some of the dream warrior stages.
 
that works for me... ill check it out. thanks
the new default for bam for the polygons points on the ball makes a HUGE differance. Thats awesome, I feel like I can actuallly play some of the tables.
adams fam ult pro 1.05 i could almost never ever ever get the stair ramp... and nightare i got a new high score and actually finished some of the dream warrior stages.

You might want to try FizX.
 
so does the default file effect all tables or only tables using FizX?
all the tables I have tried seems smoother and easier to aim shots,
Or being away fro it for a while...
 
I am not sure what you mean by the new default for bam for the polygons points on the ball. It makes me think of the custom ball that JLou created for FizX. It has 8K polygons and has a dramatic effect on the physics.
 
yes thats the one, does the default.zip effct all tables
or only tables updated to FizX ?
it sees like y non FizX tables have better flipper aim.
like I said it could be that I have been away fro playing anything for a long time.
 
yes thats the one, does the default.zip effct all tables
or only tables updated to FizX ?
it sees like y non FizX tables have better flipper aim.
like I said it could be that I have been away fro playing anything for a long time.

I have not tried it but I think it would probably work. However, it plays like it is very heavy so you should probably use the FizX XML with it otherwise I don't think it will perform very well. If you want to try it, you can open the ZIP containing the 8K ball and create another folder named XML. Then rename the XML file as "464.XML" and add it to the XML folder. Then zip it up with the "MODELS" folder and name it "Default.zip". Then save it to the folder C:\Games\Future Pinball\BAM. Let me know if it plays well.
 
Ill have to mess with this as i scratching my head a bit.....???
sorry got the spelling errors, my mini keyboard is worn out, so the keys miss sometimes.

a great File explorer/manager Ive used for a couple years now I had time to actually dive into it more and its pretty slick, i running 4 panels of 2 dir trees and 2 file trees and it colorized files you choose, does multiple file renames quickly, there is a quick shell, search, custom popup toolbars for tasks you can create, its pretty involved. FreeComander XE
 
I have not tried it but I think it would probably work. However, it plays like it is very heavy so you should probably use the FizX XML with it otherwise I don't think it will perform very well. If you want to try it, you can open the ZIP containing the 8K ball and create another folder named XML. Then rename the XML file as "464.XML" and add it to the XML folder. Then zip it up with the "MODELS" folder and name it "Default.zip". Then save it to the folder C:\Games\Future Pinball\BAM. Let me know if it plays well.
the documents said to take the 4k or 8k and swap it with default.zip for syandars settings for tables, else the 4k or 8k renamed to tablename.zip and kept with the table .ftp

so my question, does doing so only effect tables that have FizX scripting, or does this change effect any table even ones without FizX scripting. None of the regular5 tables have a heavy ball issue using the 8k default.zip
 
the documents said to take the 4k or 8k and swap it with default.zip for syandars settings for tables, else the 4k or 8k renamed to tablename.zip and kept with the table .ftp

so my question, does doing so only effect tables that have FizX scripting, or does this change effect any table even ones without FizX scripting. None of the regular5 tables have a heavy ball issue using the 8k default.zip

If you use the default.zip, it will affect all tables. That is why I suggested adding the XML to it do so it might perform better (I think).

There is no 4k ball. There is a 1k and 8k ball. The 1k ball doesn't work too well with the current XML. I wouldn't use it unless your PC has resource problems. It would probably be better if you rename the 8k ball zip file with the name of your table and save it to the same folder as the table. You don't want to unzip it. You can just add the XML to the script. You can add just the flippers if you don't want to add the rest of the FizX stuff yet.

By the way, I use free commander also.
 
so far on the few tables i do actually play, everything is the same accept i can aim a lot better.
ill keep a list on the tables it effects poorly and let you guys know. I may as well as its the last section I need to add to my cab.
probably mainly Ultiate pro, ultimates and a few others. trying not to have the same table available on 4 different pinball emulators.
 
Forum activity
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: Beers is our newest member. Welcome!
      Back
      Top