Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Keyboard and USC

Sign in to follow this  


Cripes!, the Snipes clone

I've been hard at work on the Keyboard class for the past few days. It's taken me longer than I thought to wrap my head around how to approach interactive keyboard input, but I'm getting there. The Keyboard class now has an Update() method to scan for keyboard events and toggle its internal boolean array accordingly; a WaitForKeypress() method that blocks while waiting for a keydown event; and a Pressed() method that returns the number of keys currently down. The Pressed() method is mainly to help work around the fact that if one key is held down, then another key is pressed and released, the initial key stops sending repeating keydown messages. It does, however, send a message when it is released.

So far it works pretty well, the only problem being that holding the arrow key down causes the world to scroll blazingly fast. I'm pretty sure that's just a problem with how I'm responding to input, not with the Keyboard class itself. Browsing through MSDN while I type this reveals that a waitable timer combined with WaitForMultipleObjects() may solve that, though it's just an idea for now.

College Application - USC

About four hours ago, I finally finished my application to the University of Southern California. The deadline is December 1st.. that'd be today. Cutting it a bit close, eh? Here's hoping I get in! :)

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!