Software Support > GroovyMAME

Lightgun flasher over groovymame in fullscreen

<< < (4/17) > >>

Rion:

--- Quote from: psakhis on September 13, 2022, 07:40:24 am ---For example, if you set 32 frames, will be more than 25 frames with gain applied after button is pressed regardless if button is released.

The "counter" of this frames is set to 0 when button is pressed, i understand you want a fixed number of frames regardless button is pressed or released?

This is posible and easy to add to plugin.

--- End quote ---

Yeah that's a great idea.
Perfect for games like Operation Wolf, Terminal 2, Alien 3 etcetera.

phasermaniac:
So, this way I get the short flash effect I talked about:

--- Code: ---
local function process_button(button)
local pressed = input:seq_pressed(button.key)
if pressed then          
if num_frames < button.off_frames then              
        gunlight_frames = 1
        gunlight_brightness_gain = button.brightness_gain
gunlight_contrast_gain = button.contrast_gain
gunlight_gamma_gain = button.gamma_gain
        end
return 1
else
        if num_frames < button.off_frames and (init_user_set.brightness < gunlight_user_set.brightness or
                                               init_user_set.contrast < gunlight_user_set.contrast or
                                               init_user_set.gamma < gunlight_user_set.gamma) then              
        gunlight_frames = 1
        gunlight_brightness_gain = button.brightness_gain
        gunlight_contrast_gain = button.contrast_gain
        gunlight_gamma_gain = button.gamma_gain
        else
        gunlight_frames = 0
        num_frames = 0
        end
button.counter = 0
return 0
end
end

--- End code ---
Try it, it would show the flashing the shorter possible. You would have to mess with "frames to apply gain" that would vary depending on the game. (>2 and set the minimum that let fire shots in dark places)

On another hand I tested deeper to set 2 flasher buttons, and no way. I tried in the crt arcade with 2 guns but you can also test with two buttons of mouse, same buggy results, test yourself.

Finally, are you sure contrast and gamma does something? I mean they lighten light and medium colors, but not dark, which is what we need. Maybe an "inverted gamma" would be the less noticeable thing that would work, I mean lighten only dark colors. But anyway, for me brightness_gain works nice

psakhis:
Now:
When "frames to apply gain" = 1 --> Apply gain when button is pressed on frame, normally are 3 or 4 frames.
Every number X > 1 is applying gain on the next x-1 frames when button is released

Your approach:
When "fixed frames to apply gain" = 1 --> Apply gain only if pushed button in the frame (no difference of actual solution)
Every number X > 1  --> Apply gain on the frame and next X frames. Considerations here:
    - If frame has button pushed -> i understand always is needed apply gain
    - If frame has button released -> which frame counter do you consider? I assume the first one, the last one is the actual solution.

Probably for 2 players is needed 2 buttons configuration on plugin...

phasermaniac:
I don't understand your explanation, what I wanted to do is:
Press button -> apply X frames of gain. No matter when you release the button.


--- Quote ---Probably for 2 players is needed 2 buttons configuration on plugin...
--- End quote ---
Ok can it be done? Or some clue to make it work?
It seems to be contemplated, you can add two different buttons in menu, it detects gun1 and gun2 buttons independently...
In the ini.lua code these loops seems to handle this, true?
for i, button in ipairs(buttons) do...
for i, state in pairs(button_states) do...
the problem might be there, or am I wrong?

psakhis:

--- Quote from: phasermaniac on September 13, 2022, 02:40:32 pm ---I don't understand your explanation, what I wanted to do is:
Press button -> apply X frames of gain. No matter when you release the button.

--- End quote ---
It's just then plugin does. I think the problem is only on multi button setup, this needs rewrite of some parts for be treated in a common way..

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version