Author Topic: Game manuals plugin (Released)  (Read 6140 times)

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Game manuals plugin (Released)
« on: May 18, 2020, 03:03:33 PM »
Edit: it's released grab it here https://github.com/joyrider3774/attract_gamemanuals_plugin

Hello guys,

I'm working on a plugin to show game manuals inside attract, it should work with any layout but it does not display PDF files, you need to convert the pdf files to single page images first but i know of a tool from pdf tools to convert a pdf to png per page. So when my plugin is finished i'll provide it along with the plugin.

The plugin uses a lot of code from the SumatraPDF plugin but that plugin used an external pdf viewer and i wanted my manuals to be displayed inside attract itselve as i can't use an external pdf viewer on the pi.

Anyway the plugin is not finished yet but does work already you can see a previous video here on my youtube https://youtu.be/KqkXegUpZPQ
« Last Edit: May 21, 2020, 05:45:02 AM by joyrider3774 »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #1 on: May 18, 2020, 06:31:25 PM »
i see custom1 activates it, but hgow are you then scrolling to next pic,  and exiting...

im using the sumatra plugin right now for an pinball fx 3 theme,,  this looks promising...
thanks im looking forward to see this.
help a friend....

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #2 on: May 18, 2020, 08:38:30 PM »
customn1 is definable you can choose any customn key. (like customn2 / 3 etc)

The same key is pressed again to go to the next page. There is no exit button i wanted to use just a single button. each press with the key loads (changes) the image until no file is found anymore then it hides. or if you switch games or launch the game it will hide itselve also. although if it's prefered i could try adding another customn key to cancel the image.

Edit: cancel key is added
« Last Edit: May 18, 2020, 09:48:07 PM by joyrider3774 »

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #3 on: May 18, 2020, 10:57:14 PM »
Added new options:

Preserve aspect ratio is working now



added option to display black background (to overlay everything)



or when when no keep aspect ratio is set the manual is stretched to screen dimensions


manzarek

  • Sr. Member
  • ****
  • Posts: 156
    • View Profile
    • YouTube
Re: Game manuals plugin i'm working on
« Reply #4 on: May 19, 2020, 06:17:55 AM »
great plugin  :)
Mame Fighting

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #5 on: May 20, 2020, 12:09:27 AM »
new video on the game manuals plugin. Add many new options and it will autodetect extension and give preference to video's first. So now you can also show instruction video's or games advertisements or first show the manual and at the end the instruction video or advertisement. Opacity can be set for both background + manual, background color can be changed.

https://youtu.be/bKykdoQ1BDQ

Neosys

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #6 on: May 20, 2020, 02:17:43 AM »
very good work. that looks great.  :)

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #7 on: May 20, 2020, 04:15:01 AM »
thanks there is only one downside... JPEG takes more space than PDF :(

i had about 20 gig of pdf converted to 80 gig of pngs (1 picture per page) i then converted those pngs to JPEG at 95% quality and it was about 60 gig. Am currently redoing them at 85% quality to see how big it is then. Space is not an issue for me though but just interested in knowing. Thats the only downside but for the rest i'm happy with it and i can use it on my raspberry pi also (also got a disk there)

EDIT: same manuals at 85% jpeg quality is only 36 gigabyte so going to use 85% almost halved in size compared to 95% quality
« Last Edit: May 20, 2020, 08:22:35 AM by joyrider3774 »

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #8 on: May 20, 2020, 11:52:59 AM »
ok i released an initial version of the plugin

available here https://github.com/joyrider3774/attract_gamemanuals_plugin

i included a simple batch file + pdftopng.exe to do your pdf conversions.

basically your pdf file has to be named the same as your rom's gamename in the romlist. and all you have to do then is run 'pdftopng.exe "filename.pdf" "filename"'  so you repeat the filename at the end without including .pdf it will create the correct png files then.

Be sure to read the readme on github it has all the info you need.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Game manuals plugin i'm working on
« Reply #9 on: May 22, 2020, 11:32:12 PM »
thanks there is only one downside... JPEG takes more space than PDF :(

i had about 20 gig of pdf converted to 80 gig of pngs (1 picture per page) i then converted those pngs to JPEG at 95% quality and it was about 60 gig. Am currently redoing them at 85% quality to see how big it is then. Space is not an issue for me though but just interested in knowing. Thats the only downside but for the rest i'm happy with it and i can use it on my raspberry pi also (also got a disk there)

EDIT: same manuals at 85% jpeg quality is only 36 gigabyte so going to use 85% almost halved in size compared to 95% quality

AM has some support for zipped artwork > https://github.com/mickelson/attract/issues/175. This might allow for further compression.

joyrider3774

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Game manuals plugin (Released)
« Reply #10 on: May 23, 2020, 03:55:16 AM »
yes i know about the zip support, but i also need a way to know (beforehand) that a certain file with certain filename exists and i don't think there is support for that with zip files. For normal files i had to use a workaround function to know if a file exists. If you know of a way to verify if a file inside certain zip exists please let me know then i can add support for it. The plugin checks if certain filenames exists and do it's logic on that. Its needed to know the difference between file available and thus showing either the file or a "no manual found" image
« Last Edit: May 23, 2020, 04:34:56 AM by joyrider3774 »

krizali1

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Game manuals plugin (Released)
« Reply #11 on: May 30, 2020, 11:46:25 AM »
Outstanding job joyrider!