3 ms·
You use a game library for this and then it becomes as simple as pushing a key handler onto the event loop and usually the keycodes are already processed for yo
by qertistick 6y ago
You use a game library for this and then it becomes as simple as pushing a key handler onto the event loop and usually the keycodes are already processed for you as well. I don't get the false dilemma people are creating that somehow this is complicated or that people who use the easy way are less knowledgable than others. If you make a game engine from scratch by yourself it's going to be a logical disaster, whether you've learned c++ or python.
- Gravityloss 6y agoYeah, it's surprisingly simple. It took little time with a game library to get the key polling to work. I was experimenting with chorded keyboard ideas back then.
- saagarjha 6y agoBut then you might end up talking about event loops and routing…
- MaxBarraclough 6y ago> You use a game library for this If it's a command-line application, they might use curses. edit Apparently curses isn't available by default in Python3 for Windows. Is there a nice way to do this?