Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2010-12-23 18:14:08

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Giving more buttons to 'on_button_press'

I want to make an 'action button' of some sort that doesn't do anything other than trigger objects... like 'n' or something.

This is so when you activate an object that won't disable movement (like surged objects) you can activate them through hitting the action button without you jumping, crouching, etc.

Is this doable?

Offline

#2 2010-12-23 22:12:06

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Giving more buttons to 'on_button_press'

SilverstepP wrote:

Is this doable?

Unfortunately no.

First of all, the engine is transparent to whatever input device the player is using. It doesn't matter if it's the keyboard or a joypad: the events will be triggered the same way.

Second, and it's been in the TODO List for some time, at some point we'll develop a screen which will enable users to customize controls. Right now one plays, when using a keyboard, with Arrows+Space+Ctrl+Esc, but that may not be the case. Due to this, we do not plan to give direct access to the keyboard via scripting.

Third, adding more buttons to the engine may not be feasible since it would require joypads with more buttons, and not everyone has these.

So you gotta use what you have. Use some creative combination of the existing buttons to achieve the desired effect (like Up+Fire2 does something special). Functions like character switching, pause and leaving the level are not built-in into the engine anymore; they're controlled via scripting, so you can customize them out. http://opensnc.sourceforge.net/wiki/ind … on#startup

Offline

#3 2010-12-23 22:57:21

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: Giving more buttons to 'on_button_press'

Alexandre wrote:
SilverstepP wrote:

Is this doable?

Unfortunately no.

First of all, the engine is transparent to whatever input device the player is using. It doesn't matter if it's the keyboard or a joypad: the events will be triggered the same way.

Second, and it's been in the TODO List for some time, at some point we'll develop a screen which will enable users to customize controls. Right now one plays, when using a keyboard, with Arrows+Space+Ctrl+Esc, but that may not be the case. Due to this, we do not plan to give direct access to the keyboard via scripting.

Third, adding more buttons to the engine may not be feasible since it would require joypads with more buttons, and not everyone has these.

So you gotta use what you have. Use some creative combination of the existing buttons to achieve the desired effect (like Up+Fire2 does something special). Functions like character switching, pause and leaving the level are not built-in into the engine anymore; they're controlled via scripting, so you can customize them out. http://opensnc.sourceforge.net/wiki/ind … on#startup

When you start with remappable controls, would adding an extra button to the default controls be feasible? Like a 'fire5' that is only used for object interaction as opposed to using the entire keyboard? I think that a single extra button shouldn't overcrowd a joystick, and it would be something that doesn't have any other action associated with it.

Offline

#4 2010-12-24 00:34:55

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Giving more buttons to 'on_button_press'

I'm sure you can figure out something creative with the existing buttons. There's a considerable combination of buttons you can use. You can even use a timer to create sequences of buttons.

Offline

#5 2011-01-04 21:10:56

J0nnJ0nes
Member
Registered: 2010-05-19
Posts: 180

Re: Giving more buttons to 'on_button_press'

As a neutral, factual point, 4 buttons is the minimum of the general controllers around the time of Sonic: A, B, C, and Mode usually, or similar. Then they came up with 6+, etc.

I'm more partial toward more buttons available, even if they're not used. Although with so many powers planned, at least a few might be filled. It might be a good idea, but it's certainly no where near a priority right now. You CAN make due with just combos for now.... if you're not sure how, look at all the combos for the Mortal Kombat games on SEGA Genesis.

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org