[AGDev-newbies] enter key question

Thomas Ward tward1978 at earthlink.net
Wed Jun 14 22:53:25 BST 2006


Hi, Richard.
I'd have to know a bit about how you plan to capture keyboard input for 
the game. For example in all my games weather it be C++ or C# all 
keyboard is in the OnKeyDownEvent as I look for the actual MS Windows 
events, capture them, and do something with them.
In Java it is similar, but I would check the AWT dispatch event thread 
for keyboard/mouse events that are being sent to the jvm from Windows.
If I am doing something in C# and DirectX DirectInput then I would 
create and check the thread where my keyboard handling is.
Are you using a single thread, or are you multithreading your game? Are 
you looking at Windows Events, or what is capturing your keyboard 
pressed events for you?



Richard Bennett wrote:
> so Tom, would I put the switch statement inside of that module? That 
> confuses me, could be because my brain is tired, but it is nagging me 
> terribly. I think I may be able to understand it when my brain and 
> body aren't so tired, but just can't grasp it right now. How would I 
> encorporate that into the menu example that you gave me have like the 
> enter key go to the Yes module and have another key go to the No 
> module? Sorry but just not grasping it. I am trying to create a free 
> game to practice my menu skills and give people something to play. I 
> can figure out how to do  choices using lots of if statements, but 
> wanted to try and find an easier way like being able to just hit 
> either up or down arrow key to scroll through the menus.
> BEAN
> _______________________________________________
> AGDev-newbies mailing list
> AGDev-newbies at lists.agdev.org
> http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies
>
>



More information about the AGDev-newbies mailing list