Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Showing CP while game is paused  (Read 10642 times)

0 Members and 1 Guest are viewing this topic.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Showing CP while game is paused
« on: March 16, 2006, 12:16:31 am »
Just an update so you guys don't think I forgot....  I have started porting BuddaBings fine work for showing CP artwork with labeled buttons over to powerMAME.  So now when I press pause it shows an image of a control button with each button that is used by the game specfically marked telling me what it does.

I am not done yet, and unfortunately don't ever get a 5 hour block of time where I can complete it.

I am however chipping away at it.  I have a 2 year old and a 5 month old, so it is hard to get large blocks of time to do these things.  :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #1 on: March 16, 2006, 04:59:45 am »
I don't mean to lessen your efforts, but it makes a whole lot more sense just to use j5 and the ahk script I wrote for it.  There are countless threads about it in the software forum if you care to look.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Showing CP while game is paused
« Reply #2 on: March 16, 2006, 10:30:58 am »
Hey Howard,

I certainly know of that, although I don't know specifics about hos it works having never used it myself.  My understanding was that it wasn't a one click process though.  I may not be remembering correctly but I seem to recall one needing to pause, then hit some other button to launch the script that would load the image, then hit a button to kill the script, and then another one to unpause.

Is this correct?

So far the solution I have works automatically when pause is hit.  It also seems to render the image in its appropriate aspect.  No images need storage on your machine as they are generated dynamically.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #3 on: March 16, 2006, 11:56:37 am »
Using an external viewer such as Johnny, CPViewer, or my CPMaker viewer has some advantages over the compiled-in viewer:

1) You can use any version of MAME, not just PowerMAME or BuddaMAME.
2) You generally get a better picture with clearer text
3) You can launch MAME and the viewer on separate screens, if you have a multiple monitor setup.

Advantage #1 is obviously not much of an advantage for the PowerMAME user.

Using the internal artwork generator has some advantages over external artwork viewers.
1) Faster
2) No application switch necessary - displaying controls is seamless
3) No complicated and flaky scripts necessary.
4) More functionality than Johnny or CPViewer
5) CPMaker is open source, Johnny and CPViewer are not.

AHK is open source, however, so I endorse its use.





I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Showing CP while game is paused
« Reply #4 on: March 16, 2006, 02:16:17 pm »
My understanding was that it wasn't a one click process though.  I may not be remembering correctly but I seem to recall one needing to pause, then hit some other button to launch the script that would load the image, then hit a button to kill the script, and then another one to unpause.

Is this correct?
Realistically or theoretically.

Theoretically, the AHK script works as a one-click process just like you describe.

Realistically, 1 time out of 5 it displays the image but MAME keeps playing, or it doesn't unpause when you close the image, so the best way to use the script is to modify it so it uses one button to pause mame and another to call Johnny.

I have lots of details at http://www.mameworld.net/tigerheli/johnny/
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #5 on: March 22, 2006, 05:32:19 pm »
Using an external viewer such as Johnny, CPViewer, or my CPMaker viewer has some advantages over the compiled-in viewer:

Using the internal artwork generator has some advantages over external artwork viewers.
1) Faster
2) No application switch necessary - displaying controls is seamless
3) No complicated and flaky scripts necessary.
4) More functionality than Johnny or CPViewer
5) CPMaker is open source, Johnny and CPViewer are not.

AHK is open source, however, so I endorse its use.

I'll give you #1, it is faster... not sure what you mean by the others.

Going down the list:

2.) There is application switching, but the user will never know it or see it... it is seamless.

3.)  You could argue that the script is flaky at times, but it's by no means complicated.  As a matter of fact you just drop it in place 9 times out of 10 so you don't even have to know how it works.

4.)  Don't you mean the internal artwork viewer has LESS functionality than the external apps?  I mean mine for example allows icons, scrolling text and most importantly auto-generation of the layouts.  All the internal viewer can do is a display a png you rendered manually. Which is fine... if you only wish to run 10 or 20 games or have the patience of a saint.  Now you can also use j5 or the other viewers to generate images ahead of time, but that actually becomes more cumbersome and time consuming than just setting up a script to launch them during mame.  Also if you remap your controls for some reason, or mame changes the inputs, you are screwed, as you have to do them all over again.

