The tag has no wiki summary.

learn more… | top users | synonyms

17
votes
3answers
5k views

Polling vs event driven input

I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven ...
8
votes
3answers
1k views

Key combinations on poll-based input

So assume you have an input system that is based on polling void update() { if( Keyboard[ 'A' ] ) // A is down } Say you want to be able to recognize 3 to 8 length key combinations ...
3
votes
1answer
592 views

Recommended Polling Rate

I'm using the XInput API to support gamepads. As XInput is not event-driven, but requires polling, my question is, what is the recommended polling rate (ms) for gamepads or specific, the XBOX 360 ...
3
votes
1answer
223 views

Game based on Ajax polling for 12 players

I am planning on writing a small browser game. The webserver is a shared server, with no root / install possible. I want to use AJAX for client/server communication. There will be 12 players. So ...
1
vote
4answers
841 views

How do I respond to keyboard events which occur between polling?

In my games update loop, which happens on a fixed timestep of 30 times per second, I am checking the current state of several keys to determine how to move the player. For example: ...
1
vote
3answers
190 views

How do I write a game server with single-threaded networking?

I want to write a game server with one thread for clients message handling and use something like epoll to accept network messages. All I/O and database access will be processed in a thread pool and ...
1
vote
1answer
396 views

Turn based card game multiplayer: http polling or TCP

I am working on card games for mobile devices. For multiplayer I will be communicating through a central server. For the purpose I sorted out three options: HTTP polling TCP Websocket (client ...
1
vote
1answer
216 views

What alternatives are there for creating Keyboard/Mouse controls in LWJGL?

So I'm currently working my way through openGL tutorials, using LWJGL to do all my work in. However as I get to the part on how to access Keyboard and Mouse events in this library, I stumble across ...
0
votes
6answers
901 views

Avoiding constant IF checks for loops

As an example, I have 3 different loops that are executed in certain conditions. I want to know if there's any way short of something like this: if(day) x++; else if(night) y++; else z++; ...
0
votes
1answer
91 views

What is the best way to turn image voting into a game? [closed]

I'm trying to come up with a design for an image voting site that turns the (potentially boring) task of voting on thousands of images into a game. The goal is to get the user to vote on as many image ...