Thursday, October 27, 2011

Keyboards

At one point during the development of PewPew, I wanted the players to be able to enter their name for the online high scores and replays. At first I started to use the native iOS keyboard,  and for a couple of months that's all there was.

But because I always wanted to have as few OS-specific code as possible to make the porting to different OS as simple as possible, I decided to implement my own keyboard.
It was going to be a lot of boring work though, so I kept postponing for later... And then, one day, I got in I saw this:

Extract from Gunnm, a fantastic manga.

I immediately wanted to have this keyboard in PewPew, and two days later it was done. And it looked great:
custom keyboard = seamless integration.


Besides the speed gain when porting to a new platform and the code simplification, there are many other advantages to having a custom keyboard. PewPew's font does not contain all the characters, so I can show only the characters that can be entered. Also, you can have custom colors in your nickname, and by having a custom keyboard I can make it very easy for the users to specify them:


Of course, there are disadvantages to using a custom keyboard: the users aren't used to the layout, they can't copy paste, the native keyboards are likely capable of detecting false key-presses, etc... but when you just want to enter your nickname, those things are not important.

No comments:

Post a Comment

Unexpected Gotchas in Making a Game Deterministic

When aiming for a fully deterministic program, it is common knowledge that you have to deterministically seed your random number generators,...