Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[APPLICATION] Abobo's Big Adventure (Offline GUI)


Adultery

Recommended Posts

Adultery can correct me if I'm wrong (natch), but I don't know if it would be possible to implement gamepad remapping in an elegant fashion that didn't utilize some sort of wonky hack.* The thing about a .swf is that it's a compiled object whereas any of the key mapping functionality has been implemented before compiling. I don't know if I've ever seen a flash game that natively supports gamepads (for one thing the game would have to interface with native gamepad drivers which in turn would make the flash game itself platform dependent).

* However . . . it might be possible to include some sort of AutoHotKey script with the game (or simply create your own) in which the script handles gamepad mapping. The wonky part here is that the script would simply interpret your gamepad input as key presses (much the same way the Xpadder or Joy2Key would). Furthermore the script would break if you changed the key inputs within the game itself.

Seriously though Xpadder is lightweight, easy to use, and completely awesome (Not sure about Joy2Key but I'd assume the same could be said of it). Even if you did just use it for this game, it's a great tool to have available in your arsenal. Who knows if you might need it in the future?

Link to comment
Share on other sites

Actually... :)

The way I implemented the SWF, I might have been able to make it work. If I could find a good way to detect the key presses on the joypad, I could use the MyBase.KeyDown event to send that press as a key stroke through the form. To be 100% honest, it's more than I felt was worth doing since Xpadder is really awesome (as Null said) and the software does a way better job than I would have done with assigning keys and whatnot. I'm already in love with Xpadder and not looking to re-create it. Xpadder runs darn near every command on my cainet from the time GameEx starts until GameEx closes. I'm even finishing up a plugin that completely automates Xpadder's command lines so I don't need to do anything other than make the profile (the way it is now, xpadder steals focus and gets stuck if there's no profile for that emu/game and you pass it a command. My quick plugin does this:


Public Shared Sub Start_Xpadder()
If File.Exists(Xpadder.Emu_Name & "_1.xpadderprofile") And File.Exists(Xpadder.Emu_Name & "_2.xpadderprofile")
Then
Xpadder.Launch_Before = Xpadder.Emu_Name & "_1 " & Xpadder.Emu_Name & "_2 /M"
Else
If File.Exists(Xpadder.Rom_Name & "_1.xpadderprofile") And File.Exists(Xpadder.Rom_Name & "_2.xpadderprofile")
Then
Xpadder.Launch_Before = Xpadder.Rom_Name & "_1 " & Xpadder.Rom_Name & "_2 /M"
Else
Xpadder.Launch_Before = "Default_1 Default_2 /M"
End If
End If
Start_Xpadder()
End Sub
Private Sub Start_Xpadder()
Try
Dim p As New ProcessStartInfo
p.CreateNoWindow = True
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = Xpadder.Path
Process.Start(p)
Catch ex s Exception
log.Write_Data("Error starting Xpadder!")
End Try
End Sub

In all honesty, you could get Xpadder just for this game and set it up in options so GameEx wouldn't ever need to pass anything other than a launch command. The game only needs a handful of buttons, so it would be quick and easy to do a profile. The EXE handles launching and closing on its own (so this front-end for this game doesn't require my GameEx plugin to work). It really doesn't get easier than that (or less complicated). Well, unless you just use the keyboard. :)

/end my 2c

Link to comment
Share on other sites

Isn't Xpadder (and Joy2Key for that matter) a program that requires a purchase/license?

I think that there's still a free version of Xpadder (it's an older version). The Xpadder site is blocked on my current machine, but if you're interested and can't find it on the official site, I'll do some searching around when I get home. If you're interested and in a hurry I just noticed that MajorGeeks has the free version right here.

Sorry for off-topic. :mellow:

Link to comment
Share on other sites

Ok, I got Joy2Key, created a profile, and was able to control the game with my GamePad. Couple of issues came up though. First of all, when you click OPTIONS, it brings up the dialog for the keymapper settings, but I don't know what command line to send for it to work. Also, for some reason it didn't save my profile in Joy2Key so I have to recreate it. Also, I noticed their's no [X] icon to close the OPTIONS window once it's opened. It closed ok with the ESC key, but you should probably make some sort of button for the idiots like me to know where to close it. Or at least have the [Apply] button also close the window.

Link to comment
Share on other sites

Roger that! The [APPLY] button now closes the window as well. (Good call!) I wanted to make a red X in 8-bit style but didn't get to it. [ESC] and [bS] also close the window.

