[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Event handling; suggestions please?


As previously mentioned, I'm writing an RTS. Not particularly relevant
to the post, but just to give you some idea what this is about.

Currently, I have an event module which updates the physics of the game
periodically (short time; frame length ~ 25 ms or less, depending on
machine). I'm interested in suggestions on how to handle keyboard and
mouse events. The std. xlib X event loop is an idea; but I've already
got an event loop; and it doesn't include that... I could I guess, do
one of two things; either check at the end of each frame for buffered
cursor and keyboard events, and update as appropriate (I'm thinking this
may be the way to go at the moment), or a I can try to fork the process,
allocate some shared memory and use the other process as dedicated event

Thoughts on either way? Suggestions? Any ideas appreciated...
Shadow Mint.