On player input

Posted by Taizen Chisou on Oct. 17, 2012, 12:50 p.m.

So, I posted a blog about two and a half weeks ago asking various questions regarding some mechanics and mess for my game, among which was one about remappable keys, and how they'd be Pretty Cool.

(Especially because the Yes Button defaults to the X key. *evil laugh*)

I've gone and made remappable keys, but it's rather obtuse. You change the ASCII value the game looks for and save it as a text file. If you're dumb and assigned two buttons to one key, or saved a key outside standard keyboard layouts (such as 11 or 254 some random shit), the game would step on your pitiable preferences and replace them with the defaults. So far so good, even if an internal key mapper would be quite sexy.

Now, here's another thing: how many of you would fancy using a gamepad for this stuff?

I've discovered that this idea isn't Totally Stupid, because I've come to love wrapper functions. I have a function expressly for checking whether or not sound effects are allowed to be played, and playing them if they are, and not playing them if they aren't or if they've played already in that step (Very useful for Lunacy Star..)

Rather than save ASCII codes, you'd save gamepad button codes into the config file, and flip the gamepad key to '1.' Suddenly my game knows to check for gamepad input and will ask the system appropriately when I call the custom key press function.

There is but one problem, and that is the fact that I do not have a gamepad, nor a means really to acquire one.

Ergo, I have no idea what reasonable default settings for the gamepad keys would be, and have decided to make them the following:

A: 1

B: 2

L: 3

R: 4

Start: 5

Select: 6

Clever, I know. But what does it matter even if I did know, considering you can change the buttons in use? The answer is simple: to avert the complaints from lazy people who can't be assed to read a file called 'Read Me' before they do anything.

SERIOUSLY, READ THE README FILES IN EVERYTHING STARTING NOW BECAUSE THEY MIGHT HAVE, LIKE, USEFUL INFORMATION.

Or, at the very least, interesting information.

Failing that, a dirty joke.


No content?

Here, have another New Estherson tidbit.

Quote: Chapter 6

"I know," Tobias said. "Isaac killed him."

"That monster," Suzetta gasped. "This city is much too dangerous- there is no order!"

She walked back over to her desk. "I will not be handing out any more missions until further notice. I can't afford to lose any more of you."

"How many…"

"When Frost Hall was first established, we had about 60 residents, or about a fourth of the city. The number is now 46, including the two of us. We're losing our status as a viable power in New Estherson," she said.

Tobias flinched at the word 'power.'

"What would you control," Tobias asked, "the entire city?"

"Ideally, yes," Suzetta replied, "if we controlled the opposition, doesn't that theoretically reduce the risk of uprising?" She gave a most unsettling smile at this.

Comments

death 12 years, 2 months ago

i would recommend having the default mapping to fit a 360 controller since it's a very common controller used for PC games nowadays. (even i use 2 for my PC)

Rob 12 years, 2 months ago

Quote:
I have no idea what reasonable default settings for the gamepad keys would be, and have decided to make them the following:

A: 1

B: 2

L: 3

R: 4

Start: 5

Select: 6

I'm pretty sure 1 and 2 on my controller are start and select, and 3 and 4 are some other buttons like clicking in the analog sticks or something dumb….

I hope to God I recalled wrong and those are actually 11/12/13/14, not 1/2/3/4…