I'd like to help with Joy2Key but I don't use it. I tried finding command line params online but no joy. Hopefully someone else here uses it and can help with that. :(

Link to comment
Share on other sites

I've tried this configuration, but doesn't work. Maybe I need some "" somewhere.

Application Path: M:\Joy2Key\JoyToKey.exe

Launch Command: Joy2Key.exe aba.cfg

Exit Command: taskkill.exe /F /IM JoyToKey.exe

But that doesn't work. I hear a ding, and look and see that Joy2Key launches, but it doesn't load the config. And when I close the game, the exit command doesn't work either.

Yeah and the backspace key to exit the options window is annoying as hell! Especially when you're trying to configure the keymapper!

Link to comment
Share on other sites

NEWSBREAK!

Looks like you don't have to donate to get the game for free. This whole concept was a trial idea. So it worked... But they must have updated the website recently because now you can download the full game. Just go to the main website: http://www.abobosbigadventure.com/fullgame.php and click the download link: http://www.abobosbigadventure.com/aba_PC.zip The only problem is you don't get all of Adultery's hard work for the extra artwork, options menu, offline protections, etc. I don't even know if it allows you to save (since Adultery's version hooks a save function for you). Just throwing it out there.

Link to comment
Share on other sites

The exit command isn't gonna work that way unfortunately. The way it's set up is to parse command line arguments to the joy mapper process. In your case you're sending:

M:\Joy2Key\JoyToKey.exe taskkill.exe /F /IM JoyToKey.exe

Obviously that's not gonna work, so I need to figure out a way to get around that.

:EDIT: Hey try this Han. You should be able to use that command line to exit now if I did it right.

aba_beta.rar

Link to comment
Share on other sites

When I try the new exe, I get a crash when I hit the EXIT button in the game:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)

at System.Diagnostics.Process.Start()

at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)

at Abobo.Main.Button_Exit_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.261 (RTMGDR.030319-2600)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

Abobos Big Adventure

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///M:/_PC/Abobo's%20Big%20Adventure/Abobos%20Big%20Adventure.exe

----------------------------------------

Microsoft.VisualBasic

Assembly Version: 10.0.0.0

Win32 Version: 10.0.30319.1 built by: RTMRel

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

----------------------------------------

System

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.261 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Core

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.233 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

----------------------------------------

System.Windows.Forms

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.235 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System.Drawing

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 built by: RTMRel

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Runtime.Remoting

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

----------------------------------------

System.Configuration

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Xml

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.233 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

Link to comment
Share on other sites

Oh yeah, I totally based my version off the offline version. I just thought they could have done it better Theirs doesn't offer key mapper integration or any kind of save containment (if you delete your cookies you lose your progress). Their online version is 1.2, I got 1.4 from their offline version. :)

I'm also adding a resolution hook so you can specify the resolution you want instead of having it hard coded at 545x545. It's cool they released an offline version, I just felt it was kinda plain and the save system is frustrating. :)

I already emailed them and they basically said "go ahead but we offer an offline version already". This is more of a standalone solution than theirs IMHO.

Link to comment
Share on other sites

Since I'm going to use this in my GameEx setup, I guess I don't really need the extra command line to taskkill joy2key. I can setup GameEx to send that command on Launch After right? Only bummer is that it will send it on ALL roms I have in that path (Its my PC, .LNK path).

Link to comment
Share on other sites

Heh new error:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.InvalidCastException: Conversion from string "taskkill.exe" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.

at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)

at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)

--- End of inner exception stack trace ---

at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)

at Abobo.Main.Button_Exit_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.261 (RTMGDR.030319-2600)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

Abobos Big Adventure

Assembly Version: 1.4.0.0

Win32 Version: 1.4.0.0

CodeBase: file:///M:/_PC/Abobo's%20Big%20Adventure/Abobos%20Big%20Adventure.exe

----------------------------------------

Microsoft.VisualBasic

Assembly Version: 10.0.0.0

Win32 Version: 10.0.30319.1 built by: RTMRel

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

----------------------------------------

System

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.261 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Core

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.233 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

----------------------------------------

System.Windows.Forms

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.235 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System.Drawing

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 built by: RTMRel

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Runtime.Remoting

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

----------------------------------------

System.Configuration

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Xml

Assembly Version: 4.0.0.0

Win32 Version: 4.0.30319.233 built by: RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

Exit Command: taskkill.exe /f /im joy2key.exe

(no quotes)

Link to comment
Share on other sites

No worries Han. I'm going to have to make the viewable area base on your resolution (I'll figure out the equation to use. No big deal there, just may take a few).

I see your buttons are rendering all retarded too, so I'll have to draw the buttons on the form instead of overlaying an image (also no big change there). I wanted to make the SWF size user-configurable anyways (I noticed my cabinet has a small window too), but I need to do a better measurement of screen size vs EXE size.

I'm going to add in a command so all you have to do is write "kill" in the command line after box and try killing the process in code instead of having all that extra stuff. So in your case it would do this:


Dim pl() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("joy2key.exe")
For Each p As System.Diagnostics.Process In pl
proc.Kill()
End If

That will handle it for sure. I already have the process name from the user, so no biggie there. The method I was using was silly anyhow (trying to run taskkill.exe as a process when I could easily kill the process manually anyhow). The harder part for me will be display size vs screen resolution. I'll have a new betya up for you by morning. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...