I have seen this in games before.

This is a discussion on I have seen this in games before. within the Windows Programming forums, part of the Platform Specific Boards category; I have seen games before that while playing, you can type in a word, and it will then do something ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Exclamation Keypress reading

    I have seen games before that while playing, you can type in a word, and it will then do something depending on that word. I was wondering if someone could show me how that is done.

    Thanks in advance, August
    Last edited by Queatrix; 04-20-2005 at 07:34 AM.

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    You'll basically be checking for KEY_DOWN messages, building a string from those particular virtual keys, and then comparing the resulting string that you get in the keyboard buffer with the strings that you want to responde to, via strcmp(); or similar.
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Could you show me the way you would do it?
    Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. When done right, PC games are amazing
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-13-2008, 05:32 PM
  2. Violent video games?
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 58
    Last Post: 04-26-2006, 01:43 PM
  3. Hooked on old games...... still
    By Stoned_Coder in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 05-30-2005, 02:46 PM
  4. Video Games Industry. 5 years left.
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 12-10-2002, 09:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21