5.)What in the world does open source have to do with this?  There's a reason j5 isn't open source btw.... it's so complicated nobody (that would be interested in working on it) could possibly follow how it works.  I don't mean to sound pretentious it's just that the app mimics mame's input macros and they change so quickly even I can't always keep up.  But I'm getting off topic here. 

I have no clue where your obsession with open source comes from.  Open source is only useful if people are willing to work on the code.  Unfortunately, this isn't the community for that. I offered to release the source to one of my old fe's a long while back (when mamewah wasn't even a thought) I got zero takers.  I found that rather odd considering at the time it was by far the most popular windows fe out there. 



I'm not saying that using the internal aw viewer isn't an option, I'm just saying that out of your 5 points only 1 and a half are valid.  :)

AW Pros:

The aw method is faster to display in mame.

Depending upon what script you use (the one button or two button)  it can be more reliable than a script. 

Aw Cons:

Unfortuantely the setup time for that method is unbearably long (generation of the images, AND the setup of a viewer) and if anything changes you have to do it all over again.

Since it's a static image, you can't have animations or any user interaction.

Because the aw system is low res, the image quality can be bad. 

Because the aw system requires a lot of resources if you put aw resolution to high res (so you can actually read the dang text) it can slow down the more modern games considerably. 

You are totally and completely dependant upon custom build authors to run your setup.  This sounds like a minor issue but it's not.  If the build dies, you have the option of either rolling your own build from now until the end of time, hoping and praying that the mame core doesn't change so much that the code change breaks, or stay with the last build and never upgrade again.  Remember guys, powermame (almost) died once already and it's only been two months!



Script Pros:

Faster setup time (just a script and the viewer setup to deal with, the latter of which you'd have to do anyway.)

Better image quality.

In theory no extra resources are used.  (The app is unloaded when not visible and while mame is paused it's not using any resources.)

The possiblity for animations and user interaction. 

Minimal re-configuring required for an input change (don't have to batch generate everything again, in the case of j5, if you remap it in mame you don't have to do anything). 

Dual screen mode. 

Considering you could potentially write a script to launch anything, this method has unlimited flexibility.


You don't have to wait for the next custom build release before you can upgrade mame.   Thus your aren't depedant upon custom build authors.  Again this is a BIG issue.


Script cons:

It takes longer for the layout to display.

Depending upon the script you use you might have some pausing issues.

Sporatic reports of ahk not working in 9x (can't confim this although I assume it as a given). 



So 2 pros vs 8 and 4 major cons vs 1 major con. 

Again, I'm not saying internal use isn't a valid option... it's just when you look at the stats, unless you are running 9x and are having issues it makes a whole lot more sense to run the viewers externally.



mccoy178

  • It's hard to work with a straight jacket on
  • Trade Count: (+9)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3127
  • Last login:September 03, 2021, 10:23:42 am
  • Go Bucks!
Re: Showing CP while game is paused
« Reply #6 on: March 23, 2006, 12:50:29 am »
I've got one for you Howard, what is the timing issue all about?  I know what the problem is, but again, why can't that be solved?  I am going to be resorted to using the pause button, then another button to display J5.  Of course, now I'll have them on the second monitor, so it won't be an issue. ;)

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #7 on: March 23, 2006, 04:34:26 pm »
Hi Howard,


2.) There is application switching, but the user will never know it or see it... it is seamless.

Not the last time I tried it. Then again, it was on my crappy laptop. I'll try again using a real computer.

Quote
4.)  Don't you mean the internal artwork viewer has LESS functionality than the external apps?  I mean mine for example allows icons, scrolling text and most importantly auto-generation of the layouts. 

I really like your scrolling text on labels, I'm stealing the idea. BTW the scrolling happens even when I have Scroll=0 in my layout file. Not sure what you mean by "icons" or "auto-generation of the labels".

Quote

5.)What in the world does open source have to do with this?  There's a reason j5 isn't open source btw.... it's so complicated nobody (that would be interested in working on it) could possibly follow how it works.  I don't mean to sound pretentious it's just that the app mimics mame's input macros and they change so quickly even I can't always keep up.  But I'm getting off topic here. 

