| Main > Main Forum |
| Tron, in game 8way to 4way - WORKING! 100% |
| (1/12) > >> |
| Le Chuck:
Okay, so I'm trying to tackle the light bike diagonal issue in Tron. My setup is a GGG Omni2 hooked to a servo controlled via DaOld Man's uber awesome JoyChoose Plugin. Tron is of course an 8 way with a specialty restrictor. As I don't have a dedicated stick (I'm using a wireless triggerstick hot-swap mod) I don't have that funky 8way but really a 4 way restrictor. What I want: When I go into lightbikes I want the servo to clock over to 4way so I can stop getting ---my bottom--- handed to me. The way I think I can solve the issue now: Run a batch on Tron start-up that initiates an AHK script that will call my batch for moving to 4way on a certain button press. Another Script will run the 8way on a different button press once I'm done owning those dastardly yellow bikers. Why I don't like this solution: Press a button? Seriously, there has gotta be a more elegant (read idiot proof) way. What I'm thinking: It would be nice if a program running outside of MAME had a way to tell the lightbike stage apart from other stages, like a call from MAME on that stage entry and then we could just route that call to my servo batch files. Is this possible, is there a better way I'm not thinking of, am I stuck having to press a button? Will my press a button solution work? Has anyone else cracked this nut? |
| Thenasty:
the best way of course is using the TROn Stick or that special restrictor (if one exist). If you want to push a button to activate it to be 4-way, this works specially if you have 2 joysticks (1 8-way, 1 4-way). Just have both stick be configured for that game and when light cycles is choosen, just grab the other joy that is set to 4-way :) I have not seen a HACK where they actually change the way TRON GAME works. So when Light Cycles is chossen, it trigger a realy switch to activate yto 4-way then back. So I say, IMPOSSIBLE but nice to dream about its existance (if there is). |
| nitz:
--- Quote from: Le Chuck on January 19, 2012, 10:14:45 pm ---What I'm thinking: It would be nice if a program running outside of MAME had a way to tell the lightbike stage apart from other stages --- End quote --- You can do this with AHK (I've done something very similar to this) provided the following 3 things are true: 1) There is some portion of the screen that is exactly the same everytime the lightbike stage comes up and is not that way anywhere else in the game. 2) There is some portion of the screen that is exactly the same everytime the lightbike stage is finished. 3) You don't mind doing some work. ;) Take screen shots using the printscreen key to satisfy both 1 and 2. Use paint to cut out just the part of the image you need - the part that is always the same. Make sure you save them as bitmaps. Let's call them lightBikeBegin.bmp and lightBikeEnd.bmp Then try this script: --- Quote ---Loop { <run batchfile to switch to 8 way> Loop { ImageSearch,,, X1, Y1, X2, Y2, lightBikeBegin.bmp If (ErrorLevel = 0) { break } } <run batchfile to switch to 4 way> Loop { ImageSearch,,, X1, Y1, X2, Y2, lightBikeEnd.bmp If (ErrorLevel = 0) { break } } } $esc:: send {esc} exitapp --- End quote --- If you're not already familiar with imagesearch, see the relevant section in the AHK help file. Basically this script sets it to 8 way, then the first imagesearch loop waits to see the lightbike part, that loop exits and sets it to 4 way, then the second imagesearch loop waits to see the lightbike part end, then jumps back to the top of the main loop to set to 8 way and start the process again. The esc hotkey allows you to exit mame and the script by pressing escape. Obviously you need to change this if you use something other than escape to exit mame. A couple of points: The image on screen must match your bitmap image EXACTLY. So if you fiddle with mame's brightness, try some new scanlines or change your resolution, the script will stop working. The portion of the screen you search for should be as small as possible. You don't want the script to spend time searching a part of the screen where the image does not appear, because then the image may go away before the script sees it. This should work for you if you want to take the time to try it out. :cheers: |
| ahofle:
I know this won't help the OP since he is using an 8-way, but wanted to point out that Tron works just about perfectly with an analog stick + MAME's joystick mapping function + a custom Tron map that makes it harder to hit diagonals, just like the real game. See this thread for more info: http://forum.arcadecontrols.com/index.php?topic=99988.0 |
| Le Chuck:
Thanks Nitz, I'll for sure dig in and see what I can come up with. I think the lightbike boarder wall is consistent from stage to stage but I'll play with it this weekend. I will need to run two scripts so I can have it for verticle and horizontal screen orientations. I'll post up once I've got it going or have hit a wall and need more help. |
| Navigation |
| Message Index |
| Next page |