I need to know the player's name!

Monkey Forums/Monkey Programming/I need to know the player's name!

GfK(Posted 2011) [#1]
From searching the forum a bit, it seems there is no way of using the virtual keyboard on iOS?

Is it normal practice to code your own keyboard in the same style as the game? Or should we really have access to the hardware's virtual keyboard?


therevills(Posted 2011) [#2]
I havent play too many games (on Android or iOS) where it asks for text input, so I'm not sure what is the "proper" way to do it...

It would be really nice to have access to the iOS virtual keyboard some how...

If you go down the track of creating your own keyboard and if you localise your game, you will need to add extra keys etc...


GfK(Posted 2011) [#3]
If you go down the track of creating your own keyboard and if you localise your game, you will need to add extra keys etc...
Yeah this is what really puts me off doing it that way. Using the iOS keyboard really should be the way to go with this.

I'm working in HTML5 at the moment anyway so its not stopping me from cracking on, but its going to become an issue in the next few weeks.


therevills(Posted 2011) [#4]
Quickly looking in to it and it seems its going to be the same thing as Android, you need a text field object...

Objective C:
[textField becomeFirstResponder];


Gawd! Objective is ugly!!!


FlameDuck(Posted 2011) [#5]
Is it normal practice to code your own keyboard in the same style as the game? Or should we really have access to the hardware's virtual keyboard?

I guess you could argue in favor of both. Things to consider:

1) Not all target platforms have virtual keyboards, some have actual keyboards, some may have none at all.
2) Monkey probably doesn't handle non-English characters anyway (BRL products almost never do).
3) Other platforms without virtual keyboards (ie. Nintendo DS) roll their own (see Zelda or Scribblenauts).

So what's "the best" solution? Personally I think the suggestion of a ECMAScript "prompt" equivalent would be a sufficient compromise. At least it would address your issue, and I'm pretty sure it can be supported on every platform. Okay so maybe XNA is the "odd one out" if you don't have a keyboard for your XBox.


Raz(Posted 2011) [#6]
XNA/Xbox has access to an onscreen keyboard too

http://forums.create.msdn.com/forums/p/38725/225251.aspx


therevills(Posted 2011) [#7]
I guess you want this for the player profile... I decided when converting PS not to bother as I "assumed" that people dont really "share" their mobile devices and that there were only every going to be one player per device ;)


GfK(Posted 2011) [#8]
I guess you want this for the player profile... I decided when converting PS not to bother as I "assumed" that people dont really "share" their mobile devices and that there were only every going to be one player per device ;)
That would make my life a hell of a lot easier if I could get away with it.


ziggy(Posted 2011) [#9]
Monkey probably doesn't handle non-English characters anyway (BRL products almost never do).

Unicodeness depends on target, but needs to be improven in Monkey. but I would like to point out that BlitzMax is full unicode compatible and functions like GetChar do have proper multilingual support, including characters that require special keys combinations, so I supose BlitzMax is outside the "almost".


GfK(Posted 2011) [#10]
What's the limitations with unicode in Monkey?


Beaker(Posted 2011) [#11]
Monkey really needs native virtual keyboard support (with textfield) for touch devices! Mark is really missing a trick here.

I've had a couple of mobile projects I would've liked to have created in monkey, but had to use Unity instead, purely because of the lack of keyboard support. :/

In some cases you could use something like a hash of the (unique) deviceID on iOS. But that wouldn't work well on Android devices (which is a mess in this area).


FlameDuck(Posted 2011) [#12]
XNA/Xbox has access to an onscreen keyboard too
Excellent. So it's at least technically possible, if somewhat convoluted.

I would like to point out that BlitzMax is full unicode compatible
Last I checked (which granted, is a couple of years ago), it failed to load files with non-english characters in them.

In some cases you could use something like a hash of the (unique) deviceID on iOS. But that wouldn't work well on Android devices (which is a mess in this area).
Or you could use something like the IMEI number of the phone. However in the concrete example a score is personal, and if you submit to (for instance) an online service like scoreloop, you might want bragging rights, which you're not going to get with simply an IMEI number. Especially not if you already have a scoreloop account.