I have no clue where your obsession with open source comes from.  Open source is only useful if people are willing to work on the code.  Unfortunately, this isn't the community for that. I offered to release the source to one of my old fe's a long while back (when mamewah wasn't even a thought) I got zero takers.  I found that rather odd considering at the time it was by far the most popular windows fe out there. 


Open source is important. Let's say I wanted (God help me) to write a Visual Basic program to map an image to a DirectX texture. Rather than consult a bunch of books and APIs I could just copy some code from someone who had already done it.

When I was writing the CPMaker GUI, I copied code from wherever I could get it, to avoid reinventing the wheel whenever possible. I have copied code from MAME, MAME32, Kymaera, Daphne, and other open source projects.

So your statement that "Open source is only useful if people are willing to work on the code" is dead wrong.

I'm looking forward to seeing your next version of DK. I hope you're devoting most of your development time on it.

I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Showing CP while game is paused
« Reply #8 on: March 25, 2006, 11:03:15 am »
Quote
4.)  Don't you mean the internal artwork viewer has LESS functionality than the external apps?  I mean mine for example allows icons, scrolling text and most importantly auto-generation of the layouts. 
Not sure what you mean by "icons" or "auto-generation of the labels".
There is a way for Johnny5 to display icons (like the ship images in Rock-Ola's version of Star Castle), rather than the text.  Never used it myself, but it's there.

auto-generation of the layouts, not labels - meaning if you assign a function to a different button J5 automagically picks it up without having to also create a new static image to be displayed.

 :cheers: <new smilies - Cool - I like the Troll one, but it doesn't apply here>
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #9 on: April 09, 2006, 05:54:51 pm »
I've got one for you Howard, what is the timing issue all about?  I know what the problem is, but again, why can't that be solved?  I am going to be resorted to using the pause button, then another button to display J5.  Of course, now I'll have them on the second monitor, so it won't be an issue. ;)

It's not really a "timing" issue pre-say, but rather there are points during focus switching when mame's input is essentially dead and you can't send anything to it. I haven't looked into it a whole lot, mainly because, like you, I'll have dual displays eventually.  But I could guess that it'll be very difficult, but not impossible to fix. 


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #10 on: April 09, 2006, 06:04:28 pm »
Hi Howard,


Open source is important. Let's say I wanted (God help me) to write a Visual Basic program to map an image to a DirectX texture. Rather than consult a bunch of books and APIs I could just copy some code from someone who had already done it.

When I was writing the CPMaker GUI, I copied code from wherever I could get it, to avoid reinventing the wheel whenever possible. I have copied code from MAME, MAME32, Kymaera, Daphne, and other open source projects.

So your statement that "Open source is only useful if people are willing to work on the code" is dead wrong.

I'm looking forward to seeing your next version of DK. I hope you're devoting most of your development time on it.



Well when my quote is taken out of context, it's wrong, but not in this instance. 

I'll bet you didn't improve on Kymaera or any of the other sources you took your code from did you?  So while it helped YOU and your projects, the original projects just lay there waiting for someone to pick them up (with mame being an exception of course).  So I repeat, making a project open source is useless (to that project) unless someone is willing to pick up the code. 

I don't like to argue for arguments sake but when I hear "dead wrong" and something I've said in the same sentence I know it has to be a mistake on the posters end seeing as I'm never wrong and all.   ;D

Heh... I've worked on dk a lot over the past year or so, but I'd hardly say I've devoted most of my development time to it.  If anything I've devoted a lot of time on my smaller projects, like j5, which I'll now have to make a new release seeing as how mame changed the default keys AGAIN and now mice are independant of each other. 

