Topic: rev. 607: new joypad buttons

the new revision includes a new option on the settings screen: it's now possible to enable/disable the gamepad. The gamepad was always enabled by default, but that caused some problems for linux users.

http://upload.surgeswarehouse.com/upload/Friday30thofDecember2011061751AM.png

also, it's now possible to use, via scripting, up to 12 buttons on a joypad! (4 directions + fire1, fire2, ..., fire7, fire8). In case of a joypad having less than that amount of buttons, the engine will degenerate beautifully, and everything will work.

How to use: http://opensnc.sourceforge.net/wiki/ind … user_input

note: that's untested, so I'm asking your help to do it. Please give me some feedback.

Re: rev. 607: new joypad buttons

Impressive stuff. Most impressive stuff!

Re: rev. 607: new joypad buttons

Alex, you're getting out of hand big_smile big_smile

may i suggest:

QWER
ASDF

as the 8 buttons? maybe keep ESC and ENTER as fires for ease of menu navigation. It would make playing with keyboards muuuuuuch easier.

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: rev. 607: new joypad buttons

KZR wrote:

Alex, you're getting out of hand big_smile big_smile

may i suggest:

QWER
ASDF

as the 8 buttons? maybe keep ESC and ENTER as fires for ease of menu navigation. It would make playing with keyboards muuuuuuch easier.

Ok, I could not play with the layout like that, let alone it be much easier. :-/

We can reconfigure the buttons eventually, correct? I actually prefer the first eight buttons where they are if they keep their old functions... however, I'd actually rather the a,d,s,w keys be z,x,c,v respectively, so they'd be near the space bar and they can be hit more easily. But that's just my own personal desire of the layout.

Re: rev. 607: new joypad buttons

idk, usting ctrl is kind of weird roll lol

but yea we should be able to choose buttons, itd be prtty awsome. wink

Re: rev. 607: new joypad buttons

we cannot have a control-customization screen right now, but we can have a script file that enables you to configure the controls. whenever you want to change the controls, you change the script.

Re: rev. 607: new joypad buttons

Alexandre wrote:

we cannot have a control-customization screen right now, but we can have a script file that enables you to configure the controls. whenever you want to change the controls, you change the script.

That would be perfect. So, for example, that means I can map 'fire5' to any key on the keyboard, right?

Can we get a bleeding edge soon? Or an update for the release in dropbox? It seems the nightly build skipped last night... I wanna try this so badly.

Re: rev. 607: new joypad buttons

SilverstepP wrote:
Alexandre wrote:

we cannot have a control-customization screen right now, but we can have a script file that enables you to configure the controls. whenever you want to change the controls, you change the script.

That would be perfect. So, for example, that means I can map 'fire5' to any key on the keyboard, right?

Can we get a bleeding edge soon? Or an update for the release in dropbox? It seems the nightly build skipped last night... I wanna try this so badly.

yes, you can reconfigure the keys. In fact, you can do more than that. By hacking config/input.def, you can configure multiple input devices. In addition to that, by combining it with the set_player_inputmap command, you can create local multiplayer games! (like a 2-player fighting game)

this all comes in rev 610. cool

it's all untested, so it would really help me if users give me some feedback. If there are bugs, report them. If not, please tell me everything is working correctly.

I know that this feature, although not strictly required for 0.2.0, is highly desired by modders. Hence, this is my xmas/new-years gift for all modders in the community. smile

Re: rev. 607: new joypad buttons

*falls off the chair with a loud noise*

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: rev. 607: new joypad buttons

*falls off chair with louder noise*

T_T Bleeding edge why aren't you here yet.

Re: rev. 607: new joypad buttons

the bleeding edge is there

feedback would be appreciated

Re: rev. 607: new joypad buttons

Downloading build 612 to test it a short while before I rush off for tonights festivities.

Re: rev. 607: new joypad buttons

Well:

object "New Button Tester"
{
    requires 0.2.0
    category "AAA_INTESTING"
    always_active
    state "main"
    {
        set_player_inputmap "Silver Style"
        on_button_pressed "fire5" "5"
        on_button_pressed "fire6" "6"
        on_button_pressed "fire7" "7"
        on_button_pressed "fire8" "8"
    }
    state "5"
    {
        play_sample "samples/bosshit.wav"
        return_to_previous_state
    }
    state "6"
    {
        play_sample "samples/bosshit.wav"
        return_to_previous_state
    }
    state "7"
    {
        play_sample "samples/bosshit.wav"
        return_to_previous_state
    }
    state "8"
    {
        play_sample "samples/bosshit.wav"
        return_to_previous_state
    }
}

This worked completely as expected! (The input map test I did also worked) Awesome! big_smile