News for hackers. Stuff that matters.
Re:What could have been a good career in game development by wlievens on Tuesday February 26, 2008 @03:24AM (#123753)
Threading is not what you need right where. What you need is called a "game logic loop" (for want of a better term). Keyboard events should change only the "action state" of your game objects and entities, e.g. when you press a key to move left, the player should be in the "moving left" state, but the actual movement should not be handled there.

Parallel to the input (okay you will need a separate thread of keyboard listening and for game logic) you will loop over your entities and update their state, processing things such as movement.

There are no comments on this comment yet.