RobotronNut

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 315
  • Last login:December 22, 2018, 11:39:19 am
  • I want to build my own arcade controls!
Re: Showing CP while game is paused
« Reply #11 on: April 12, 2006, 03:28:09 am »
for you guys who can display a control panel while paused - how often do you use the feature?

i liked the idea at first, but after some thought, it seemed to me that you'd only really look at the control panel right at startup. since putting static j5-generated imgs into mamewah seemed like the path of least resistance, that's what i'm doing now, and i don't feel like i'm missing much.

once in a while, i start a game, realize i don't know the controls, immediately pop back out to the FE, and then immediately restart the game. but that's rare and painless. i don't think i've ever wanted to look at the control panel after getting well into a game.

also, i like looking at a photo of the original arcade panel, together with a j5 image simultaneously. do any of the paused cp viewers support that?
to see my "Frankenpanel" and design notes, click here.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Showing CP while game is paused
« Reply #12 on: April 12, 2006, 09:36:14 am »
also, i like looking at a photo of the original arcade panel, together with a j5 image simultaneously. do any of the paused cp viewers support that?
Not that I know of.  If it's only for a few games, the easiest way would be develop static images showing both the original CP and the J5 generated image as one .jpg.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #13 on: April 12, 2006, 03:44:09 pm »
Well j5 might be able to... sort of. 

See as of now it has icon support, which can load images based on control labels.  Now I'd have to go back and check my code, but in theory, you could name an image after the game name, turn on icons for that skin, and it'd be displayed. 

In practice though, it's not very practical. 

I always intended on giving the ability to display a dedicated image for each rom, but I haven't gotten around to it yet.  The main reason behind it is that control panel packs are in png format and j5 doesn't support pngs natively.  I'd have to add the stupid old paintX.dll back in, which sucks. 

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Showing CP while game is paused
« Reply #14 on: April 13, 2006, 11:55:20 am »
The main reason behind it is that control panel packs are in png format and j5 doesn't support pngs natively.  I'd have to add the stupid old paintX.dll back in, which sucks. 
Or let IrfanView batch convert all your CP .png images to .jpg in a couple of minutes.   8)
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Showing CP while game is paused
« Reply #15 on: April 13, 2006, 11:02:38 pm »
I was experimenting using a keyboard hook to detect a keypress. Then if it finds the Mame process by searching for "MAME:" in the titlebar it will get the ROM name which is in square brackets at the end of the title bar eg. [1942], it will then minimise Mame and launch a program passing the ROM name as a parameter. I don't know if it works better than using an AHK script, but feel free to use the code if it works any better. It works pretty quick, but I guess it's the generation of the CP that is slow. What part of displaying a CP using an external viewer is slow? Is it reading the control.ini file? Generating the graphics? Perhaps writing the actual viewer in very lean C++ might speed things up a bit?

Anyway below is the keyboard hook code an external viewer launcher..

CPLaunch.zip

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #16 on: April 14, 2006, 11:16:17 am »

also, i like looking at a photo of the original arcade panel, together with a j5 image simultaneously. do any of the paused cp viewers support that?


CPMaker will support marquee and control panel images in version v0.105. If farmboy90 or someone else puts the code into PowerMAME, then PowerMAME will have that capability as well.

Viva la open source!
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

RobotronNut

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 315
  • Last login:December 22, 2018, 11:39:19 am
  • I want to build my own arcade controls!
Re: Showing CP while game is paused
« Reply #17 on: April 14, 2006, 01:38:45 pm »
CPMaker will support marquee and control panel images in version v0.105.

niiiiice!
to see my "Frankenpanel" and design notes, click here.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Showing CP while game is paused
« Reply #18 on: April 14, 2006, 10:59:42 pm »
I always intended on giving the ability to display a dedicated image for each rom, but I haven't gotten around to it yet.  The main reason behind it is that control panel packs are in png format and j5 doesn't support pngs natively.  I'd have to add the stupid old paintX.dll back in, which sucks. 

