Page 1 of 1

Name Entry

Posted: Thu Jan 15, 2009 11:34 pm
by Kjell
:idea:

Simple name entry example build in 1.9.3. Use the left & right arrow keys to choose a character, Enter to confirm and Backspace to go back. Props to Ville for mentioning the RenderNet method ( which is quite a bit simpler then the Texture offset approach ).

K

Posted: Sun Jan 18, 2009 8:43 pm
by jph_wacheski
thanks Kjell,. it was the material issue that was driving me knuts,. once I switched to a net I had little problem,. .

I am interested in your input method,. why do you use this way? is it mostly for the ability to know key pressed/held/relesed or are there other reasons? I would assume it is a frame or two slower than direct keypress events ??

Posted: Sun Jan 18, 2009 10:37 pm
by Kjell
Hmm,

Couple of reasons. I like things modular ( all processing is done from two simple loops instead of calling functions from all over the place ), it keeps projects organized and makes the "package" easy to alter / re-use. Also, I try to refrain from duplicate* code, which makes storing the results in a Array the best choice. And finally, this kind of structure makes it easier to enable input mapping once strings would be available.

It all depends on preference and what you need though.

*Ironicly, the Windows version of ZGE generates the OnPress states from the Callback events .. which are OnPressed and OnReleased to begin with :P

K