Proposed change to make an "action" button

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

Poop Loops
Tranch (Novice)
Tranch (Novice)
Posts: 116
Joined: Sat Apr 18, 2009 9:08 pm
Location: Washington State

Post by Poop Loops »

What's the difference? I thought you just map a gamepad the same way you'd map a keyboard. Wouldn't it use the same sort of setup like a keyboard has with shift, alt, and ctrl?
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

you can compress the buttons into bits in a single 32-bit integer, you can't do that with the keys of a keyboard.

Also, many keyboards do not accept more than 4 simultaneous keys, and some keys might blank out others, depending on how your keyboard scans the key switches to look for pressed keys.
Poop Loops
Tranch (Novice)
Tranch (Novice)
Posts: 116
Joined: Sat Apr 18, 2009 9:08 pm
Location: Washington State

Post by Poop Loops »

bgbirdsey wrote:you can compress the buttons into bits in a single 32-bit integer, you can't do that with the keys of a keyboard.
There's no way to simulate a game pad on a keyboard? Like setting up your controls in controls.txt or in-game (and having to restart to take effect) where the game scans the file and only grabs the keys that are assigned in the file from the keyboard?
Also, many keyboards do not accept more than 4 simultaneous keys, and some keys might blank out others, depending on how your keyboard scans the key switches to look for pressed keys.
Yeah, that's always been a pain for me. Playing Street Fighter or even Super Mario on a keyboard is really hard when pressing both Up and Right makes neither work. =/ But I'm curious if that's a case of the hardware just being setup that way or basically the keyboard's drivers just treating it that way? Or if it's both? I'm not expecting you to know everything, by the way, I'm mostly just thinking out loud now. :)

But, thinking about it, I've definitely played games like FPS's that let me move both forward and strafe to the right when using WASD, for example, and also jump while moving, which would also require two keys. Is that just a whole other mess that just isn't that important compared to other things at this stage?

I'll actually look into this and see if it's something I could tackle... Hell, even if you decide my code is garbage, I'd still enjoy doing it. :)

EDIT: Wait a minute, I know I've done stuff like this in Egoboo. I pan the camera and move forward at the same time. Or is that just a case of each key performing its own action, but not being able to interact or affect another key?
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Post by Cimeries »

bgbirdsey wrote: Also, many keyboards do not accept more than 4 simultaneous keys, and some keys might blank out others, depending on how your keyboard scans the key switches to look for pressed keys.
Mine does that, it makes playing Frets on Fire (open source Guitar Hero clone) a real b**ch because I can never hold both the pick, the 4th and the 5th frets simultaneously...

This topic reminded me that I need to try playing Egoboo with my gamepad now.

Here is my mapping:

Move with left analog / direction keys.
Use left hand with 4 (identical in position to PS2's square).
Use right hand with 2 (identical to circle).
Inventory left and right with L1 and R1 respectively.
Drop left and right with L2 and R2.
Rotate with 9 and 10 (identical to select and start).
Zoom with 1 and 3 (triangle and X).
:wink:
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

I use the default, which is quite bad. I am used to it, though.

I think that both attack buttons and the jump need to be on the ABCD buttons. The inventory can stay on the R and L buttons. The default mapping for soulfu put the camera rotate on the R1 and L1, which was pretty useful. That won't really work in egoboo at the moment because the camera control is just one button that converts the joystick directions into camera movements.

I have 2 analog joys so I might like the option of controlling the camera with the other stick... ;)
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Maybe we should change the default joystick settings to something more friendly?
User avatar
Shade
Potion Mimic (Senior Member)
Potion Mimic (Senior Member)
Posts: 7349
Joined: Thu Jul 24, 2008 12:25 pm
Location: Gensokyo

Post by Shade »

Poop Loops wrote:
penguinflyer5234 wrote:It is when you hold the use button for a more powerful effect.


Thank you. That's been bugging me for a while.
Actually, if you're talking about the "Channeling" as obtained from an amulet of channeling (the one that makes your life bar blue), that one allows you to use up your life points as manal once your actual mana runs out.

I don't like the idea of forcing button combos to be used. Button combos would be insanely hard or even impossible to use on a keyboard if you wanted to keep moving at the same time, for example (which is very likely in a combat if you quickly need to whip out your life potions, for example); making it an optional possibility for gamepads that have fewer buttons than actually required for Egoboo sounds fine, though. I think it should just be stated in either the manual or the controls menu in-game that using button combos is possible, for people with older gamepads that have fewer buttons.

Also, the view Egoboo currently has is fine and fits it well. Don't change it, please.

@Zefz: The problem just is, not every gamepad uses the same numbers for the same buttons, and some even have a completely different layout. I have two, for example; while buttons #5 and #6 would be the front shoulder buttons with my newer gamepad, they would be actual fifth and sixth action buttons on my older one. So, while the one layout would work very well with certain gamepads, it would possibly be a pain with other ones. I don't think there really is a way to make an universal layout that works well with any gamepad.

In case you're interested, though, this is the layout I used to use with my newer gamepad (which has the same layout as an SNES controller, but with two pairs of shoulder buttons) when Egoboo still worked for me:

Code: Select all

Joystick 0
========
Jump		 		      : JOY_7
Left Hand Use		    : JOY_0
Left Hand Get/Drop	  : JOY_3
Left Hand Inventory	 : JOY_4
Right Hand Use		   : JOY_1
Right Hand Get/Drop	 : JOY_2
Right Hand Inventory   : JOY_5
Camera Control Mode	 : JOY_6
This layout uses the lower left two action buttons for using the hands and the upper right ones for get/drop commands, whereas the left hand is always the left button and right hand the right button. The front pair of shoulder buttons is used for handling the inventory. The back left buttons is used for camera control, and the back right one for jumping. The start and select buttons are unused.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

You can change the gamepad layout to anything you want by going to the controls menu, selecting the device you want to alter, clicking on the control value with your mouse, and then pushing the button on your controller.

It will work for any single button press, but combos would be very hard to set, since you would have to press bot of them within one update loop of each other :P
Poop Loops
Tranch (Novice)
Tranch (Novice)
Posts: 116
Joined: Sat Apr 18, 2009 9:08 pm
Location: Washington State

Post by Poop Loops »

Well, if somehow you did manage to get button combos working on a gamepad, you could always just keep keyboard settings as one key per action. I definitely have enough keys in range that it wouldn't bother me. :)
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

How hard would it be to make so that the mouse or gamepad players could also use the keyboard to move? (i.e have 2 keyboard players)
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

I think the move buttons are "hard wired". I doubt there is really enough room on one keyboard? If you could do keyboard and keypad, it might work.

I don't see really any way that the old controls.txt could used to define this. If you want to break backward compatibility, then I would say go to the ConfigFile type structure which is extensible, so you could add as many players as you want

Then you could have

Code: Select all

{Player_1}
[DEVICE]: "Keyboard"
[BLAHCOMMAND]: "BLAH"
{Player_2}
...
{Player_15}
...
Post Reply