Dosn't J5 use GDI+ for graphics display? Because GDI+ natively supports PNG format if it is.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #19 on: April 15, 2006, 05:15:09 pm »
j5 uses gdi as it is a vb app.  Vb can't natively load pngs without help.


headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Showing CP while game is paused
« Reply #20 on: April 16, 2006, 01:14:19 am »
j5 uses gdi as it is a vb app.  Vb can't natively load pngs without help.

You can use GDI+ in VB6


Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #21 on: April 16, 2006, 09:52:17 am »
There's a free, open source DLL of libpng compiled so that VB programs can access it.

Link, scroll down to LIBPNG_VB.DLL
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #22 on: April 17, 2006, 12:52:46 am »
lol paintx IS libpng wrapped with other libraries


anyway I've already added it back in, but thanks


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #23 on: April 17, 2006, 01:03:08 am »
j5 uses gdi as it is a vb app.  Vb can't natively load pngs without help.

You can use GDI+ in VB6




No you can't.  Not easily and natively.  Note that for that example to work you have to use their (extremely buggy) gdi+wrapper and the gdi+ libraries.  Not only that, but due to the buggy wrapper you can't test it until you've compiled the app (thus making debugging impossible) and the call to do such a simple thing is still rather bloated in the setup.  It's not real bloated, but still... loading a image should never take more than one line.


To put things in perspective, the paintx.dll I was complaining about only requires the following line to setup:

Dim MyDecoder as New PaintX.picturedecoder


And to use it:

Picture1.picture = mydecoder.loadpng ("c:\test.png")


That's why I don't fool with gdi+ and stick to regular built-in gdi calls. If i were going to use complicated api calls to manipulate graphic in j5, I'd just build a directX engine, like I do with my other apps. 


Thanks for the suggestion though, I just don't see how doing it the hard way would make things easier. ;)

RobotronNut

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 315
  • Last login:December 22, 2018, 11:39:19 am
  • I want to build my own arcade controls!
Re: Showing CP while game is paused
« Reply #24 on: April 17, 2006, 08:28:24 am »
do paintx / libpng also support writing PNGs?

if so, could you eliminate the need for IrfanView without dropping PNG creation?
to see my "Frankenpanel" and design notes, click here.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #25 on: April 18, 2006, 06:05:28 pm »
Unfortunately no... the only plugins/dlls/ect that let you encode to png require a liscense.  And since I'm not willing to pay 500 bucks to write pngs I think I'll pass.  ;)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Showing CP while game is paused
« Reply #26 on: April 19, 2006, 12:14:23 am »
It's a shame you write your stuff in VB6 Howard. I suppose it's because you wrote it so long ago, but I hope you write your new stuff in C++ or even .NET. VB6 was a good language for quick knock up apps and the like back in the days, but with VB.NET there is no need for it. If you are stuck with Visual Studio 6, then I would ditch VB and go with C++. I used to code in VB6 and it's not that hard to move to C++ although making GUI's is a ---smurfette---. MFC is the solution to that. Plus your compiled code is leaner, faster and with no dependency on the vb6 runtime. Plus you can do threading and subclassing a forms message system dosn't make the debugger unstable. I dunno, I just think VB6 has been dead for a long time - time to upgrade and get the respect of a C++ coder! Also you could finally load/save png! Alpha channel is dead handy especially for overlaying buttons on a background ;)

MikeQ

  • Guest
  • Trade Count: (0)
Re: Showing CP while game is paused
« Reply #27 on: April 19, 2006, 09:17:29 am »
Unfortunately no... the only plugins/dlls/ect that let you encode to png require a liscense.  And since I'm not willing to pay 500 bucks to write pngs I think I'll pass.  ;)

libpng does support writing png's.  I've used libpng at work for some automated testing tools and had to write png files with it.

