Name Entry

Share your ZGE-development tips and techniques here!

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Name Entry

Post 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
Attachments
Entry.zip
(41.27 KiB) Downloaded 516 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post 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 ??
iterationGAMES.com
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Post Reply