png_write_image is the interface.  There is a bunch of other stuff you need to do before calling this though.  You needs to setup some structures and compression information.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #28 on: April 19, 2006, 03:20:30 pm »
It's a shame you write your stuff in VB6 Howard. I suppose it's because you wrote it so long ago, but I hope you write your new stuff in C++ or even .NET. VB6 was a good language for quick knock up apps and the like back in the days, but with VB.NET there is no need for it. If you are stuck with Visual Studio 6, then I would ditch VB and go with C++. I used to code in VB6 and it's not that hard to move to C++ although making GUI's is a ---smurf---. MFC is the solution to that. Plus your compiled code is leaner, faster and with no dependency on the vb6 runtime. Plus you can do threading and subclassing a forms message system dosn't make the debugger unstable. I dunno, I just think VB6 has been dead for a long time - time to upgrade and get the respect of a C++ coder! Also you could finally load/save png! Alpha channel is dead handy especially for overlaying buttons on a background ;)

.net is crap... it's bloated an contains bad objects and poor structuring techniques.  Nuff said on that one. I went through a period of 6 months where I was going to port dk to .net  After my inital tests showed that the new port would require even more code a larger dependency set (vb6 runtimes are only 5-10 megs and are included with xp, while the .net framework is 25-30 megs and strangely enough does not come with xp) and ran 10-15% SLOWER I decided to just leave it as-is.   

I have no problem with c++ and believe it or not I can code in it.  But how exactly would that benefit me?  I'd have to deal with headers, overcomplicated structure setups and stuff that I simply don't need to deal with for such simple apps. 

And when I do complicated apps, I write a vb6/dx8 combo.  dx does all the graphical "heavy lifting" while vb6 only has to handle the managment of files and data, which it is quite good at. 

Alpha channels are quite handy, that's why they are included in dk's code.  They aren't included in j5 because they aren't needed, and I want to keep the app trim so it'll run on any pos that can handle windows. 

MikeQ, I didn't know that!  I'll look into it, although I'm not sure if the paintX compile supports this.  I can always use plain old libpng though as the setup is similar.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #29 on: April 19, 2006, 03:24:16 pm »
I use the libpng library in my open source utility  ;D mng2avi. You can look in the mng2pngs.c file for an example of usage.

Link to mng2avi project.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 15, 2024, 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Showing CP while game is paused
« Reply #30 on: April 19, 2006, 04:17:44 pm »
Thanks for the help guys.

I found a new dll(or new to me anyway, the last time I checked in on this project it was crap) called freeimage.  It has lib png, lib mng, lib whatever, and even zlib all rolled into one, with a handy .bas file to run it all from. 

This is what I've been looking for, a single dll I can include in my projects with minimal code that'll cover everything I need to do.  I need to research it a bit more as it seems to have trouble with picture boxes when outputting to png, but other than that it works great. 

Think I might drop the irfanview support if I can get this working properly.

MikeQ

  • Guest
  • Trade Count: (0)
Re: Showing CP while game is paused
« Reply #31 on: April 19, 2006, 08:34:12 pm »
Unfortunately no... the only plugins/dlls/ect that let you encode to png require a liscense.  And since I'm not willing to pay 500 bucks to write pngs I think I'll pass.  ;)

libpng does support writing png's.  I've used libpng at work for some automated testing tools and had to write png files with it.

png_write_image is the interface.  There is a bunch of other stuff you need to do before calling this though.  You needs to setup some structures and compression information.

No the one I use.  It is GPL and writes em' just fine.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Showing CP while game is paused
« Reply #32 on: April 20, 2006, 02:36:39 pm »
for you guys who can display a control panel while paused - how often do you use the feature?

i liked the idea at first, but after some thought, it seemed to me that you'd only really look at the control panel right at startup. since putting static j5-generated imgs into mamewah seemed like the path of least resistance, that's what i'm doing now, and i don't feel like i'm missing much.

once in a while, i start a game, realize i don't know the controls, immediately pop back out to the FE, and then immediately restart the game. but that's rare and painless. i don't think i've ever wanted to look at the control panel after getting well into a game.

also, i like looking at a photo of the original arcade panel, together with a j5 image simultaneously. do any of the paused cp viewers support that?


screen shot..................
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!